@tagsamurai/fats-api-services 1.0.0-alpha.246 → 1.0.0-alpha.248
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/api-services.es.js +117 -0
- package/api-services.system.js +117 -0
- package/package.json +1 -1
- package/src/dto/maintenanceRoutine.dto.d.ts +49 -0
- package/src/services/oldMaintenanceRoutine.service.d.ts +37 -3
- package/src/types/maintenanceRoutine.type.d.ts +424 -0
- package/src/types/notification.type.d.ts +1 -1
package/api-services.es.js
CHANGED
|
@@ -1892,6 +1892,123 @@ const RoutineServices = {
|
|
|
1892
1892
|
},
|
|
1893
1893
|
putSetActive: (body) => {
|
|
1894
1894
|
return API$5.put("/maintenable-asset/set-active", body);
|
|
1895
|
+
},
|
|
1896
|
+
getRoutineTask: (params) => {
|
|
1897
|
+
return API$5.get("/routine-task", { params });
|
|
1898
|
+
},
|
|
1899
|
+
getRoutineTaskOptions: (params) => {
|
|
1900
|
+
return API$5.get("/routine-task/options", { params });
|
|
1901
|
+
},
|
|
1902
|
+
getRoutineSchedule: (params) => {
|
|
1903
|
+
return API$5.get("/routine-schedule", { params });
|
|
1904
|
+
},
|
|
1905
|
+
getRoutineScheduleOptions: (params) => {
|
|
1906
|
+
return API$5.get("/routine-schedule/options", { params });
|
|
1907
|
+
},
|
|
1908
|
+
getRoutineTaskEventLog: (params) => {
|
|
1909
|
+
return API$5.get("/routine-task/event-log", { params });
|
|
1910
|
+
},
|
|
1911
|
+
getRoutineTaskEventLogOptions: (params) => {
|
|
1912
|
+
return API$5.get("/routine-task/event-log/options", { params });
|
|
1913
|
+
},
|
|
1914
|
+
getAssetName: (params) => {
|
|
1915
|
+
return API$5.get("/asset-name", { params });
|
|
1916
|
+
},
|
|
1917
|
+
getAssetNameOptions: (params) => {
|
|
1918
|
+
return API$5.get("/asset-name/options", { params });
|
|
1919
|
+
},
|
|
1920
|
+
postCreateRoutineSchedule: (data) => {
|
|
1921
|
+
return API$5.post("/routine-schedule", data);
|
|
1922
|
+
},
|
|
1923
|
+
postDuplicateRoutineSchedule: (id, data) => {
|
|
1924
|
+
return API$5.post(`/routine-schedule/duplicate/${id}`, data);
|
|
1925
|
+
},
|
|
1926
|
+
putEditRoutineSchedule: (id, data) => {
|
|
1927
|
+
return API$5.put(`/routine-schedule/${id}`, data);
|
|
1928
|
+
},
|
|
1929
|
+
getUserStaff: (params) => {
|
|
1930
|
+
return API$5.get("/user-transaction-role/maintenance-role/staff", { params });
|
|
1931
|
+
},
|
|
1932
|
+
getUserStaffOptions: (params) => {
|
|
1933
|
+
return API$5.get("/user-transaction-role/maintenance-role/staff/options", {
|
|
1934
|
+
params
|
|
1935
|
+
});
|
|
1936
|
+
},
|
|
1937
|
+
getRoutineScheduleDetail: (id) => {
|
|
1938
|
+
return API$5.get(`/routine-schedule/${id}`);
|
|
1939
|
+
},
|
|
1940
|
+
deleteRoutineSchedule: (id) => {
|
|
1941
|
+
return API$5.delete("/routine-schedule/bulk-delete", {
|
|
1942
|
+
params: {
|
|
1943
|
+
id: JSON.stringify(id)
|
|
1944
|
+
}
|
|
1945
|
+
});
|
|
1946
|
+
},
|
|
1947
|
+
putRoutineTaskCancel: (id) => {
|
|
1948
|
+
return API$5.put("/routine-task/cancel", { id });
|
|
1949
|
+
},
|
|
1950
|
+
getMaintainableAsset: (params) => {
|
|
1951
|
+
return API$5.get("/maintenable-asset", { params });
|
|
1952
|
+
},
|
|
1953
|
+
getMaintainableAssetOptions: (params) => {
|
|
1954
|
+
return API$5.get("/maintenable-asset/options", { params });
|
|
1955
|
+
},
|
|
1956
|
+
getMaintenanceHistory: (params) => {
|
|
1957
|
+
return API$5.get("/routine-task/history", { params });
|
|
1958
|
+
},
|
|
1959
|
+
getMaintenanceHistoryOptions: (params) => {
|
|
1960
|
+
return API$5.get("/routine-task/history/options", { params });
|
|
1961
|
+
},
|
|
1962
|
+
getActiveAsset: (id) => {
|
|
1963
|
+
return API$5.get(`/routine-schedule/${id}/assets`);
|
|
1964
|
+
},
|
|
1965
|
+
getActiveAssetOptions: (id, params) => {
|
|
1966
|
+
return API$5.get(`/routine-schedule/${id}/assets/options`, { params });
|
|
1967
|
+
},
|
|
1968
|
+
getRoutineTaskDetail: (id) => {
|
|
1969
|
+
return API$5.get(`/routine-task/${id}/detail`);
|
|
1970
|
+
},
|
|
1971
|
+
getApproverList: (id, approvalRound) => {
|
|
1972
|
+
return API$5.get(`/routine-task/${id}/approval-history`, {
|
|
1973
|
+
params: {
|
|
1974
|
+
approvalRound
|
|
1975
|
+
}
|
|
1976
|
+
});
|
|
1977
|
+
},
|
|
1978
|
+
getReviewerList: (id) => {
|
|
1979
|
+
return API$5.get(`/routine-task/${id}/review-history`);
|
|
1980
|
+
},
|
|
1981
|
+
getMaintainableAssetDetail: (id) => {
|
|
1982
|
+
return API$5.get(`/maintenable-asset/${id}`);
|
|
1983
|
+
},
|
|
1984
|
+
putSetActiveTasks: (id, isActive) => {
|
|
1985
|
+
return API$5.put(`/maintenable-asset/${id}/set-tasks-active`, {
|
|
1986
|
+
isActive
|
|
1987
|
+
});
|
|
1988
|
+
},
|
|
1989
|
+
putAssignStaff: (routineId, staffId) => {
|
|
1990
|
+
return API$5.put(`/routine-task/${routineId}/assign-staff`, {
|
|
1991
|
+
id: staffId
|
|
1992
|
+
});
|
|
1993
|
+
},
|
|
1994
|
+
getServiceCenter: () => {
|
|
1995
|
+
return API$5.get("/service-center/dropdown");
|
|
1996
|
+
},
|
|
1997
|
+
putCompleteRoutineTask: (id, data) => {
|
|
1998
|
+
const headers = { "Content-Type": "multipart/form-data" };
|
|
1999
|
+
return API$5.put(`/routine-task/${id}/completion`, data, { headers });
|
|
2000
|
+
},
|
|
2001
|
+
getApprovalDetail: (id) => {
|
|
2002
|
+
return API$5.get(`/approval/${id}`);
|
|
2003
|
+
},
|
|
2004
|
+
putApprovalApprove: (id, data) => {
|
|
2005
|
+
return API$5.put(`/approval/${id}/approve`, data);
|
|
2006
|
+
},
|
|
2007
|
+
putReviewRoutine: (id, data) => {
|
|
2008
|
+
return API$5.put(`/routine-task/${id}/review`, data);
|
|
2009
|
+
},
|
|
2010
|
+
putUpdateRoutineTask: (id, data) => {
|
|
2011
|
+
return API$5.put(`/routine-task/${id}/handle-overdue`, data);
|
|
1895
2012
|
}
|
|
1896
2013
|
};
|
|
1897
2014
|
const API$4 = createAxiosInstance({
|
package/api-services.system.js
CHANGED
|
@@ -1899,6 +1899,123 @@ System.register(["axios"], function(exports, module) {
|
|
|
1899
1899
|
},
|
|
1900
1900
|
putSetActive: (body) => {
|
|
1901
1901
|
return API$5.put("/maintenable-asset/set-active", body);
|
|
1902
|
+
},
|
|
1903
|
+
getRoutineTask: (params) => {
|
|
1904
|
+
return API$5.get("/routine-task", { params });
|
|
1905
|
+
},
|
|
1906
|
+
getRoutineTaskOptions: (params) => {
|
|
1907
|
+
return API$5.get("/routine-task/options", { params });
|
|
1908
|
+
},
|
|
1909
|
+
getRoutineSchedule: (params) => {
|
|
1910
|
+
return API$5.get("/routine-schedule", { params });
|
|
1911
|
+
},
|
|
1912
|
+
getRoutineScheduleOptions: (params) => {
|
|
1913
|
+
return API$5.get("/routine-schedule/options", { params });
|
|
1914
|
+
},
|
|
1915
|
+
getRoutineTaskEventLog: (params) => {
|
|
1916
|
+
return API$5.get("/routine-task/event-log", { params });
|
|
1917
|
+
},
|
|
1918
|
+
getRoutineTaskEventLogOptions: (params) => {
|
|
1919
|
+
return API$5.get("/routine-task/event-log/options", { params });
|
|
1920
|
+
},
|
|
1921
|
+
getAssetName: (params) => {
|
|
1922
|
+
return API$5.get("/asset-name", { params });
|
|
1923
|
+
},
|
|
1924
|
+
getAssetNameOptions: (params) => {
|
|
1925
|
+
return API$5.get("/asset-name/options", { params });
|
|
1926
|
+
},
|
|
1927
|
+
postCreateRoutineSchedule: (data) => {
|
|
1928
|
+
return API$5.post("/routine-schedule", data);
|
|
1929
|
+
},
|
|
1930
|
+
postDuplicateRoutineSchedule: (id, data) => {
|
|
1931
|
+
return API$5.post(`/routine-schedule/duplicate/${id}`, data);
|
|
1932
|
+
},
|
|
1933
|
+
putEditRoutineSchedule: (id, data) => {
|
|
1934
|
+
return API$5.put(`/routine-schedule/${id}`, data);
|
|
1935
|
+
},
|
|
1936
|
+
getUserStaff: (params) => {
|
|
1937
|
+
return API$5.get("/user-transaction-role/maintenance-role/staff", { params });
|
|
1938
|
+
},
|
|
1939
|
+
getUserStaffOptions: (params) => {
|
|
1940
|
+
return API$5.get("/user-transaction-role/maintenance-role/staff/options", {
|
|
1941
|
+
params
|
|
1942
|
+
});
|
|
1943
|
+
},
|
|
1944
|
+
getRoutineScheduleDetail: (id) => {
|
|
1945
|
+
return API$5.get(`/routine-schedule/${id}`);
|
|
1946
|
+
},
|
|
1947
|
+
deleteRoutineSchedule: (id) => {
|
|
1948
|
+
return API$5.delete("/routine-schedule/bulk-delete", {
|
|
1949
|
+
params: {
|
|
1950
|
+
id: JSON.stringify(id)
|
|
1951
|
+
}
|
|
1952
|
+
});
|
|
1953
|
+
},
|
|
1954
|
+
putRoutineTaskCancel: (id) => {
|
|
1955
|
+
return API$5.put("/routine-task/cancel", { id });
|
|
1956
|
+
},
|
|
1957
|
+
getMaintainableAsset: (params) => {
|
|
1958
|
+
return API$5.get("/maintenable-asset", { params });
|
|
1959
|
+
},
|
|
1960
|
+
getMaintainableAssetOptions: (params) => {
|
|
1961
|
+
return API$5.get("/maintenable-asset/options", { params });
|
|
1962
|
+
},
|
|
1963
|
+
getMaintenanceHistory: (params) => {
|
|
1964
|
+
return API$5.get("/routine-task/history", { params });
|
|
1965
|
+
},
|
|
1966
|
+
getMaintenanceHistoryOptions: (params) => {
|
|
1967
|
+
return API$5.get("/routine-task/history/options", { params });
|
|
1968
|
+
},
|
|
1969
|
+
getActiveAsset: (id) => {
|
|
1970
|
+
return API$5.get(`/routine-schedule/${id}/assets`);
|
|
1971
|
+
},
|
|
1972
|
+
getActiveAssetOptions: (id, params) => {
|
|
1973
|
+
return API$5.get(`/routine-schedule/${id}/assets/options`, { params });
|
|
1974
|
+
},
|
|
1975
|
+
getRoutineTaskDetail: (id) => {
|
|
1976
|
+
return API$5.get(`/routine-task/${id}/detail`);
|
|
1977
|
+
},
|
|
1978
|
+
getApproverList: (id, approvalRound) => {
|
|
1979
|
+
return API$5.get(`/routine-task/${id}/approval-history`, {
|
|
1980
|
+
params: {
|
|
1981
|
+
approvalRound
|
|
1982
|
+
}
|
|
1983
|
+
});
|
|
1984
|
+
},
|
|
1985
|
+
getReviewerList: (id) => {
|
|
1986
|
+
return API$5.get(`/routine-task/${id}/review-history`);
|
|
1987
|
+
},
|
|
1988
|
+
getMaintainableAssetDetail: (id) => {
|
|
1989
|
+
return API$5.get(`/maintenable-asset/${id}`);
|
|
1990
|
+
},
|
|
1991
|
+
putSetActiveTasks: (id, isActive) => {
|
|
1992
|
+
return API$5.put(`/maintenable-asset/${id}/set-tasks-active`, {
|
|
1993
|
+
isActive
|
|
1994
|
+
});
|
|
1995
|
+
},
|
|
1996
|
+
putAssignStaff: (routineId, staffId) => {
|
|
1997
|
+
return API$5.put(`/routine-task/${routineId}/assign-staff`, {
|
|
1998
|
+
id: staffId
|
|
1999
|
+
});
|
|
2000
|
+
},
|
|
2001
|
+
getServiceCenter: () => {
|
|
2002
|
+
return API$5.get("/service-center/dropdown");
|
|
2003
|
+
},
|
|
2004
|
+
putCompleteRoutineTask: (id, data) => {
|
|
2005
|
+
const headers = { "Content-Type": "multipart/form-data" };
|
|
2006
|
+
return API$5.put(`/routine-task/${id}/completion`, data, { headers });
|
|
2007
|
+
},
|
|
2008
|
+
getApprovalDetail: (id) => {
|
|
2009
|
+
return API$5.get(`/approval/${id}`);
|
|
2010
|
+
},
|
|
2011
|
+
putApprovalApprove: (id, data) => {
|
|
2012
|
+
return API$5.put(`/approval/${id}/approve`, data);
|
|
2013
|
+
},
|
|
2014
|
+
putReviewRoutine: (id, data) => {
|
|
2015
|
+
return API$5.put(`/routine-task/${id}/review`, data);
|
|
2016
|
+
},
|
|
2017
|
+
putUpdateRoutineTask: (id, data) => {
|
|
2018
|
+
return API$5.put(`/routine-task/${id}/handle-overdue`, data);
|
|
1902
2019
|
}
|
|
1903
2020
|
});
|
|
1904
2021
|
const API$4 = createAxiosInstance({
|
package/package.json
CHANGED
|
@@ -10,3 +10,52 @@ export interface SetActiveRoutineDto {
|
|
|
10
10
|
isActive: boolean;
|
|
11
11
|
id: (string | undefined)[];
|
|
12
12
|
}
|
|
13
|
+
export interface PostCreateScheduleDTO {
|
|
14
|
+
taskName: string;
|
|
15
|
+
nextSchedule: Date | string | number;
|
|
16
|
+
frequency: {
|
|
17
|
+
label: string;
|
|
18
|
+
customValue: number;
|
|
19
|
+
customUnit: string;
|
|
20
|
+
};
|
|
21
|
+
duration: number;
|
|
22
|
+
maintenanceIndicator: string;
|
|
23
|
+
assetNames: {
|
|
24
|
+
_id: string;
|
|
25
|
+
group: string;
|
|
26
|
+
}[];
|
|
27
|
+
staff?: string[];
|
|
28
|
+
}
|
|
29
|
+
export interface PutEditScheduleDTO {
|
|
30
|
+
taskName: string;
|
|
31
|
+
nextSchedule: Date | string;
|
|
32
|
+
frequency: {
|
|
33
|
+
label: string;
|
|
34
|
+
customValue: number;
|
|
35
|
+
customUnit: string;
|
|
36
|
+
};
|
|
37
|
+
duration: number;
|
|
38
|
+
maintenanceIndicator: string;
|
|
39
|
+
staff?: string[];
|
|
40
|
+
}
|
|
41
|
+
export interface PutCompleteRoutineTaskDTO {
|
|
42
|
+
notes?: string;
|
|
43
|
+
maintenanceIndicator: string;
|
|
44
|
+
serviceCenterId?: string;
|
|
45
|
+
totalAdditionalCost?: {
|
|
46
|
+
currency: string;
|
|
47
|
+
value: number;
|
|
48
|
+
};
|
|
49
|
+
maintenanceImage?: File;
|
|
50
|
+
paymentProof?: File;
|
|
51
|
+
serialNumber: string;
|
|
52
|
+
}
|
|
53
|
+
export interface PutUpdateRoutineTaskDTO {
|
|
54
|
+
action: string;
|
|
55
|
+
duration?: number;
|
|
56
|
+
notes?: string;
|
|
57
|
+
}
|
|
58
|
+
export interface PutRoutineApprovalDTO {
|
|
59
|
+
isApproved: boolean;
|
|
60
|
+
notes?: string;
|
|
61
|
+
}
|
|
@@ -1,11 +1,45 @@
|
|
|
1
1
|
import { AxiosResponse } from 'axios';
|
|
2
2
|
import { GetAssetMaintenanceOptionBoolean, GetAssetMaintenanceOptionFilter } from '../dto/assetDetail.dto';
|
|
3
|
-
import { AssetMaintenanceFilterParams, SetActiveRoutineDto } from '../dto/maintenanceRoutine.dto';
|
|
4
|
-
import { FetchListResponse, FetchOptionResponse } from '../types/fetchResponse.type';
|
|
5
|
-
import { MaintenanceType } from '../types/maintenanceRoutine.type';
|
|
3
|
+
import { AssetMaintenanceFilterParams, PostCreateScheduleDTO, PutCompleteRoutineTaskDTO, PutEditScheduleDTO, PutRoutineApprovalDTO, PutUpdateRoutineTaskDTO, SetActiveRoutineDto } from '../dto/maintenanceRoutine.dto';
|
|
4
|
+
import { FetchListResponse, FetchOptionResponse, QueryParams } from '../types/fetchResponse.type';
|
|
5
|
+
import { AssetNameResponse, LoadingFilters, MaintainableAssetDetailResponse, MaintenanceType, RoutineApprovalResponse, RoutineScheduleDetailResponse, RoutineScheduleResponse, RoutineTaskDetailResponse, RoutineTaskResponse, ScheduleActiveAssetResponse } from '../types/maintenanceRoutine.type';
|
|
6
6
|
declare const RoutineServices: {
|
|
7
7
|
getMaintenance: (assetId?: string, params?: AssetMaintenanceFilterParams) => Promise<AxiosResponse<FetchListResponse<MaintenanceType>>>;
|
|
8
8
|
getMaintenanceOption: (assetId?: string, params?: GetAssetMaintenanceOptionBoolean) => Promise<AxiosResponse<FetchOptionResponse<GetAssetMaintenanceOptionFilter>>>;
|
|
9
9
|
putSetActive: (body: SetActiveRoutineDto) => Promise<AxiosResponse>;
|
|
10
|
+
getRoutineTask: (params: QueryParams) => Promise<AxiosResponse<RoutineTaskResponse>>;
|
|
11
|
+
getRoutineTaskOptions: (params: LoadingFilters) => Promise<AxiosResponse>;
|
|
12
|
+
getRoutineSchedule: (params: QueryParams) => Promise<AxiosResponse<RoutineScheduleResponse>>;
|
|
13
|
+
getRoutineScheduleOptions: (params: LoadingFilters) => Promise<AxiosResponse>;
|
|
14
|
+
getRoutineTaskEventLog: (params: QueryParams) => Promise<AxiosResponse>;
|
|
15
|
+
getRoutineTaskEventLogOptions: (params: LoadingFilters) => Promise<AxiosResponse>;
|
|
16
|
+
getAssetName: (params: QueryParams) => Promise<AxiosResponse<AssetNameResponse>>;
|
|
17
|
+
getAssetNameOptions: (params: LoadingFilters) => Promise<AxiosResponse>;
|
|
18
|
+
postCreateRoutineSchedule: (data: PostCreateScheduleDTO) => Promise<AxiosResponse>;
|
|
19
|
+
postDuplicateRoutineSchedule: (id: string, data: PostCreateScheduleDTO) => Promise<AxiosResponse>;
|
|
20
|
+
putEditRoutineSchedule: (id: string, data: PutEditScheduleDTO) => Promise<AxiosResponse>;
|
|
21
|
+
getUserStaff: (params: QueryParams) => Promise<AxiosResponse>;
|
|
22
|
+
getUserStaffOptions: (params: QueryParams) => Promise<AxiosResponse>;
|
|
23
|
+
getRoutineScheduleDetail: (id: string) => Promise<AxiosResponse<RoutineScheduleDetailResponse>>;
|
|
24
|
+
deleteRoutineSchedule: (id: string[]) => Promise<AxiosResponse>;
|
|
25
|
+
putRoutineTaskCancel: (id: string[]) => Promise<AxiosResponse>;
|
|
26
|
+
getMaintainableAsset: (params: QueryParams) => Promise<AxiosResponse>;
|
|
27
|
+
getMaintainableAssetOptions: (params: LoadingFilters) => Promise<AxiosResponse>;
|
|
28
|
+
getMaintenanceHistory: (params: QueryParams) => Promise<AxiosResponse>;
|
|
29
|
+
getMaintenanceHistoryOptions: (params: LoadingFilters) => Promise<AxiosResponse>;
|
|
30
|
+
getActiveAsset: (id: string) => Promise<AxiosResponse<ScheduleActiveAssetResponse>>;
|
|
31
|
+
getActiveAssetOptions: (id: string, params: LoadingFilters) => Promise<AxiosResponse>;
|
|
32
|
+
getRoutineTaskDetail: (id: string) => Promise<AxiosResponse<RoutineTaskDetailResponse>>;
|
|
33
|
+
getApproverList: (id: string, approvalRound: number) => Promise<AxiosResponse>;
|
|
34
|
+
getReviewerList: (id: string) => Promise<AxiosResponse>;
|
|
35
|
+
getMaintainableAssetDetail: (id: string) => Promise<AxiosResponse<MaintainableAssetDetailResponse>>;
|
|
36
|
+
putSetActiveTasks: (id: string, isActive: boolean) => Promise<AxiosResponse>;
|
|
37
|
+
putAssignStaff: (routineId: string, staffId: string[]) => Promise<AxiosResponse>;
|
|
38
|
+
getServiceCenter: () => Promise<AxiosResponse>;
|
|
39
|
+
putCompleteRoutineTask: (id: string, data: PutCompleteRoutineTaskDTO) => Promise<AxiosResponse>;
|
|
40
|
+
getApprovalDetail: (id: string) => Promise<AxiosResponse<RoutineApprovalResponse>>;
|
|
41
|
+
putApprovalApprove: (id: string, data: PutRoutineApprovalDTO) => Promise<AxiosResponse>;
|
|
42
|
+
putReviewRoutine: (id: string, data: PutRoutineApprovalDTO) => Promise<AxiosResponse>;
|
|
43
|
+
putUpdateRoutineTask: (id: string, data: PutUpdateRoutineTaskDTO) => Promise<AxiosResponse>;
|
|
10
44
|
};
|
|
11
45
|
export default RoutineServices;
|
|
@@ -8,3 +8,427 @@ export type MaintenanceType = {
|
|
|
8
8
|
nextSchedule?: Date;
|
|
9
9
|
assetSchedule?: string;
|
|
10
10
|
};
|
|
11
|
+
type CommonResponse = {
|
|
12
|
+
status: number;
|
|
13
|
+
message: string;
|
|
14
|
+
};
|
|
15
|
+
type DataResponse<T> = CommonResponse & {
|
|
16
|
+
data: {
|
|
17
|
+
data: T[];
|
|
18
|
+
totalRecords: number;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
type AssetName = {
|
|
22
|
+
_id: string;
|
|
23
|
+
totalAssets: number;
|
|
24
|
+
name: {
|
|
25
|
+
_id: string;
|
|
26
|
+
name: string;
|
|
27
|
+
key: number;
|
|
28
|
+
};
|
|
29
|
+
group: {
|
|
30
|
+
_id: string;
|
|
31
|
+
name: string;
|
|
32
|
+
key: number;
|
|
33
|
+
fullPath: string;
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
export type RoutineTaskResponse = DataResponse<RoutineTask>;
|
|
37
|
+
export type RoutineScheduleResponse = DataResponse<RoutineSchedule>;
|
|
38
|
+
export type AssetNameResponse = DataResponse<AssetName>;
|
|
39
|
+
export type RoutineScheduleDetailResponse = CommonResponse & {
|
|
40
|
+
data: RoutineScheduleDetail;
|
|
41
|
+
};
|
|
42
|
+
export type ScheduleActiveAssetResponse = DataResponse<ScheduleActiveAsset>;
|
|
43
|
+
export type RoutineTaskDetailResponse = CommonResponse & {
|
|
44
|
+
data: RoutineTaskDetail;
|
|
45
|
+
};
|
|
46
|
+
export type MaintainableAssetDetailResponse = CommonResponse & {
|
|
47
|
+
data: MaintainableAssetDetail;
|
|
48
|
+
};
|
|
49
|
+
export type RoutineApprovalResponse = CommonResponse & {
|
|
50
|
+
data: RoutineApproval;
|
|
51
|
+
};
|
|
52
|
+
export type RoutineTaskStatus = 'On Schedule' | 'Waiting for Assignment' | 'Under Maintenance' | 'Waiting for Review' | 'Waiting for Approval' | 'Overdue';
|
|
53
|
+
export type RoutineTaskTransactionLog = {
|
|
54
|
+
_id: string;
|
|
55
|
+
type: string;
|
|
56
|
+
transaction: string;
|
|
57
|
+
transactionId: string;
|
|
58
|
+
action: string;
|
|
59
|
+
userId: string;
|
|
60
|
+
userFullName: string;
|
|
61
|
+
detail: {
|
|
62
|
+
notes?: string;
|
|
63
|
+
};
|
|
64
|
+
createdAt: Date | string;
|
|
65
|
+
updatedAt: Date | string;
|
|
66
|
+
};
|
|
67
|
+
export type RoutineTask = {
|
|
68
|
+
_id: string;
|
|
69
|
+
assetName: {
|
|
70
|
+
_id: string;
|
|
71
|
+
nameWithSequence: string;
|
|
72
|
+
name: string;
|
|
73
|
+
key: number;
|
|
74
|
+
};
|
|
75
|
+
assetBrand: {
|
|
76
|
+
_id: string;
|
|
77
|
+
name: string;
|
|
78
|
+
key: number;
|
|
79
|
+
};
|
|
80
|
+
assetModel: {
|
|
81
|
+
_id: string;
|
|
82
|
+
name: string;
|
|
83
|
+
key: number;
|
|
84
|
+
};
|
|
85
|
+
assetGroup: {
|
|
86
|
+
_id: string;
|
|
87
|
+
name: string;
|
|
88
|
+
key: number;
|
|
89
|
+
};
|
|
90
|
+
assetImageSmall?: string;
|
|
91
|
+
assetImageMedium?: string;
|
|
92
|
+
assetImageBig?: string;
|
|
93
|
+
taskName: string;
|
|
94
|
+
status: RoutineTaskStatus;
|
|
95
|
+
updatedAt: Date | string;
|
|
96
|
+
isManager: boolean;
|
|
97
|
+
isStaff: boolean;
|
|
98
|
+
isMonitoring: boolean;
|
|
99
|
+
asset: string;
|
|
100
|
+
};
|
|
101
|
+
export type RoutineTaskDetail = {
|
|
102
|
+
request: {
|
|
103
|
+
_id: string;
|
|
104
|
+
assetName: {
|
|
105
|
+
_id: string;
|
|
106
|
+
nameWithSequence: string;
|
|
107
|
+
name: string;
|
|
108
|
+
key: number;
|
|
109
|
+
};
|
|
110
|
+
assetBrand: {
|
|
111
|
+
_id: string;
|
|
112
|
+
name: string;
|
|
113
|
+
key: number;
|
|
114
|
+
};
|
|
115
|
+
assetModel: {
|
|
116
|
+
_id: string;
|
|
117
|
+
name: string;
|
|
118
|
+
key: number;
|
|
119
|
+
};
|
|
120
|
+
assetGroup: {
|
|
121
|
+
_id: string;
|
|
122
|
+
name: string;
|
|
123
|
+
key: number;
|
|
124
|
+
};
|
|
125
|
+
status: MaintenanceHistoryStatus | RoutineTaskStatus | 'Finished Approval' | 'Need Approval';
|
|
126
|
+
schedule: string;
|
|
127
|
+
taskName: string;
|
|
128
|
+
maintenanceIndicator: MaintenanceIndicator[];
|
|
129
|
+
staff: [
|
|
130
|
+
{
|
|
131
|
+
_id: string;
|
|
132
|
+
fullName: string;
|
|
133
|
+
key: number;
|
|
134
|
+
}
|
|
135
|
+
];
|
|
136
|
+
asset: string;
|
|
137
|
+
assetQr: boolean;
|
|
138
|
+
assetRfid: boolean;
|
|
139
|
+
createdAt: Date | string;
|
|
140
|
+
updatedAt: Date | string;
|
|
141
|
+
additionalCost: {
|
|
142
|
+
currency: string;
|
|
143
|
+
totalPrice: number;
|
|
144
|
+
paymentProof: string;
|
|
145
|
+
};
|
|
146
|
+
maintenanceImageBig: string;
|
|
147
|
+
maintenanceImageMedium: string;
|
|
148
|
+
maintenanceImageSmall: string;
|
|
149
|
+
notes: string;
|
|
150
|
+
serviceCenterId: string;
|
|
151
|
+
serviceCenterName: string;
|
|
152
|
+
duration: number;
|
|
153
|
+
assetCategory: {
|
|
154
|
+
_id: string;
|
|
155
|
+
name: string;
|
|
156
|
+
key: number;
|
|
157
|
+
};
|
|
158
|
+
warrantyEndDate: Date | string;
|
|
159
|
+
assetStatus: string;
|
|
160
|
+
assetId: string;
|
|
161
|
+
isManager: boolean;
|
|
162
|
+
isStaff: boolean;
|
|
163
|
+
tagReported?: {
|
|
164
|
+
rfid: boolean;
|
|
165
|
+
qr: boolean;
|
|
166
|
+
};
|
|
167
|
+
approvalRound: number;
|
|
168
|
+
};
|
|
169
|
+
logs: RoutineTaskTransactionLog[];
|
|
170
|
+
};
|
|
171
|
+
export type RoutineSchedule = {
|
|
172
|
+
_id: string;
|
|
173
|
+
taskName: string;
|
|
174
|
+
assetName: {
|
|
175
|
+
_id: string;
|
|
176
|
+
name: string;
|
|
177
|
+
key: number;
|
|
178
|
+
};
|
|
179
|
+
assetGroup: {
|
|
180
|
+
_id: string;
|
|
181
|
+
name: string;
|
|
182
|
+
key: number;
|
|
183
|
+
};
|
|
184
|
+
frequency: {
|
|
185
|
+
label: string;
|
|
186
|
+
};
|
|
187
|
+
nextSchedule: Date | string;
|
|
188
|
+
modifiedBy: {
|
|
189
|
+
_id: string;
|
|
190
|
+
fullName: string;
|
|
191
|
+
key: number;
|
|
192
|
+
};
|
|
193
|
+
maintainableAssets: number;
|
|
194
|
+
activeAssets: number;
|
|
195
|
+
updatedAt: Date | string;
|
|
196
|
+
};
|
|
197
|
+
export type RoutineScheduleDetail = {
|
|
198
|
+
assetName: {
|
|
199
|
+
_id: string;
|
|
200
|
+
name: string;
|
|
201
|
+
key: number;
|
|
202
|
+
};
|
|
203
|
+
assetGroup: {
|
|
204
|
+
_id: string;
|
|
205
|
+
name: string;
|
|
206
|
+
key: number;
|
|
207
|
+
fullPath: string;
|
|
208
|
+
};
|
|
209
|
+
frequency: {
|
|
210
|
+
label: string;
|
|
211
|
+
};
|
|
212
|
+
createdBy: {
|
|
213
|
+
_id: string;
|
|
214
|
+
fullName: string;
|
|
215
|
+
key: number;
|
|
216
|
+
};
|
|
217
|
+
modifiedBy: {
|
|
218
|
+
_id: string;
|
|
219
|
+
fullName: string;
|
|
220
|
+
key: number;
|
|
221
|
+
};
|
|
222
|
+
_id: string;
|
|
223
|
+
taskName: string;
|
|
224
|
+
nextSchedule: Date | string;
|
|
225
|
+
duration: number;
|
|
226
|
+
maintenanceIndicator: MaintenanceIndicator[];
|
|
227
|
+
staff: {
|
|
228
|
+
_id: string;
|
|
229
|
+
fullName: string;
|
|
230
|
+
key: number;
|
|
231
|
+
}[];
|
|
232
|
+
createdAt: Date | string;
|
|
233
|
+
updatedAt: Date | string;
|
|
234
|
+
};
|
|
235
|
+
export type EventLog = {
|
|
236
|
+
createdAt: Date | string;
|
|
237
|
+
action: string;
|
|
238
|
+
nameWithSequence: string;
|
|
239
|
+
task: string;
|
|
240
|
+
group: string;
|
|
241
|
+
modifiedBy: string;
|
|
242
|
+
};
|
|
243
|
+
export type Staff = {
|
|
244
|
+
_id: string;
|
|
245
|
+
user: {
|
|
246
|
+
_id: string;
|
|
247
|
+
fullName: string;
|
|
248
|
+
key: number;
|
|
249
|
+
};
|
|
250
|
+
group: {
|
|
251
|
+
_id: string;
|
|
252
|
+
name: string;
|
|
253
|
+
key: number;
|
|
254
|
+
};
|
|
255
|
+
profilePictureSmall: string;
|
|
256
|
+
profilePictureMedium: string;
|
|
257
|
+
profilePictureBig: string;
|
|
258
|
+
employeeId: string;
|
|
259
|
+
email: string;
|
|
260
|
+
phoneNumber: string;
|
|
261
|
+
position: string;
|
|
262
|
+
division: string;
|
|
263
|
+
};
|
|
264
|
+
export type IndicatorType = 'Selection' | 'Single Value' | 'Range Value';
|
|
265
|
+
export type DataType = 'Text' | 'Number';
|
|
266
|
+
export type MaintenanceIndicator = {
|
|
267
|
+
_id?: string;
|
|
268
|
+
name: string;
|
|
269
|
+
indicatorType: IndicatorType;
|
|
270
|
+
dataType: DataType;
|
|
271
|
+
isMandatory: boolean;
|
|
272
|
+
isHaveStandardValue: boolean;
|
|
273
|
+
options?: (string | undefined)[];
|
|
274
|
+
/**
|
|
275
|
+
* Stringified array [standard1, standard2]
|
|
276
|
+
*/
|
|
277
|
+
standard?: string;
|
|
278
|
+
measurement: string;
|
|
279
|
+
standardType?: 'Single Value' | 'Range Value';
|
|
280
|
+
standardValue?: string | number;
|
|
281
|
+
minStandardValue?: string | number;
|
|
282
|
+
maxStandardValue?: string | number;
|
|
283
|
+
optionsKey?: (string | number)[];
|
|
284
|
+
isSingleText: boolean;
|
|
285
|
+
isSingleNumber: boolean;
|
|
286
|
+
isRangeNumber: boolean;
|
|
287
|
+
isSelection: boolean;
|
|
288
|
+
value?: string | number;
|
|
289
|
+
minValue?: number;
|
|
290
|
+
maxValue?: number;
|
|
291
|
+
standardLabel?: string;
|
|
292
|
+
};
|
|
293
|
+
type ScheduleActiveAsset = {
|
|
294
|
+
_id: string;
|
|
295
|
+
assetName: {
|
|
296
|
+
_id: string;
|
|
297
|
+
name: string;
|
|
298
|
+
nameWithSequence: string;
|
|
299
|
+
key: number;
|
|
300
|
+
};
|
|
301
|
+
assetBrand: {
|
|
302
|
+
_id: string;
|
|
303
|
+
name: string;
|
|
304
|
+
key: number;
|
|
305
|
+
};
|
|
306
|
+
assetModel: {
|
|
307
|
+
_id: string;
|
|
308
|
+
name: string;
|
|
309
|
+
key: number;
|
|
310
|
+
};
|
|
311
|
+
isActive: boolean;
|
|
312
|
+
isActiveStr: string;
|
|
313
|
+
updatedAt: Date | string;
|
|
314
|
+
imageSmall: string;
|
|
315
|
+
imageMedium: string;
|
|
316
|
+
imageBig: string;
|
|
317
|
+
};
|
|
318
|
+
export type MaintenanceHistoryStatus = 'Completed' | 'Canceled' | 'Reported Damaged' | 'Stopped';
|
|
319
|
+
export type MaintainableAssetDetail = {
|
|
320
|
+
detail: {
|
|
321
|
+
name: {
|
|
322
|
+
_id: string;
|
|
323
|
+
nameWithSequence: string;
|
|
324
|
+
name: string;
|
|
325
|
+
key: number;
|
|
326
|
+
aliasCode: string;
|
|
327
|
+
};
|
|
328
|
+
qr: boolean;
|
|
329
|
+
rfid: boolean;
|
|
330
|
+
group: {
|
|
331
|
+
_id: string;
|
|
332
|
+
name: string;
|
|
333
|
+
fullPath: string;
|
|
334
|
+
key: number;
|
|
335
|
+
};
|
|
336
|
+
_id: string;
|
|
337
|
+
assetId: string;
|
|
338
|
+
imageSmall: string;
|
|
339
|
+
imageBig: string;
|
|
340
|
+
imageMedium: string;
|
|
341
|
+
};
|
|
342
|
+
allTask: number;
|
|
343
|
+
activeTask: number;
|
|
344
|
+
tasks: {
|
|
345
|
+
frequency: {
|
|
346
|
+
label: string;
|
|
347
|
+
};
|
|
348
|
+
_id: string;
|
|
349
|
+
schedule: string;
|
|
350
|
+
task: string;
|
|
351
|
+
taskName: string;
|
|
352
|
+
isActive: boolean;
|
|
353
|
+
nextSchedule: Date | string;
|
|
354
|
+
maintenanceIndicator: MaintenanceIndicator[];
|
|
355
|
+
}[];
|
|
356
|
+
};
|
|
357
|
+
export type RoutineApproval = {
|
|
358
|
+
_id: string;
|
|
359
|
+
isApproved: boolean | null;
|
|
360
|
+
notes: string | null;
|
|
361
|
+
routine: {
|
|
362
|
+
_id: string;
|
|
363
|
+
assetName: {
|
|
364
|
+
_id: string;
|
|
365
|
+
nameWithSequence: string;
|
|
366
|
+
name: string;
|
|
367
|
+
key: number;
|
|
368
|
+
};
|
|
369
|
+
assetBrand: {
|
|
370
|
+
_id: string;
|
|
371
|
+
name: string;
|
|
372
|
+
key: number;
|
|
373
|
+
};
|
|
374
|
+
assetModel: {
|
|
375
|
+
_id: string;
|
|
376
|
+
name: string;
|
|
377
|
+
key: number;
|
|
378
|
+
};
|
|
379
|
+
assetGroup: {
|
|
380
|
+
_id: string;
|
|
381
|
+
name: string;
|
|
382
|
+
key: number;
|
|
383
|
+
};
|
|
384
|
+
status: string;
|
|
385
|
+
taskName: string;
|
|
386
|
+
maintenanceIndicator: MaintenanceIndicator[];
|
|
387
|
+
createdAt: Date | string;
|
|
388
|
+
updatedAt: Date | string;
|
|
389
|
+
additionalCost: {
|
|
390
|
+
currency?: string | null;
|
|
391
|
+
totalPrice: number | null;
|
|
392
|
+
paymentProof?: string | null;
|
|
393
|
+
};
|
|
394
|
+
serviceCenterId?: string | null;
|
|
395
|
+
serviceCenterName?: string | null;
|
|
396
|
+
assetImageBig?: string | null;
|
|
397
|
+
assetImageMedium?: string | null;
|
|
398
|
+
assetImageSmall?: string | null;
|
|
399
|
+
maintenanceImageBig?: string | null;
|
|
400
|
+
maintenanceImageMedium?: string | null;
|
|
401
|
+
maintenanceImageSmall?: string | null;
|
|
402
|
+
assetAliasCode?: string | null;
|
|
403
|
+
assetId: string;
|
|
404
|
+
assetCategory: {
|
|
405
|
+
_id: string;
|
|
406
|
+
name: string;
|
|
407
|
+
fullPath: string;
|
|
408
|
+
key: number;
|
|
409
|
+
};
|
|
410
|
+
warrantyEndDate?: Date | string | null;
|
|
411
|
+
assetStatus: string;
|
|
412
|
+
asset: string;
|
|
413
|
+
};
|
|
414
|
+
};
|
|
415
|
+
export type LoadingFilters = {
|
|
416
|
+
assetGroupOptions?: boolean;
|
|
417
|
+
assetGroupOption?: boolean;
|
|
418
|
+
assetNameOption?: boolean;
|
|
419
|
+
assetNameOptions?: boolean;
|
|
420
|
+
assetBrandOption?: boolean;
|
|
421
|
+
assetModelOption?: boolean;
|
|
422
|
+
actionOptions?: boolean;
|
|
423
|
+
taskNameOptions?: boolean;
|
|
424
|
+
modifiedByOptions?: boolean;
|
|
425
|
+
nameOptions?: boolean;
|
|
426
|
+
brandOptions?: boolean;
|
|
427
|
+
modelOptions?: boolean;
|
|
428
|
+
assetBrandOptions?: boolean;
|
|
429
|
+
assetModelOptions?: boolean;
|
|
430
|
+
groupOptions?: boolean;
|
|
431
|
+
positionOptions?: boolean;
|
|
432
|
+
divisionOptions?: boolean;
|
|
433
|
+
};
|
|
434
|
+
export {};
|
|
@@ -6,7 +6,7 @@ export type NotificationItemType = {
|
|
|
6
6
|
isManager?: boolean;
|
|
7
7
|
isRead: boolean;
|
|
8
8
|
isReadOnly: boolean;
|
|
9
|
-
module: 'Borrow' | 'Assignment' | 'Transfer' | 'Disposal' | 'Audit' | 'Maintenance Routine' | 'Repair Ticketing' | 'Tracking' | 'TAG' | 'General Asset';
|
|
9
|
+
module: 'Borrow' | 'Assignment' | 'Transfer' | 'Disposal' | 'Audit' | 'Maintenance Routine' | 'Damage' | 'Missing' | 'Repair Ticketing' | 'Tracking' | 'TAG' | 'General Asset';
|
|
10
10
|
severity: string;
|
|
11
11
|
type: string;
|
|
12
12
|
data: {
|