+
Uh oh! An unexpected error has occured.
+

+
+ Contact your system admistrator if this cat appears too often on your screen.
+
+
+
Student House Dashboard
- The student square for housemates! This site is currently under construction.
+ Welcome to the student square for housemates!
@if (!User.Identity.IsAuthenticated)
{
@@ -16,6 +16,14 @@
else
{
Announcements
+
Complaints
}
-
+
Newest update
+
Now you can search for announcements on a specific date using the search bar and the keyword "date:"
+
Example: date:2023-05-13
+
\ No newline at end of file
diff --git a/StudentHouseDashboard/WinForms/ComplaintForm.cs b/StudentHouseDashboard/WinForms/ComplaintForm.cs
index a0597f9..8dba92d 100644
--- a/StudentHouseDashboard/WinForms/ComplaintForm.cs
+++ b/StudentHouseDashboard/WinForms/ComplaintForm.cs
@@ -24,6 +24,9 @@ namespace WinForms
this.currentUser = currentUser;
dtpPublishDate.Enabled = false;
+ tbTitle.Enabled = false;
+ tbDescription.Enabled = false;
+
foreach (var item in Enum.GetValues(typeof(ComplaintStatus)))
{
cbStatus.Items.Add(item);
@@ -32,11 +35,10 @@ namespace WinForms
{
cbSeverity.Items.Add(item);
}
+
if (readOnly)
{
btnSave.Enabled = false;
- tbTitle.Enabled = false;
- tbDescription.Enabled = false;
cbStatus.Enabled = false;
cbSeverity.Enabled = false;
}
diff --git a/StudentHouseDashboard/WinForms/Dashboard.Designer.cs b/StudentHouseDashboard/WinForms/Dashboard.Designer.cs
index f0e6882..d998d26 100644
--- a/StudentHouseDashboard/WinForms/Dashboard.Designer.cs
+++ b/StudentHouseDashboard/WinForms/Dashboard.Designer.cs
@@ -45,12 +45,13 @@
btnEditAnnouncement = new Button();
lbAnnouncements = new ListBox();
tpComplaints = new TabPage();
- tpEvents = new TabPage();
- lbComplaints = new ListBox();
panelComplaintFunctions = new Panel();
btnArchiveComplaint = new Button();
btnViewComplaint = new Button();
btnEditComplaint = new Button();
+ lbComplaints = new ListBox();
+ tpEvents = new TabPage();
+ btnLogout = new Button();
tabControl1.SuspendLayout();
tpUsers.SuspendLayout();
panelUserFunctions.SuspendLayout();
@@ -243,25 +244,6 @@
tpComplaints.Text = "Complaints";
tpComplaints.UseVisualStyleBackColor = true;
//
- // tpEvents
- //
- tpEvents.Location = new Point(4, 24);
- tpEvents.Name = "tpEvents";
- tpEvents.Size = new Size(723, 340);
- tpEvents.TabIndex = 3;
- tpEvents.Text = "Events";
- tpEvents.UseVisualStyleBackColor = true;
- //
- // lbComplaints
- //
- lbComplaints.Dock = DockStyle.Top;
- lbComplaints.FormattingEnabled = true;
- lbComplaints.ItemHeight = 15;
- lbComplaints.Location = new Point(0, 0);
- lbComplaints.Name = "lbComplaints";
- lbComplaints.Size = new Size(723, 289);
- lbComplaints.TabIndex = 0;
- //
// panelComplaintFunctions
//
panelComplaintFunctions.Controls.Add(btnArchiveComplaint);
@@ -303,11 +285,41 @@
btnEditComplaint.UseVisualStyleBackColor = true;
btnEditComplaint.Click += btnEditComplaint_Click;
//
+ // lbComplaints
+ //
+ lbComplaints.Dock = DockStyle.Top;
+ lbComplaints.FormattingEnabled = true;
+ lbComplaints.ItemHeight = 15;
+ lbComplaints.Location = new Point(0, 0);
+ lbComplaints.Name = "lbComplaints";
+ lbComplaints.Size = new Size(723, 289);
+ lbComplaints.TabIndex = 0;
+ //
+ // tpEvents
+ //
+ tpEvents.Location = new Point(4, 24);
+ tpEvents.Name = "tpEvents";
+ tpEvents.Size = new Size(723, 340);
+ tpEvents.TabIndex = 3;
+ tpEvents.Text = "Events";
+ tpEvents.UseVisualStyleBackColor = true;
+ //
+ // btnLogout
+ //
+ btnLogout.Location = new Point(651, 0);
+ btnLogout.Name = "btnLogout";
+ btnLogout.Size = new Size(75, 23);
+ btnLogout.TabIndex = 7;
+ btnLogout.Text = "Log out";
+ btnLogout.UseVisualStyleBackColor = true;
+ btnLogout.Click += btnLogout_Click;
+ //
// Dashboard
//
AutoScaleDimensions = new SizeF(7F, 15F);
AutoScaleMode = AutoScaleMode.Font;
ClientSize = new Size(731, 368);
+ Controls.Add(btnLogout);
Controls.Add(lblUserStatus);
Controls.Add(tabControl1);
Name = "Dashboard";
@@ -349,5 +361,6 @@
private Button btnArchiveComplaint;
private Button btnViewComplaint;
private Button btnEditComplaint;
+ private Button btnLogout;
}
}
\ No newline at end of file
diff --git a/StudentHouseDashboard/WinForms/Dashboard.cs b/StudentHouseDashboard/WinForms/Dashboard.cs
index 4a30bdf..edf60b9 100644
--- a/StudentHouseDashboard/WinForms/Dashboard.cs
+++ b/StudentHouseDashboard/WinForms/Dashboard.cs
@@ -236,5 +236,13 @@ namespace WinForms
RefreshLists();
}
}
+
+ private void btnLogout_Click(object sender, EventArgs e)
+ {
+ if (MessageBox.Show("Do you want to log out?", "Log out", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
+ {
+ Close();
+ }
+ }
}
}
diff --git a/docs/testplan.docx b/docs/testplan.docx
index f471fd1..a7f4716 100644
Binary files a/docs/testplan.docx and b/docs/testplan.docx differ