@quesmed/types 1.5.5 → 1.5.6
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/models/OsceMarksheet.d.ts +2 -0
- package/models/OsceMarksheet.js +4 -0
- package/models/OsceMarksheet.mjs +4 -0
- package/package.json +1 -1
- package/resolvers/fragments/osce.js +1 -0
- package/resolvers/fragments/osce.mjs +1 -0
- package/resolvers/mutation/restricted/osce.d.ts +2 -2
- package/resolvers/mutation/restricted/osce.js +7 -2
- package/resolvers/mutation/restricted/osce.mjs +7 -2
|
@@ -64,6 +64,7 @@ export interface IOsceMarksheet {
|
|
|
64
64
|
pausedAt: number | Date;
|
|
65
65
|
timeRemaining: string;
|
|
66
66
|
totalStationTime: string;
|
|
67
|
+
stageTime: string;
|
|
67
68
|
stage: EOsceStage;
|
|
68
69
|
marks: IOsceMarksheetMark[];
|
|
69
70
|
users: IOsceMarksheetUser[];
|
|
@@ -97,6 +98,7 @@ export interface IOsceMarksheetTimer {
|
|
|
97
98
|
osceMarksheetId: number;
|
|
98
99
|
timeRemaining: string;
|
|
99
100
|
totalStationTime: string;
|
|
101
|
+
stageTime: string;
|
|
100
102
|
stage: EOsceStage;
|
|
101
103
|
state: EOsceTimerState;
|
|
102
104
|
}
|
package/models/OsceMarksheet.js
CHANGED
|
@@ -46,6 +46,7 @@ function createTimerPayload(osceMarksheet) {
|
|
|
46
46
|
osceMarksheetId: osceMarksheet.id,
|
|
47
47
|
timeRemaining: '00:00',
|
|
48
48
|
totalStationTime: '00:00',
|
|
49
|
+
stageTime: '/00 secs',
|
|
49
50
|
stage: EOsceStage.READING,
|
|
50
51
|
state: EOsceTimerState.PAUSE,
|
|
51
52
|
};
|
|
@@ -85,13 +86,16 @@ function createTimerPayload(osceMarksheet) {
|
|
|
85
86
|
}
|
|
86
87
|
if (timeRemainingDuration > stationDuration - osceMarksheet.readingTime) {
|
|
87
88
|
payload.stage = EOsceStage.READING;
|
|
89
|
+
payload.stageTime = `/${osceMarksheet.readingTime} secs`;
|
|
88
90
|
}
|
|
89
91
|
else if (timeRemainingDuration >
|
|
90
92
|
stationDuration - osceMarksheet.readingTime - osceMarksheet.stationTime * 60) {
|
|
91
93
|
payload.stage = EOsceStage.STATION;
|
|
94
|
+
payload.stageTime = `/${osceMarksheet.stationTime} mins`;
|
|
92
95
|
}
|
|
93
96
|
else {
|
|
94
97
|
payload.stage = EOsceStage.FEEDBACK;
|
|
98
|
+
payload.stageTime = `/${osceMarksheet.feedbackTime} mins`;
|
|
95
99
|
}
|
|
96
100
|
payload.timeRemaining = (0, utils_1.printDuration)(timeRemainingDuration);
|
|
97
101
|
return payload;
|
package/models/OsceMarksheet.mjs
CHANGED
|
@@ -43,6 +43,7 @@ export function createTimerPayload(osceMarksheet) {
|
|
|
43
43
|
osceMarksheetId: osceMarksheet.id,
|
|
44
44
|
timeRemaining: '00:00',
|
|
45
45
|
totalStationTime: '00:00',
|
|
46
|
+
stageTime: '/00 secs',
|
|
46
47
|
stage: EOsceStage.READING,
|
|
47
48
|
state: EOsceTimerState.PAUSE,
|
|
48
49
|
};
|
|
@@ -82,13 +83,16 @@ export function createTimerPayload(osceMarksheet) {
|
|
|
82
83
|
}
|
|
83
84
|
if (timeRemainingDuration > stationDuration - osceMarksheet.readingTime) {
|
|
84
85
|
payload.stage = EOsceStage.READING;
|
|
86
|
+
payload.stageTime = `/${osceMarksheet.readingTime} secs`;
|
|
85
87
|
}
|
|
86
88
|
else if (timeRemainingDuration >
|
|
87
89
|
stationDuration - osceMarksheet.readingTime - osceMarksheet.stationTime * 60) {
|
|
88
90
|
payload.stage = EOsceStage.STATION;
|
|
91
|
+
payload.stageTime = `/${osceMarksheet.stationTime} mins`;
|
|
89
92
|
}
|
|
90
93
|
else {
|
|
91
94
|
payload.stage = EOsceStage.FEEDBACK;
|
|
95
|
+
payload.stageTime = `/${osceMarksheet.feedbackTime} mins`;
|
|
92
96
|
}
|
|
93
97
|
payload.timeRemaining = printDuration(timeRemainingDuration);
|
|
94
98
|
return payload;
|
package/package.json
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { EOsceMarksheetAction, EOsceRoles, Id, IOsceMarksheet, IOsceMarksheetMark
|
|
1
|
+
import { EOsceMarksheetAction, EOsceRoles, Id, IOsceMarksheet, IOsceMarksheetMark } from '../../../models';
|
|
2
2
|
import { IOsceMatchmakingAction } from '../../subscription/osce';
|
|
3
3
|
import { graphqlNormalize, RestrictedData } from '../../types';
|
|
4
4
|
export declare const START_OSCE_MATCHMAKING: import("@apollo/client").DocumentNode;
|
|
@@ -54,7 +54,7 @@ export declare const START_OSCE_TIMER: import("@apollo/client").DocumentNode;
|
|
|
54
54
|
export interface IStartOsceTimerVar {
|
|
55
55
|
osceMarksheetId: Id;
|
|
56
56
|
}
|
|
57
|
-
export declare type IStartOsceTimerData = RestrictedData<graphqlNormalize &
|
|
57
|
+
export declare type IStartOsceTimerData = RestrictedData<graphqlNormalize & IOsceMarksheet, 'startOsceTimer'>;
|
|
58
58
|
export declare const PRESTART_OSCE_MARKSHEET: import("@apollo/client").DocumentNode;
|
|
59
59
|
export interface IPrestartOsceMarksheetVar {
|
|
60
60
|
osceMarksheetId: Id;
|
|
@@ -130,9 +130,12 @@ exports.START_OSCE_TIMER = (0, client_1.gql) `
|
|
|
130
130
|
mutation StartOsceTimer($osceMarksheetId: Int!) {
|
|
131
131
|
restricted {
|
|
132
132
|
startOsceTimer(osceMarksheetId: $osceMarksheetId) {
|
|
133
|
-
|
|
133
|
+
id
|
|
134
|
+
startedAt
|
|
135
|
+
endedAt
|
|
134
136
|
timeRemaining
|
|
135
137
|
totalStationTime
|
|
138
|
+
stage
|
|
136
139
|
state
|
|
137
140
|
}
|
|
138
141
|
}
|
|
@@ -175,7 +178,9 @@ exports.SAVE_OSCE_MARKSHEET = (0, client_1.gql) `
|
|
|
175
178
|
feedback: $feedback
|
|
176
179
|
globalScore: $globalScore
|
|
177
180
|
) {
|
|
178
|
-
|
|
181
|
+
id
|
|
182
|
+
feedback
|
|
183
|
+
globalScore
|
|
179
184
|
}
|
|
180
185
|
}
|
|
181
186
|
}
|
|
@@ -126,9 +126,12 @@ export const START_OSCE_TIMER = gql `
|
|
|
126
126
|
mutation StartOsceTimer($osceMarksheetId: Int!) {
|
|
127
127
|
restricted {
|
|
128
128
|
startOsceTimer(osceMarksheetId: $osceMarksheetId) {
|
|
129
|
-
|
|
129
|
+
id
|
|
130
|
+
startedAt
|
|
131
|
+
endedAt
|
|
130
132
|
timeRemaining
|
|
131
133
|
totalStationTime
|
|
134
|
+
stage
|
|
132
135
|
state
|
|
133
136
|
}
|
|
134
137
|
}
|
|
@@ -171,7 +174,9 @@ export const SAVE_OSCE_MARKSHEET = gql `
|
|
|
171
174
|
feedback: $feedback
|
|
172
175
|
globalScore: $globalScore
|
|
173
176
|
) {
|
|
174
|
-
|
|
177
|
+
id
|
|
178
|
+
feedback
|
|
179
|
+
globalScore
|
|
175
180
|
}
|
|
176
181
|
}
|
|
177
182
|
}
|