-
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.
test: 40% coverage of add-edit-adv-request pagee (#2467)
* fix: lint issues in add edit adv request page * test: 12% coverage of add-edit-advance-request page * minor * test: 26% coverage of add edit adv request page * test: 40% coverage of add-edit-adv-request pagee * test: 58% coverage add-edit-adv-request page (#2476) * test: 45% coverage of add edit adv request * 58% coverage of page * minor * test: 70% coverage of add-edit-adv-req page (#2479) * test: 67% coverage of page * 70% coverage of page * minor * minor * test: 87% coverage of add-edit-adv-request page (#2481) * test: 87% coverage of add-edit-adv-request page * test: 98.45% coverage of add-edit-adv-request page (#2482) * test: 97% coverage * 98% coverage * pr fix * pr comments
- Loading branch information
1 parent
09e8d7c
commit de1a71f
Showing
13 changed files
with
1,005 additions
and
40 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
40 changes: 40 additions & 0 deletions
40
src/app/core/mock-data/advance-request-custom-field-values.data.ts
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,40 @@ | ||
import { AdvanceRequestCustomFieldValues } from '../models/advance-request-custom-field-values.model'; | ||
|
||
export const advanceRequestCustomFieldValuesData: AdvanceRequestCustomFieldValues[] = [ | ||
{ | ||
id: 1302, | ||
name: 'Phase', | ||
value: 'Phase 1', | ||
type: 'SELECT', | ||
}, | ||
{ | ||
id: 1305, | ||
name: 'BILLABLE', | ||
value: true, | ||
type: 'BOOLEAN', | ||
}, | ||
{ | ||
id: 1304, | ||
name: 'Arrival Date', | ||
value: '2 Jan 2023', | ||
type: 'DATE', | ||
}, | ||
]; | ||
|
||
export const advanceRequestCustomFieldValuesData2: AdvanceRequestCustomFieldValues[] = [ | ||
{ | ||
id: 1302, | ||
name: 'Phase', | ||
value: 'Phase 1', | ||
}, | ||
{ | ||
id: 1304, | ||
name: 'Arrival Date', | ||
value: '2023-1-2', | ||
}, | ||
{ | ||
id: 1305, | ||
name: 'BILLABLE', | ||
value: 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
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
74 changes: 74 additions & 0 deletions
74
src/app/core/mock-data/unflattened-advance-request.data.ts
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,74 @@ | ||
import { UnflattenedAdvanceRequest } from '../models/unflattened-advance-request.model'; | ||
|
||
export const unflattenedAdvanceRequestData: UnflattenedAdvanceRequest = { | ||
areq: { | ||
id: 'areqLFKMxUSAlQ', | ||
created_at: new Date('2023-10-03T09:20:22.112Z'), | ||
approved_at: null, | ||
purpose: 'hello', | ||
notes: 'fdv', | ||
state: 'SUBMITTED', | ||
currency: 'USD', | ||
amount: 2, | ||
org_user_id: 'ouuJzJYWcnzP', | ||
advance_id: null, | ||
policy_amount: null, | ||
policy_flag: null, | ||
policy_state: 'SUCCESS', | ||
project_id: null, | ||
custom_field_values: [ | ||
{ | ||
id: 159, | ||
name: 'Advance Request Place', | ||
value: 'd', | ||
type: null, | ||
}, | ||
{ | ||
id: 160, | ||
name: 'Category', | ||
value: 'Fyle is best', | ||
type: null, | ||
}, | ||
], | ||
updated_at: new Date('2023-10-03T14:50:22.552Z'), | ||
source: 'MOBILE', | ||
advance_request_number: 'AR/2023/10/R/1', | ||
updated_by: null, | ||
is_sent_back: null, | ||
is_pulled_back: null, | ||
}, | ||
ou: { | ||
id: 'ouuJzJYWcnzP', | ||
org_id: 'orNbIQloYtfa', | ||
org_name: 'Advance-test', | ||
employee_id: null, | ||
location: null, | ||
level: null, | ||
business_unit: null, | ||
department: null, | ||
title: null, | ||
mobile: null, | ||
sub_department: null, | ||
department_id: null, | ||
}, | ||
us: { | ||
full_name: 'Suyash', | ||
email: '[email protected]', | ||
name: 'Suyash', | ||
}, | ||
project: { | ||
code: null, | ||
name: null, | ||
}, | ||
advance: { | ||
id: null, | ||
}, | ||
policy: { | ||
amount: null, | ||
flag: null, | ||
state: 'SUCCESS', | ||
}, | ||
new: { | ||
state: 'APPROVAL_PENDING', | ||
}, | ||
}; |
14 changes: 14 additions & 0 deletions
14
src/app/core/models/advance-request-delete-params.model.ts
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,14 @@ | ||
import { FyDeleteDialogComponent } from 'src/app/shared/components/fy-delete-dialog/fy-delete-dialog.component'; | ||
import { AdvanceRequests } from './advance-requests.model'; | ||
import { Observable } from 'rxjs'; | ||
|
||
export interface AdvanceRequestDeleteParams { | ||
component: typeof FyDeleteDialogComponent; | ||
cssClass: string; | ||
backdropDismiss: boolean; | ||
componentProps: { | ||
header: string; | ||
body: string; | ||
deleteMethod: () => Observable<AdvanceRequests>; | ||
}; | ||
} |
Oops, something went wrong.