-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: move my reports and team reports pages to platform APIs, move ba…
…ck tasks stats to platform, and restrict access for HOD/HOP roles to Team Reports page
- Loading branch information
1 parent
ea2b65b
commit 5adf729
Showing
53 changed files
with
1,666 additions
and
1,228 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,6 +16,7 @@ export const mockQueryParamsForCount: ReportsQueryParams = deepFreeze({ | |
|
||
export const platformReportData: Report = deepFreeze({ | ||
amount: 0, | ||
comments: [], | ||
approvals: [ | ||
{ | ||
approver_user: { | ||
|
@@ -110,6 +111,55 @@ export const allReportsPaginated1: PlatformApiResponse<Report[]> = deepFreeze({ | |
data: [ | ||
{ | ||
amount: 100, | ||
comments: [ | ||
{ | ||
comment: 'changed to APPROVER_PENDING by Suyash ([email protected])', | ||
created_at: new Date('2024-05-21T11:07:01.99036+00:00'), | ||
creator_user: null, | ||
creator_user_id: 'SYSTEM', | ||
id: 'styBS6Mt3srX', | ||
}, | ||
{ | ||
comment: 'submitted by Suyash ([email protected])', | ||
created_at: new Date('2024-05-21T11:07:02.102867+00:00'), | ||
creator_user: null, | ||
creator_user_id: 'SYSTEM', | ||
id: 'stI6NDy8La7b', | ||
}, | ||
{ | ||
comment: 'aaab', | ||
created_at: new Date('2024-05-22T07:32:19.199048+00:00'), | ||
creator_user: { | ||
email: '[email protected]', | ||
full_name: 'Aastha', | ||
id: 'usaTtklUXVZn', | ||
}, | ||
creator_user_id: 'usaTtklUXVZn', | ||
id: 'stVFdDpz1LAi', | ||
}, | ||
{ | ||
comment: 'aaac', | ||
created_at: new Date('2024-05-22T07:32:19.199048+00:00'), | ||
creator_user: { | ||
email: '[email protected]', | ||
full_name: 'Aastha', | ||
id: 'usaTtklUXVZn', | ||
}, | ||
creator_user_id: 'usaTtklUXVZn', | ||
id: 'stVFdDpz1LAd', | ||
}, | ||
{ | ||
comment: 'aaa', | ||
created_at: new Date('2024-05-23T07:32:19.199048+00:00'), | ||
creator_user: { | ||
email: '[email protected]', | ||
full_name: 'Aastha', | ||
id: 'usaTtklUXVZn', | ||
}, | ||
creator_user_id: 'usaTtklUXVZn', | ||
id: 'stVFdDpz1LAL', | ||
}, | ||
], | ||
approvals: [], | ||
org_name: 'Staging Loaded', | ||
level: null, | ||
|
@@ -179,6 +229,7 @@ export const allReportsPaginated1: PlatformApiResponse<Report[]> = deepFreeze({ | |
{ | ||
amount: 200, | ||
approvals: [], | ||
comments: [], | ||
created_at: new Date('2023-07-11T06:19:28.260142+00:00'), | ||
currency: 'USD', | ||
employee: { | ||
|
@@ -250,6 +301,7 @@ export const allReportsPaginatedWithApproval: PlatformApiResponse<Report[]> = de | |
data: [ | ||
{ | ||
amount: 100, | ||
comments: [], | ||
approvals: [ | ||
{ | ||
approver_user: { | ||
|
@@ -334,6 +386,7 @@ export const allReportsPaginatedWithApproval: PlatformApiResponse<Report[]> = de | |
}, | ||
{ | ||
amount: 200, | ||
comments: [], | ||
approvals: [], | ||
created_at: new Date('2023-07-11T06:19:28.260142+00:00'), | ||
currency: 'USD', | ||
|
@@ -406,6 +459,7 @@ export const filteredReportsData: PlatformApiResponse<Report[]> = deepFreeze({ | |
data: [ | ||
{ | ||
amount: 200, | ||
comments: [], | ||
approvals: [], | ||
created_at: new Date('2023-07-11T06:19:28.260142+00:00'), | ||
currency: 'USD', | ||
|
@@ -478,6 +532,7 @@ export const allReportsPaginated2: PlatformApiResponse<Report[]> = deepFreeze({ | |
data: [ | ||
{ | ||
amount: 300, | ||
comments: [], | ||
approvals: [], | ||
created_at: new Date('2023-07-11T06:19:28.260142+00:00'), | ||
currency: 'USD', | ||
|
@@ -543,6 +598,7 @@ export const allReportsPaginated2: PlatformApiResponse<Report[]> = deepFreeze({ | |
}, | ||
{ | ||
amount: 400, | ||
comments: [], | ||
approvals: [], | ||
created_at: new Date('2023-07-11T06:19:28.260142+00:00'), | ||
currency: 'USD', | ||
|
@@ -614,6 +670,55 @@ export const submittedReportData: Report = deepFreeze({ | |
amount: 300, | ||
approvals: [], | ||
created_at: new Date('2023-07-11T06:19:28.260142+00:00'), | ||
comments: [ | ||
{ | ||
comment: 'changed to APPROVER_PENDING by Suyash ([email protected])', | ||
created_at: new Date('2024-05-21T11:07:01.99036+00:00'), | ||
creator_user: null, | ||
creator_user_id: 'SYSTEM', | ||
id: 'styBS6Mt3srX', | ||
}, | ||
{ | ||
comment: 'submitted by Suyash ([email protected])', | ||
created_at: new Date('2024-05-21T11:07:02.102867+00:00'), | ||
creator_user: null, | ||
creator_user_id: 'SYSTEM', | ||
id: 'stI6NDy8La7b', | ||
}, | ||
{ | ||
comment: 'aaab', | ||
created_at: new Date('2024-05-22T07:32:19.199048+00:00'), | ||
creator_user: { | ||
email: '[email protected]', | ||
full_name: 'Aastha', | ||
id: 'usaTtklUXVZn', | ||
}, | ||
creator_user_id: 'usaTtklUXVZn', | ||
id: 'stVFdDpz1LAi', | ||
}, | ||
{ | ||
comment: 'aaac', | ||
created_at: new Date('2024-05-22T07:32:19.199048+00:00'), | ||
creator_user: { | ||
email: '[email protected]', | ||
full_name: 'Aastha', | ||
id: 'usaTtklUXVZn', | ||
}, | ||
creator_user_id: 'usaTtklUXVZn', | ||
id: 'stVFdDpz1LAd', | ||
}, | ||
{ | ||
comment: 'aaa', | ||
created_at: new Date('2024-05-23T07:32:19.199048+00:00'), | ||
creator_user: { | ||
email: '[email protected]', | ||
full_name: 'Aastha', | ||
id: 'usaTtklUXVZn', | ||
}, | ||
creator_user_id: 'usaTtklUXVZn', | ||
id: 'stVFdDpz1LAL', | ||
}, | ||
], | ||
currency: 'USD', | ||
employee: { | ||
org_name: 'Staging Loaded', | ||
|
@@ -678,6 +783,7 @@ export const submittedReportData: Report = deepFreeze({ | |
|
||
export const submittedReportDataWithApproval: Report = deepFreeze({ | ||
amount: 300, | ||
comments: [], | ||
approvals: [ | ||
{ | ||
approver_user: { | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import deepFreeze from 'deep-freeze-strict'; | ||
|
||
import { ReportPermissions } from '../models/report-permissions.model'; | ||
|
||
export const apiReportPermissions: ReportPermissions = deepFreeze({ | ||
can_resubmit: false, | ||
can_approve: false, | ||
can_delete: true, | ||
can_edit: true, | ||
can_export: true, | ||
can_submit: false, | ||
can_add_approver: true, | ||
can_remove_approver: true, | ||
can_verify: true, | ||
can_admin_approve: true, | ||
can_admin_or_approver_edit: false, | ||
can_move_to_payment_pending: false, | ||
can_send_back: true, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.