Skip to content

Commit

Permalink
LEAF-4581 - fix conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
shane committed Jan 16, 2025
2 parents 02971df + 6758bfd commit 4872a8e
Show file tree
Hide file tree
Showing 15 changed files with 6,649 additions and 5,351 deletions.
4 changes: 4 additions & 0 deletions API-tests/database/nexus_test_db.sql
Original file line number Diff line number Diff line change
Expand Up @@ -3729,6 +3729,10 @@ CREATE TABLE `position_data` (
KEY `indicatorID` (`indicatorID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

INSERT INTO `position_data` (`positionID`, `indicatorID`, `data`, `author`, `timestamp`) VALUES
(33, 2, 'GS', 'tester', 1736188465),
(33, 13, '0343', 'tester', 1736188458),
(33, 14, '14', 'tester', 1736188443);

DROP TABLE IF EXISTS `position_data_history`;
CREATE TABLE `position_data_history` (
Expand Down
10,640 changes: 5,353 additions & 5,287 deletions API-tests/database/portal_test_db.sql

Large diffs are not rendered by default.

11 changes: 9 additions & 2 deletions API-tests/employee_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,14 @@ func postEmployee(postUrl string, data Employee) (string, error) {
return c, nil
}

func disableEmployee(postUrl string) error {
func EnableLocalEmployee(empUID string) error {
postData := url.Values{}
postData.Set("CSRFToken", CsrfToken)
_, err := client.PostForm(RootOrgchartURL+`api/employee/` + empUID + `/activate`, postData)
return err
}

func DisableEmployee(postUrl string) error {

data := url.Values{}
data.Set("CSRFToken", CsrfToken)
Expand Down Expand Up @@ -271,7 +278,7 @@ func TestEmployee_CheckNationalEmployee(t *testing.T) {
}

// delete remote employee
err = disableEmployee(fmt.Sprintf("%sapi/employee/%s", NationalOrgchartURL, natEmployeeKey))
err = DisableEmployee(fmt.Sprintf("%sapi/employee/%s", NationalOrgchartURL, natEmployeeKey))
if err != nil {
t.Error(err)
}
Expand Down
84 changes: 45 additions & 39 deletions API-tests/formQuery.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,52 +10,58 @@ type FormQuery_Orgchart_Employee struct {
MiddleName string `json:"middleName"`
Email string `json:"email"`
UserName string `json:"userName"`
EmpUID int `json:"empUID"`
}

type FormQueryRecord struct {
RecordID int `json:"recordID"`
ServiceID int `json:"serviceID"`
Date int `json:"date"`
UserID string `json:"userID"`
Title string `json:"title"`
Priority int `json:"priority"`
LastStatus string `json:"lastStatus"`
Submitted int `json:"submitted"`
Deleted int `json:"deleted"`
IsWritableUser int `json:"isWritableUser"`
IsWritableGroup int `json:"isWritableGroup"`
Service string `json:"service"`
AbbreviatedService string `json:"abbreviatedService"`
GroupID int `json:"groupID"`
StepID int `json:"stepID"`
BlockingStepID int `json:"blockingStepID"`
LastNotified string `json:"lastNotified"`
InitialNotificationSent int `json:"initialNotificationSent"`
StepTitle string `json:"stepTitle"`
CategoryNames []string `json:"categoryNames"`
CategoryIDs []string `json:"categoryIDs"`
DestructionAge int `json:"destructionAge"`
ActionHistory []FormQueryActionHistory `json:"action_history"`
S1 FormQueryData `json:"s1"`
UnfilledDependencyData UnfilledDependencyData `json:"unfilledDependencyData"`
RecordID int `json:"recordID"`
ServiceID int `json:"serviceID"`
Date int `json:"date"`
UserID string `json:"userID"`
Title string `json:"title"`
Priority int `json:"priority"`
LastStatus string `json:"lastStatus"`
Submitted int `json:"submitted"`
Deleted int `json:"deleted"`
IsWritableUser int `json:"isWritableUser"`
IsWritableGroup int `json:"isWritableGroup"`
Service string `json:"service"`
AbbreviatedService string `json:"abbreviatedService"`
GroupID int `json:"groupID"`
StepID int `json:"stepID"`
BlockingStepID int `json:"blockingStepID"`
LastNotified string `json:"lastNotified"`
InitialNotificationSent int `json:"initialNotificationSent"`
StepTitle string `json:"stepTitle"`
CategoryNames []string `json:"categoryNames"`
CategoryIDs []string `json:"categoryIDs"`
DestructionAge int `json:"destructionAge"`
ActionHistory []FormQueryActionHistory `json:"action_history"`
S1 FormQueryData `json:"s1"`
UnfilledDependencyData UnfilledDependencyData `json:"unfilledDependencyData"`
UserMetadata FormQuery_Orgchart_Employee `json:"userMetadata"`
FirstName string `json:"firstName"`
LastName string `json:"lastName"`
UserName string `json:"userName"`
}

type FormQueryActionHistory struct {
RecordID int `json:"recordID"`
StepID int `json:"stepID"`
UserID string `json:"userID"`
Time int `json:"time"`
Description string `json:"description"`
ActionTextPasttense string `json:"actionTextPasttense"`
ActionType string `json:"actionType"`
Comment string `json:"comment"`
ApproverName string `json:"approverName"`
RecordID int `json:"recordID"`
StepID int `json:"stepID"`
UserID string `json:"userID"`
Time int `json:"time"`
Description string `json:"description"`
ActionTextPasttense string `json:"actionTextPasttense"`
ActionType string `json:"actionType"`
Comment string `json:"comment"`
ApproverName string `json:"approverName"`
UserMetadata FormQuery_Orgchart_Employee `json:"userMetadata"`
}

type UnfilledDependencyData map[string]UnfilledDependency

type UnfilledDependency struct{
Description string `json:"description"`
ApproverName string `json:"approverName"`
ApproverUID string `json:"approverUID"`
}
type UnfilledDependency struct {
Description string `json:"description"`
ApproverName string `json:"approverName"`
ApproverUID string `json:"approverUID"`
}
Loading

0 comments on commit 4872a8e

Please sign in to comment.