Skip to content

Commit c1709a8

Browse files
feat(Contract, enums): update contract_type to use ContractType enum for improved type safety
1 parent ca18a7c commit c1709a8

2 files changed

Lines changed: 9 additions & 1 deletion

File tree

resources/js/types/application/contract.d.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { EmployeeInfo } from '@/types/application/employee';
2+
import { ContractType } from '@/types/application/enums';
23

34
export interface Contract {
45
id: number;
@@ -9,7 +10,7 @@ export interface Contract {
910

1011
rate_type: string;
1112
rate: string;
12-
contract_type: string;
13+
contract_type: ContractType;
1314

1415
created_at: Date;
1516
updated_at: Date;

resources/js/types/application/enums.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,10 @@ export enum NoticeType {
2626
Warning = 'warning',
2727
Alert = 'alert',
2828
}
29+
30+
export enum ContractType {
31+
FullTime = 'full_time',
32+
PartTime = 'part_time',
33+
Contractor = 'contractor',
34+
Intern = 'intern',
35+
}

0 commit comments

Comments
 (0)