add other duty time display with mock
This commit is contained in:
@@ -12,6 +12,7 @@ export class DutyData {
|
||||
this.isInDuty = false;
|
||||
this.inDutyCnt = 3;
|
||||
this.currentDuty = '2';
|
||||
this.otherDutyTime = '9:30-11:30';
|
||||
this.offDutyReason = '学园维修';
|
||||
this.dutyRecoverTime = '下周一';
|
||||
this.place = '东三-204';
|
||||
@@ -20,6 +21,7 @@ export class DutyData {
|
||||
isInDuty: boolean;
|
||||
inDutyCnt?: number;
|
||||
currentDuty?: 'off' | '1' | '2' | '3' | 'others';
|
||||
otherDutyTime?: string;
|
||||
offDutyReason?: string;
|
||||
dutyRecoverTime?: string;
|
||||
place: string;
|
||||
@@ -101,7 +103,12 @@ export class DutyInfo extends Component {
|
||||
<Card isInDuty={data.isInDuty} place={data.place} />
|
||||
<AtTimeline
|
||||
items={[
|
||||
{ title: id.currentDutyText(data.currentDuty || 'off') },
|
||||
{
|
||||
title:
|
||||
data.currentDuty == 'others'
|
||||
? id.currentDutyText('others') + data.otherDutyTime
|
||||
: id.currentDutyText(data.currentDuty || 'off'),
|
||||
},
|
||||
{ title: id.inDutyCnt(data.inDutyCnt as number) },
|
||||
]}
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user