fix: alter message when inDutyCnt === 0
parent
fc9347e7c1
commit
669896d253
|
|
@ -124,7 +124,13 @@ export class DutyInfo extends Component {
|
|||
moment(data.otherDutyEnd).format('H:mm')
|
||||
: id.currentDutyText(data.currentDuty || 'off'),
|
||||
},
|
||||
{ title: id.inDutyCnt(data.inDutyCnt as number) },
|
||||
{
|
||||
title: id.inDutyCnt(
|
||||
data.inDutyCnt === 0
|
||||
? pt.get().common.zeroMemberOnDuty
|
||||
: data.inDutyCnt.toString(),
|
||||
),
|
||||
},
|
||||
]}
|
||||
/>
|
||||
</View>
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ export interface MainPageText {
|
|||
inDuty: {
|
||||
title: string;
|
||||
currentDutyText: (c: 'off' | '0' | '1' | '2' | '3' | 'others') => string;
|
||||
inDutyCnt: (n: number) => string;
|
||||
inDutyCnt: (n: string) => string;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ export interface CommonText {
|
|||
offDutyReason: string;
|
||||
place: string;
|
||||
dutyRecoverTime: string;
|
||||
zeroMemberOnDuty: string;
|
||||
}
|
||||
|
||||
export const commonTextZhCn: CommonText = {
|
||||
|
|
@ -14,6 +15,7 @@ export const commonTextZhCn: CommonText = {
|
|||
offDutyReason: '正常值班下班',
|
||||
place: '204',
|
||||
dutyRecoverTime: '明天 13:30',
|
||||
zeroMemberOnDuty: '待更新',
|
||||
};
|
||||
|
||||
export const commonTextEnUs: CommonText = {
|
||||
|
|
@ -23,4 +25,5 @@ export const commonTextEnUs: CommonText = {
|
|||
offDutyReason: 'Normal Shift',
|
||||
place: 'E3-204',
|
||||
dutyRecoverTime: 'Tomorrow 13:30',
|
||||
zeroMemberOnDuty: 'Wait for update',
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in New Issue