fix: change dutyinfo api

This commit is contained in:
Dawn1Ocean
2024-04-21 22:59:19 +08:00
parent 9fc19a3ebd
commit a39cef6312
4 changed files with 35 additions and 8 deletions
+1
View File
@@ -26,6 +26,7 @@ const DutyInfo: React.FC = () => {
useEffect(() => {
getDutyInfo()
.then((res) => {
console.log(res.data);
setDutyInfo(res.data);
setLoading(false);
})
+6 -2
View File
@@ -1,10 +1,14 @@
export type Shift = {
name: string;
range: string[];
};
export type Info = {
isNormalDuty: boolean;
inDutyCnt: number;
currentDuty: string;
place: string;
otherDutyStart: string;
otherDutyEnd: string;
otherDutyTime: Shift[];
offDutyReason: string;
dutyRecoverTime: string;
};