Skip to content

Commit

Permalink
fix: fix minor functions and mistyped text
Browse files Browse the repository at this point in the history
  • Loading branch information
BenzeneKim committed Jun 2, 2024
1 parent de0e2f7 commit 40c71c1
Show file tree
Hide file tree
Showing 12 changed files with 24 additions and 12 deletions.
Binary file not shown.
Binary file not shown.
Binary file modified IssueTraker/Assets/Scene/AdminScene.unity
Binary file not shown.
Binary file modified IssueTraker/Assets/Scene/UserScene.unity
Binary file not shown.
4 changes: 2 additions & 2 deletions IssueTraker/Assets/Scripts/JSON/Types.cs
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ public class Project
public class ProjectStatistic
{
public int day_issues;
public int month_issue;
public int total_issue;
public int month_issues;
public int total_issues;
public int closed_issues;

}
Expand Down
1 change: 1 addition & 0 deletions IssueTraker/Assets/Scripts/Managers/LoginManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ public void CreateAccount()
JSON.SignUp signUpInfo = new JSON.SignUp { user_id = _signUpId.text, password = _signUpPw.text, name = _signUpName.text, email = _signUpEMail.text };
Debug.Log(JsonUtility.ToJson(signUpInfo));
StartCoroutine(ConnectionManager.Post("user/signUp", signUpInfo, RequestSuccess, RequestBad, RequestUnAuth, RequestForbidden, true));
_signUpPage.SetActive(false);
}
public void RequestSuccess()
{
Expand Down
2 changes: 1 addition & 1 deletion IssueTraker/Assets/Scripts/Managers/UserUIManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public void ShowProjectDashboard(string project_id, string project_title)
}
public void RefreshProjectIssueList()
{
_projectDashboard.transform.GetComponent<ProjectDashboardController>().UpdateIssueList();
_projectDashboard.transform.GetComponent<ProjectDashboardController>().UpdateProjectDashboard();

}
public void ShowIssueViewer(string project_id, string issue_id)
Expand Down
9 changes: 8 additions & 1 deletion IssueTraker/Assets/Scripts/UIs/AddProjectPageController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ public void Initialize()
}
private void ClearMemberList()
{
_userIdDrp.ClearOptions();
if (_newMemberContainer == null || _newMemberContainer.childCount == 0) return;
for(int i=0;i<_newMemberContainer.childCount;i++)
{
Destroy(_newMemberContainer.GetChild(i).gameObject);
Expand All @@ -30,6 +32,11 @@ private void ClearMemberList()
public void AddUser()
{
if (_userIdDrp.captionText.text == null || _userIdDrp.captionText.text.Length == 0) return;
foreach (JSON.UserRole member in _projectInfo.members)
{
if (member.user_id == _userIdDrp.captionText.text)
return;
}
string role = string.Empty;
switch (_roleDrp.captionText.text)
{
Expand All @@ -49,7 +56,7 @@ public void AddUser()
memberObj.transform.GetChild(0).GetComponent<TextMeshProUGUI>().text = _userIdDrp.captionText.text;
memberObj.transform.GetChild(1).GetComponent<TextMeshProUGUI>().text = _roleDrp.captionText.text;
_projectInfo.members.Add(newMember);
_userIdDrp.options.Remove(new TMP_Dropdown.OptionData() { text = _userIdDrp.captionText.text });
_userIdDrp.options.Remove(new TMP_Dropdown.OptionData() { text = newMember.user_id });
}

public void AddUsertoList(string userId)
Expand Down
11 changes: 6 additions & 5 deletions IssueTraker/Assets/Scripts/UIs/IssueViewerController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ public void UpdateIssueData(JSON.GetIssue obj)
_issueContentTxt.text = obj.description;
_priorityTxt.text = obj.priority;
_assigneeTxt.text = obj.assignee_id;
if (_assigneeTxt.text == null || _assigneeTxt.text.Length == 0) _assigneeTxt.text = "Not Assigned";
_reporterTxt.text = obj.reporter_id;
_dateTxt.text = $"commented at {obj.created_date.Substring(0, 4)}-{obj.created_date.Substring(5, 2)}-{obj.created_date.Substring(8, 2)}";
}
Expand Down Expand Up @@ -130,7 +131,7 @@ public void UpdateUserRoleData(JSON.UserRoles roles)
_assigneeSelectDropdown.gameObject.SetActive(false);
_prioritySelectDropdown.gameObject.SetActive(false);
_assignIssueDataBtn.gameObject.SetActive(false);
_deleteIssueBtn.gameObject.SetActive(false);
_deleteIssueBtn.transform.parent.gameObject.SetActive(false);
break;
case "PL":
if(_state != "CLOSED" && _state != "DISPOSED") _disposeIssueBtn.transform.parent.gameObject.SetActive(true);
Expand All @@ -149,7 +150,7 @@ public void UpdateUserRoleData(JSON.UserRoles roles)
_assignIssueDataBtn.gameObject.SetActive(true);
FillDeveloperList();

_deleteIssueBtn.gameObject.SetActive(true);
_deleteIssueBtn.transform.parent.gameObject.SetActive(true);
break;
case "DEV":
_disposeIssueBtn.transform.parent.gameObject.SetActive(false);
Expand All @@ -162,7 +163,7 @@ public void UpdateUserRoleData(JSON.UserRoles roles)
_assigneeSelectDropdown.gameObject.SetActive(false);
_prioritySelectDropdown.gameObject.SetActive(false);
_assignIssueDataBtn.gameObject.SetActive(false);
_deleteIssueBtn.gameObject.SetActive(false);
_deleteIssueBtn.transform.parent.gameObject.SetActive(false);
break;
}
}
Expand All @@ -176,12 +177,12 @@ public void SetInputField()
if(_state == "CLOSED" || _state == "DISPOSED")
{
_newCommentIpF.gameObject.SetActive(false) ;
_commentAssignBtn.gameObject.SetActive(false) ;
_commentAssignBtn.transform.parent.gameObject.SetActive(false) ;
}
else
{
_newCommentIpF.gameObject.SetActive(true);
_commentAssignBtn.gameObject.SetActive(true) ;
_commentAssignBtn.transform.parent.gameObject.SetActive(true) ;
}
}

Expand Down
9 changes: 6 additions & 3 deletions IssueTraker/Assets/Scripts/UIs/ProjectDashboardController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ public void InitializeProjectDashboard(string project_id, string projectTitle)
private void UpdateStatistic(ProjectStatistic obj)
{
_dayIssueTxt.text = obj.day_issues.ToString();
_monthIssueTxt.text = obj.month_issue.ToString();
_totalIssueTxt.text = obj.total_issue.ToString();
_monthIssueTxt.text = obj.month_issues.ToString();
_totalIssueTxt.text = obj.total_issues.ToString();
_closedIssueTxt.text = obj.closed_issues.ToString();
}

Expand Down Expand Up @@ -108,6 +108,9 @@ public void SearchIssues()
if (_searchIpF.text.Length == 0)
UpdateIssueList();
else
UpdateIssueList(_filterOption.captionText.text, _searchIpF.text);
{
if (_filterOption.captionText.text == "state") UpdateIssueList(_filterOption.captionText.text, _searchIpF.text.ToUpper());
else UpdateIssueList(_filterOption.captionText.text, _searchIpF.text);
}
}
}
Binary file not shown.
Binary file modified IssueTraker/ProjectSettings/ProjectSettings.asset
Binary file not shown.

0 comments on commit 40c71c1

Please sign in to comment.