mario-teacher-student-client 2.2.4-beta → 2.2.6-beta
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/dist/containers/Surveys/apiClient/surveyService.d.ts +1 -0
- package/dist/containers/Surveys/components/ExternalSurveyList.d.ts +3 -0
- package/dist/containers/Surveys/components/StepComponents/ConfirmShareSurvey.d.ts +4 -0
- package/dist/containers/Surveys/constants/tableColumn.d.ts +11 -0
- package/dist/containers/Surveys/constants/types.d.ts +15 -0
- package/dist/containers/Surveys/hook/useCreateSurvey.d.ts +2 -0
- package/dist/containers/Surveys/hook/useExternalSurvey.d.ts +2 -0
- package/dist/containers/Surveys/hook/useExternalSurveyList.d.ts +11 -0
- package/dist/containers/Surveys/hook/useListSurveyDetail.d.ts +1 -1
- package/dist/index.css +5 -1
- package/dist/index.js +254 -28
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +254 -28
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
|
@@ -11,3 +11,4 @@ export declare const getSurveyCountStudent: () => Promise<import("axios").AxiosR
|
|
|
11
11
|
export declare const getAllEduTeacher: () => Promise<import("axios").AxiosResponse<any>>;
|
|
12
12
|
export declare const shareSurvey: (data: any) => void;
|
|
13
13
|
export declare const updateSurvey: (surveyId: number, model: any) => Promise<import("axios").AxiosResponse<any>>;
|
|
14
|
+
export declare const getListExternal: (surveyId: number, params: any) => Promise<import("axios").AxiosResponse<any>>;
|
|
@@ -75,3 +75,14 @@ export declare const tableActionNeedSurvey: ({
|
|
|
75
75
|
sortName: null;
|
|
76
76
|
align: string;
|
|
77
77
|
})[];
|
|
78
|
+
export declare const tableExternalSurvey: ({
|
|
79
|
+
name: string;
|
|
80
|
+
tableWidth: number;
|
|
81
|
+
sortName: string;
|
|
82
|
+
align: string;
|
|
83
|
+
} | {
|
|
84
|
+
name: string;
|
|
85
|
+
tableWidth: number;
|
|
86
|
+
sortName: null;
|
|
87
|
+
align: string;
|
|
88
|
+
})[];
|
|
@@ -269,6 +269,7 @@ export interface MODEL_CONFIRM_SURVEY {
|
|
|
269
269
|
handleEnterAddSender?: Function;
|
|
270
270
|
emailContent?: string;
|
|
271
271
|
handleChangeEmailContent?: Function;
|
|
272
|
+
onOpenModelExternal?: Function;
|
|
272
273
|
}
|
|
273
274
|
export interface EDU_TEACHER {
|
|
274
275
|
email: string;
|
|
@@ -281,3 +282,17 @@ export interface EDU_TEACHER {
|
|
|
281
282
|
profileImageFileName: string;
|
|
282
283
|
isSelected?: boolean;
|
|
283
284
|
}
|
|
285
|
+
export interface EXTERNAL_SURVEY {
|
|
286
|
+
id: number;
|
|
287
|
+
email: string;
|
|
288
|
+
startTime: string;
|
|
289
|
+
isDone: boolean;
|
|
290
|
+
status: string;
|
|
291
|
+
}
|
|
292
|
+
export interface EXTERNAL_RES {
|
|
293
|
+
items: EXTERNAL_SURVEY;
|
|
294
|
+
currentPage: number;
|
|
295
|
+
pageSize: number;
|
|
296
|
+
totalItems: number;
|
|
297
|
+
totalPages: number;
|
|
298
|
+
}
|
|
@@ -56,5 +56,7 @@ declare const useListSurveyDetail: () => {
|
|
|
56
56
|
emailContent: string;
|
|
57
57
|
handleShareSurvey: () => Promise<void>;
|
|
58
58
|
handleDeleteEmail: (email: string) => void;
|
|
59
|
+
handleToggleModelConfirmShare: () => void;
|
|
60
|
+
openModelConfirmShare: boolean;
|
|
59
61
|
};
|
|
60
62
|
export default useListSurveyDetail;
|
|
@@ -15,5 +15,7 @@ declare const useExternalSurvey: ({ surveyId }: PropsCustomHook) => {
|
|
|
15
15
|
emailContent: string;
|
|
16
16
|
handleShareSurvey: () => Promise<void>;
|
|
17
17
|
handleDeleteEmail: (email: string) => void;
|
|
18
|
+
handleToggleModelConfirmShare: () => void;
|
|
19
|
+
openModelConfirmShare: boolean;
|
|
18
20
|
};
|
|
19
21
|
export default useExternalSurvey;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { FILTER_SURVEY, EXTERNAL_SURVEY } from "../constants/types";
|
|
3
|
+
declare const useExternalSurveyList: () => {
|
|
4
|
+
filters: FILTER_SURVEY;
|
|
5
|
+
inputSearch: import("react").MutableRefObject<any>;
|
|
6
|
+
externalSurveys: EXTERNAL_SURVEY[];
|
|
7
|
+
handleSort: (e: string) => void;
|
|
8
|
+
handleChangeInputSearch: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
9
|
+
handleViewExternalResult: () => void;
|
|
10
|
+
};
|
|
11
|
+
export default useExternalSurveyList;
|
|
@@ -13,7 +13,7 @@ declare const useListSurveyDetail: ({ type }: SURVEY_STUDENT_PROPS) => {
|
|
|
13
13
|
dayLeftCellBgColor: (dayLeft: number) => "" | "bg-red" | "bg-green" | "bg-yellow";
|
|
14
14
|
handleStartSurvey: (surveyId: number, studentId: number) => void;
|
|
15
15
|
goToBookSession: (studentId: number, surveyId: number) => void;
|
|
16
|
-
handleShowSession: (status: string, schedule: string, isDone: boolean) => false | "Completed" | "
|
|
16
|
+
handleShowSession: (status: string, schedule: string, isDone: boolean) => false | "Completed" | "Scheduled" | "No Response yet";
|
|
17
17
|
sessionBackground: (point: number | null) => "bg-red" | "bg-green" | "bg-yellow";
|
|
18
18
|
};
|
|
19
19
|
export default useListSurveyDetail;
|
package/dist/index.css
CHANGED
|
@@ -15000,7 +15000,8 @@ h4._3lNz0 {
|
|
|
15000
15000
|
.__12h2 {
|
|
15001
15001
|
padding: 16px;
|
|
15002
15002
|
border-radius: 50px;
|
|
15003
|
-
width:
|
|
15003
|
+
width: 140px;
|
|
15004
|
+
margin: 0 auto !important; }
|
|
15004
15005
|
|
|
15005
15006
|
th > ._3tbAL ._3N7z7 {
|
|
15006
15007
|
font-size: 1.4rem !important; }
|
|
@@ -15149,6 +15150,9 @@ th > ._3tbAL ._3N7z7 {
|
|
|
15149
15150
|
._1Oqku ._2zK6C {
|
|
15150
15151
|
color: #ffffff; }
|
|
15151
15152
|
|
|
15153
|
+
._2BJFc {
|
|
15154
|
+
margin-right: 10px; }
|
|
15155
|
+
|
|
15152
15156
|
._1Oqku:disabled {
|
|
15153
15157
|
background: #6b6b6b; }
|
|
15154
15158
|
|
package/dist/index.js
CHANGED
|
@@ -14311,7 +14311,8 @@ var ShareSurveyDialog = function ShareSurveyDialog(_ref) {
|
|
|
14311
14311
|
},
|
|
14312
14312
|
renderInput: function renderInput(params) {
|
|
14313
14313
|
return React__default.createElement(core.TextField, Object.assign({}, params, {
|
|
14314
|
-
variant: "outlined"
|
|
14314
|
+
variant: "outlined",
|
|
14315
|
+
placeholder: "Select teacher to share"
|
|
14315
14316
|
}));
|
|
14316
14317
|
}
|
|
14317
14318
|
})), React__default.createElement(core.Grid, {
|
|
@@ -61888,7 +61889,7 @@ var CustomHeaderComponent = function CustomHeaderComponent(_ref) {
|
|
|
61888
61889
|
}, contentButton), !!iconButton && iconButton)));
|
|
61889
61890
|
};
|
|
61890
61891
|
|
|
61891
|
-
var styles$O = {"icon-add-header":"_3msvE","sup-require":"_3cLXA","span-title":"_2zJd0","checked-favorite":"_-DbRo","model-confirm-publish":"_3LneM","btn-cancel":"_3YQho","btn-send-survey":"_17NxN","content-confirm-model":"_xXGSG","dialog-title":"_SCqos","box-email-content":"_I7jVk","title-content":"_2qWnj","input-mail-content":"_2DLVt","list-chip-email":"_1NjUv","box-chip-email":"_LXTJT","chip-email-default":"_3vu3m","chip-email-checked":"_2SfCN","table-desktop":"_1F8xx","data-grid":"_3TDU4","MuiDataGrid-columnSeparator":"_3ig99","block-list-survey":"_U4jvh","box-filter":"_20SVW","block-total":"_2RcnX","filter-select":"_2WWzW","box-filter-left":"_MEKLd","filter-item":"_3KQ0G","btn-favorite-text":"_2HxpA","box-filter-right":"_wfMx1","search-input-icon":"_2pk-H","inputInput":"_TfkuE","table-border":"_OEcTC","time-Date":"_3N7z7","time-Hours-Minute":"_1jOw7","table-row":"_2jcL8","arrow-icon":"_10hwb","table-cell":"_3YpBx","btn-function":"__J0jK","avatar_user":"_2nLvF","data-grid-content":"_3sCAB","row_name":"_2fnqB","innerHtml":"_3r42i","table-class-type":"_3tbAL","btn-open":"_1Vgmy","date-schedule":"_1m1n9","row-status":"_oItGm","pending":"_3Yw4h","replied":"_1zClB","actionneeded":"_2K_LM","actionneed":"_1T4kH","bg-yellow":"_S8XOD","bg-green":"_3M-Iu","bg-red":"_1kk0-","noscheduled":"_Qmz2t","scheduled":"_HLo9e","completed":"_3U4Kw","session":"__12h2","schedule-now":"_w2de6","block-filter":"_3boYk","block-filter-right":"_Jb-VQ","title-filter":"_EkM6A","create-survey-container":"_13Als","box-create-survey":"_3ZeD0","box-form-input":"_2_Lbs","form-input-title":"_2eMwZ","check-box-btn":"_2SP5U","stepper":"_2dIQT","step-label":"_2fUwq","dialog-select-template":"_3N8Q3","icon-btn":"_1rTF7","icon-remove":"_2vYxh","title-btn":"_82x3C","title-box-model":"_3wglS","box-content-select":"_3nfCh","title-content-select":"_1mLDw","description-content-select":"_Hg1l5","box-function":"_3aIy7","cancel_btn":"_33pHa","confirm_btn":"_1Oqku","confirm_btn_title":"_lxY0i","confirm_btn_icon":"_2zK6C","box-function-flex":"_3MS9Q","box-collapse":"_82XGO","box-collapse-top":"_7DXq2","box-collapse-right":"_3ZAAk","collapse-chip":"_3vGgC","collapse-left-title":"_1a4Re","box-collapse-content-item":"_37Ftp","block-review-detail":"_1Lmrp","title-block":"_25k4D","block-content-review":"_2MyxF","box-content":"_2M2ub","block-template-review":"_26NEY","block-template-left":"_lrxw0","name-template-left":"_1ubim","select-right":"_3b0L0","description-template-left":"_1erRk","additional-box":"_3d0rZ","space-content":"_3rWo3","table-title":"_2v5b5","table-status":"_3Zgbw","Close":"_3_Z98","Active":"_1UqNT","box-header-select":"_1wJqN","header-select-name":"_Q-qNa","header-select-icon":"_3UAh4","list-question-select":"_AgPAZ","new-survey":"_3RD_x","title":"_21CPc","box-survey":"_1ikO6","avt-user":"_38Qdy","infor":"_2W6Cn","content-text":"_3fS-4","name":"_2V9ri","time":"_3LxCt"};
|
|
61892
|
+
var styles$O = {"icon-add-header":"_3msvE","sup-require":"_3cLXA","span-title":"_2zJd0","checked-favorite":"_-DbRo","model-confirm-publish":"_3LneM","btn-cancel":"_3YQho","btn-send-survey":"_17NxN","content-confirm-model":"_xXGSG","dialog-title":"_SCqos","box-email-content":"_I7jVk","title-content":"_2qWnj","input-mail-content":"_2DLVt","list-chip-email":"_1NjUv","box-chip-email":"_LXTJT","chip-email-default":"_3vu3m","chip-email-checked":"_2SfCN","table-desktop":"_1F8xx","data-grid":"_3TDU4","MuiDataGrid-columnSeparator":"_3ig99","block-list-survey":"_U4jvh","box-filter":"_20SVW","block-total":"_2RcnX","filter-select":"_2WWzW","box-filter-left":"_MEKLd","filter-item":"_3KQ0G","btn-favorite-text":"_2HxpA","box-filter-right":"_wfMx1","search-input-icon":"_2pk-H","inputInput":"_TfkuE","table-border":"_OEcTC","time-Date":"_3N7z7","time-Hours-Minute":"_1jOw7","table-row":"_2jcL8","arrow-icon":"_10hwb","table-cell":"_3YpBx","btn-function":"__J0jK","avatar_user":"_2nLvF","data-grid-content":"_3sCAB","row_name":"_2fnqB","innerHtml":"_3r42i","table-class-type":"_3tbAL","btn-open":"_1Vgmy","date-schedule":"_1m1n9","row-status":"_oItGm","pending":"_3Yw4h","replied":"_1zClB","actionneeded":"_2K_LM","actionneed":"_1T4kH","bg-yellow":"_S8XOD","bg-green":"_3M-Iu","bg-red":"_1kk0-","noscheduled":"_Qmz2t","scheduled":"_HLo9e","completed":"_3U4Kw","session":"__12h2","schedule-now":"_w2de6","block-filter":"_3boYk","block-filter-right":"_Jb-VQ","title-filter":"_EkM6A","create-survey-container":"_13Als","box-create-survey":"_3ZeD0","box-form-input":"_2_Lbs","form-input-title":"_2eMwZ","check-box-btn":"_2SP5U","stepper":"_2dIQT","step-label":"_2fUwq","dialog-select-template":"_3N8Q3","icon-btn":"_1rTF7","icon-remove":"_2vYxh","title-btn":"_82x3C","title-box-model":"_3wglS","box-content-select":"_3nfCh","title-content-select":"_1mLDw","description-content-select":"_Hg1l5","box-function":"_3aIy7","cancel_btn":"_33pHa","confirm_btn":"_1Oqku","confirm_btn_title":"_lxY0i","confirm_btn_icon":"_2zK6C","mid_btn":"_2BJFc","box-function-flex":"_3MS9Q","box-collapse":"_82XGO","box-collapse-top":"_7DXq2","box-collapse-right":"_3ZAAk","collapse-chip":"_3vGgC","collapse-left-title":"_1a4Re","box-collapse-content-item":"_37Ftp","block-review-detail":"_1Lmrp","title-block":"_25k4D","block-content-review":"_2MyxF","box-content":"_2M2ub","block-template-review":"_26NEY","block-template-left":"_lrxw0","name-template-left":"_1ubim","select-right":"_3b0L0","description-template-left":"_1erRk","additional-box":"_3d0rZ","space-content":"_3rWo3","table-title":"_2v5b5","table-status":"_3Zgbw","Close":"_3_Z98","Active":"_1UqNT","box-header-select":"_1wJqN","header-select-name":"_Q-qNa","header-select-icon":"_3UAh4","list-question-select":"_AgPAZ","new-survey":"_3RD_x","title":"_21CPc","box-survey":"_1ikO6","avt-user":"_38Qdy","infor":"_2W6Cn","content-text":"_3fS-4","name":"_2V9ri","time":"_3LxCt"};
|
|
61892
61893
|
|
|
61893
61894
|
var CardTotal = function CardTotal(_ref) {
|
|
61894
61895
|
var title = _ref.title,
|
|
@@ -61952,6 +61953,11 @@ var shareSurvey$1 = function shareSurvey(data) {
|
|
|
61952
61953
|
var updateSurvey$1 = function updateSurvey(surveyId, model) {
|
|
61953
61954
|
return marioCore.api.put(SURVEY_API + "/setting-survey/" + surveyId, model);
|
|
61954
61955
|
};
|
|
61956
|
+
var getListExternal = function getListExternal(surveyId, params) {
|
|
61957
|
+
return marioCore.api.get(SURVEY_API + "/external/" + surveyId, {
|
|
61958
|
+
params: params
|
|
61959
|
+
});
|
|
61960
|
+
};
|
|
61955
61961
|
|
|
61956
61962
|
var STEP_MODEL = ["Select student", "Create a survey", "Review"];
|
|
61957
61963
|
var lableStep = function lableStep(activeStep) {
|
|
@@ -62721,7 +62727,7 @@ var useListSurveyDetail = function useListSurveyDetail(_ref) {
|
|
|
62721
62727
|
|
|
62722
62728
|
var handleShowSession = function handleShowSession(status, schedule, isDone) {
|
|
62723
62729
|
if (status === "Completed") {
|
|
62724
|
-
return "
|
|
62730
|
+
return "Scheduled";
|
|
62725
62731
|
} else if (status === "Pending") {
|
|
62726
62732
|
return "No Response yet";
|
|
62727
62733
|
} else if (status === "ActionNeed" && !!schedule) {
|
|
@@ -63006,22 +63012,17 @@ var tableCompleteSurvey = [{
|
|
|
63006
63012
|
}];
|
|
63007
63013
|
var tableActionNeedSurvey = [{
|
|
63008
63014
|
name: "Student name",
|
|
63009
|
-
tableWidth:
|
|
63015
|
+
tableWidth: 45,
|
|
63010
63016
|
sortName: "Name",
|
|
63011
63017
|
align: "left"
|
|
63012
63018
|
}, {
|
|
63013
63019
|
name: "Flag",
|
|
63014
|
-
tableWidth:
|
|
63020
|
+
tableWidth: 20,
|
|
63015
63021
|
sortName: null,
|
|
63016
63022
|
align: "center"
|
|
63017
|
-
}, {
|
|
63018
|
-
name: "Session",
|
|
63019
|
-
tableWidth: 20,
|
|
63020
|
-
sortName: "session",
|
|
63021
|
-
align: "left"
|
|
63022
63023
|
}, {
|
|
63023
63024
|
name: "Date",
|
|
63024
|
-
tableWidth:
|
|
63025
|
+
tableWidth: 25,
|
|
63025
63026
|
sortName: "Date",
|
|
63026
63027
|
align: "left"
|
|
63027
63028
|
}, {
|
|
@@ -63030,6 +63031,27 @@ var tableActionNeedSurvey = [{
|
|
|
63030
63031
|
sortName: null,
|
|
63031
63032
|
align: "center"
|
|
63032
63033
|
}];
|
|
63034
|
+
var tableExternalSurvey = [{
|
|
63035
|
+
name: "External email",
|
|
63036
|
+
tableWidth: 45,
|
|
63037
|
+
sortName: "email",
|
|
63038
|
+
align: "left"
|
|
63039
|
+
}, {
|
|
63040
|
+
name: "Start time",
|
|
63041
|
+
tableWidth: 25,
|
|
63042
|
+
sortName: "startTime",
|
|
63043
|
+
align: "left"
|
|
63044
|
+
}, {
|
|
63045
|
+
name: "Status",
|
|
63046
|
+
tableWidth: 20,
|
|
63047
|
+
sortName: "status",
|
|
63048
|
+
align: "center"
|
|
63049
|
+
}, {
|
|
63050
|
+
name: "",
|
|
63051
|
+
tableWidth: 10,
|
|
63052
|
+
sortName: null,
|
|
63053
|
+
align: "center"
|
|
63054
|
+
}];
|
|
63033
63055
|
|
|
63034
63056
|
var AllStudentSurvey = function AllStudentSurvey() {
|
|
63035
63057
|
var _useListSurveyDetail = useListSurveyDetail({
|
|
@@ -63222,7 +63244,8 @@ var RepliedSurvey = function RepliedSurvey() {
|
|
|
63222
63244
|
inputSearch = _useListSurveyDetail.inputSearch,
|
|
63223
63245
|
handleSort = _useListSurveyDetail.handleSort,
|
|
63224
63246
|
handleChangePage = _useListSurveyDetail.handleChangePage,
|
|
63225
|
-
handleChangeRowsPerPage = _useListSurveyDetail.handleChangeRowsPerPage
|
|
63247
|
+
handleChangeRowsPerPage = _useListSurveyDetail.handleChangeRowsPerPage,
|
|
63248
|
+
sessionBackground = _useListSurveyDetail.sessionBackground;
|
|
63226
63249
|
|
|
63227
63250
|
return React__default.createElement("div", null, React__default.createElement(core.Box, {
|
|
63228
63251
|
pl: 3,
|
|
@@ -63285,7 +63308,9 @@ var RepliedSurvey = function RepliedSurvey() {
|
|
|
63285
63308
|
className: "" + styles$O["table-class-type"]
|
|
63286
63309
|
}, React__default.createElement(core.Typography, {
|
|
63287
63310
|
className: styles$O["row-status"] + " " + styles$O[flagCellBgColor()]
|
|
63288
|
-
},
|
|
63311
|
+
}, React__default.createElement(core.Typography, {
|
|
63312
|
+
className: styles$O["session"] + " " + styles$O[sessionBackground(row.actionScore)]
|
|
63313
|
+
}))), React__default.createElement(core.TableCell, {
|
|
63289
63314
|
align: "center",
|
|
63290
63315
|
component: "th",
|
|
63291
63316
|
scope: "row",
|
|
@@ -63357,12 +63382,6 @@ var ActionNeededSurvey = function ActionNeededSurvey() {
|
|
|
63357
63382
|
alt: "",
|
|
63358
63383
|
className: "" + styles$O["avatar_user"]
|
|
63359
63384
|
}), row === null || row === void 0 ? void 0 : row.studentName), React__default.createElement(core.TableCell, {
|
|
63360
|
-
align: "center",
|
|
63361
|
-
component: "th",
|
|
63362
|
-
scope: "row",
|
|
63363
|
-
height: 80,
|
|
63364
|
-
className: "" + styles$O["table-class-type"]
|
|
63365
|
-
}, row.flag), React__default.createElement(core.TableCell, {
|
|
63366
63385
|
align: "right",
|
|
63367
63386
|
component: "th",
|
|
63368
63387
|
scope: "row",
|
|
@@ -63412,6 +63431,145 @@ var ActionNeededSurvey = function ActionNeededSurvey() {
|
|
|
63412
63431
|
}));
|
|
63413
63432
|
};
|
|
63414
63433
|
|
|
63434
|
+
var useExternalSurveyList = function useExternalSurveyList() {
|
|
63435
|
+
var dispatch = reactRedux.useDispatch();
|
|
63436
|
+
var history = reactRouterDom.useHistory();
|
|
63437
|
+
|
|
63438
|
+
var _useParams = reactRouterDom.useParams(),
|
|
63439
|
+
id = _useParams.id;
|
|
63440
|
+
|
|
63441
|
+
var _useState = React.useState(initialFilterSurvey),
|
|
63442
|
+
filters = _useState[0],
|
|
63443
|
+
setFilters = _useState[1];
|
|
63444
|
+
|
|
63445
|
+
var _useState2 = React.useState([]),
|
|
63446
|
+
externalSurveys = _useState2[0],
|
|
63447
|
+
setExternalSurveys = _useState2[1];
|
|
63448
|
+
|
|
63449
|
+
var inputSearch = React.useRef(null);
|
|
63450
|
+
|
|
63451
|
+
var changeFilters = function changeFilters(updatedFilters) {
|
|
63452
|
+
return setFilters(_extends({}, filters, updatedFilters));
|
|
63453
|
+
};
|
|
63454
|
+
|
|
63455
|
+
var handleChangeInputSearch = function handleChangeInputSearch(e) {
|
|
63456
|
+
var inputValue = e.target.value;
|
|
63457
|
+
|
|
63458
|
+
if (!!inputSearch.current) {
|
|
63459
|
+
clearTimeout(inputSearch.current);
|
|
63460
|
+
}
|
|
63461
|
+
|
|
63462
|
+
inputSearch.current = setTimeout(function () {
|
|
63463
|
+
changeFilters({
|
|
63464
|
+
searchString: inputValue,
|
|
63465
|
+
currentPage: 1
|
|
63466
|
+
});
|
|
63467
|
+
}, 800);
|
|
63468
|
+
};
|
|
63469
|
+
|
|
63470
|
+
var handleSort = function handleSort(e) {
|
|
63471
|
+
changeFilters({
|
|
63472
|
+
sortOrder: filters.sortOrder === "DESC" ? "ASC" : "DESC",
|
|
63473
|
+
sortBy: e
|
|
63474
|
+
});
|
|
63475
|
+
};
|
|
63476
|
+
|
|
63477
|
+
var handleViewExternalResult = function handleViewExternalResult() {
|
|
63478
|
+
history.push("");
|
|
63479
|
+
};
|
|
63480
|
+
|
|
63481
|
+
var getExternalList = React.useCallback(function () {
|
|
63482
|
+
try {
|
|
63483
|
+
var _temp3 = function _temp3() {
|
|
63484
|
+
dispatch(marioCore.setLoading(false));
|
|
63485
|
+
};
|
|
63486
|
+
|
|
63487
|
+
dispatch(marioCore.setLoading(true));
|
|
63488
|
+
|
|
63489
|
+
var _temp4 = _catch(function () {
|
|
63490
|
+
return Promise.resolve(getListExternal(id, filters)).then(function (res) {
|
|
63491
|
+
var _res$data;
|
|
63492
|
+
|
|
63493
|
+
setExternalSurveys((_res$data = res.data) === null || _res$data === void 0 ? void 0 : _res$data.items);
|
|
63494
|
+
});
|
|
63495
|
+
}, function (err) {
|
|
63496
|
+
var _err$response, _err$response$data;
|
|
63497
|
+
|
|
63498
|
+
dispatch(marioCore.setAlert({
|
|
63499
|
+
type: "danger",
|
|
63500
|
+
message: ((_err$response = err.response) === null || _err$response === void 0 ? void 0 : (_err$response$data = _err$response.data) === null || _err$response$data === void 0 ? void 0 : _err$response$data.title) || err.message
|
|
63501
|
+
}));
|
|
63502
|
+
});
|
|
63503
|
+
|
|
63504
|
+
return Promise.resolve(_temp4 && _temp4.then ? _temp4.then(_temp3) : _temp3(_temp4));
|
|
63505
|
+
} catch (e) {
|
|
63506
|
+
return Promise.reject(e);
|
|
63507
|
+
}
|
|
63508
|
+
}, [filters]);
|
|
63509
|
+
React.useEffect(function () {
|
|
63510
|
+
getExternalList();
|
|
63511
|
+
}, [filters]);
|
|
63512
|
+
return {
|
|
63513
|
+
filters: filters,
|
|
63514
|
+
inputSearch: inputSearch,
|
|
63515
|
+
externalSurveys: externalSurveys,
|
|
63516
|
+
handleSort: handleSort,
|
|
63517
|
+
handleChangeInputSearch: handleChangeInputSearch,
|
|
63518
|
+
handleViewExternalResult: handleViewExternalResult
|
|
63519
|
+
};
|
|
63520
|
+
};
|
|
63521
|
+
|
|
63522
|
+
var ExternalSurveyList = function ExternalSurveyList() {
|
|
63523
|
+
var _useExternalSurveyLis = useExternalSurveyList(),
|
|
63524
|
+
inputSearch = _useExternalSurveyLis.inputSearch,
|
|
63525
|
+
filters = _useExternalSurveyLis.filters,
|
|
63526
|
+
handleChangeInputSearch = _useExternalSurveyLis.handleChangeInputSearch,
|
|
63527
|
+
handleSort = _useExternalSurveyLis.handleSort,
|
|
63528
|
+
externalSurveys = _useExternalSurveyLis.externalSurveys;
|
|
63529
|
+
|
|
63530
|
+
return React__default.createElement(core.Grid, null, React__default.createElement(core.Box, {
|
|
63531
|
+
pl: 3,
|
|
63532
|
+
pr: 3
|
|
63533
|
+
}, React__default.createElement(CustomFilterComponent, {
|
|
63534
|
+
handleChangeInputSearch: handleChangeInputSearch,
|
|
63535
|
+
filters: filters,
|
|
63536
|
+
inputSearch: inputSearch,
|
|
63537
|
+
placeholderSearch: "Search email"
|
|
63538
|
+
})), React__default.createElement(core.TableContainer, null, React__default.createElement(core.Table, {
|
|
63539
|
+
"aria-label": "simple table",
|
|
63540
|
+
className: "" + styles$O["table-border"]
|
|
63541
|
+
}, React__default.createElement(core.TableHead, null, React__default.createElement(TableCells, {
|
|
63542
|
+
listTableCell: tableExternalSurvey,
|
|
63543
|
+
filters: filters,
|
|
63544
|
+
handleSort: handleSort
|
|
63545
|
+
})), React__default.createElement(core.TableBody, null, (externalSurveys === null || externalSurveys === void 0 ? void 0 : externalSurveys.length) > 0 && externalSurveys.map(function (r) {
|
|
63546
|
+
return React__default.createElement(core.TableRow, {
|
|
63547
|
+
className: "" + styles$O["table-row"],
|
|
63548
|
+
key: r.id
|
|
63549
|
+
}, React__default.createElement(core.TableCell, {
|
|
63550
|
+
align: "left",
|
|
63551
|
+
className: "" + styles$O["row_name"]
|
|
63552
|
+
}, r.email), React__default.createElement(core.TableCell, {
|
|
63553
|
+
align: "left",
|
|
63554
|
+
className: "" + styles$O["row_name"]
|
|
63555
|
+
}, !!r.startTime && React__default.createElement(ConvertTime, {
|
|
63556
|
+
time: r.startTime
|
|
63557
|
+
})), React__default.createElement(core.TableCell, {
|
|
63558
|
+
align: "left",
|
|
63559
|
+
className: "" + styles$O["row_name"]
|
|
63560
|
+
}, r.status), React__default.createElement(core.TableCell, {
|
|
63561
|
+
align: "center",
|
|
63562
|
+
component: "th",
|
|
63563
|
+
scope: "row",
|
|
63564
|
+
height: 80,
|
|
63565
|
+
className: "" + styles$O["table-class-type"]
|
|
63566
|
+
}, React__default.createElement(core.Button, {
|
|
63567
|
+
variant: "contained",
|
|
63568
|
+
className: "" + styles$O["btn-open"]
|
|
63569
|
+
}, React__default.createElement(ArrowForwardIcon, null))));
|
|
63570
|
+
})))));
|
|
63571
|
+
};
|
|
63572
|
+
|
|
63415
63573
|
var ListSurveyDetail = function ListSurveyDetail(props) {
|
|
63416
63574
|
var renderTab = function renderTab() {
|
|
63417
63575
|
if (props.tab.includes("ALL")) {
|
|
@@ -63430,6 +63588,10 @@ var ListSurveyDetail = function ListSurveyDetail(props) {
|
|
|
63430
63588
|
return React__default.createElement(ActionNeededSurvey, null);
|
|
63431
63589
|
}
|
|
63432
63590
|
|
|
63591
|
+
if (props.tab.includes("EXTERNAL")) {
|
|
63592
|
+
return React__default.createElement(ExternalSurveyList, null);
|
|
63593
|
+
}
|
|
63594
|
+
|
|
63433
63595
|
return React__default.createElement("div", null);
|
|
63434
63596
|
};
|
|
63435
63597
|
|
|
@@ -63491,6 +63653,9 @@ var useSurveyDetail = function useSurveyDetail() {
|
|
|
63491
63653
|
}, {
|
|
63492
63654
|
label: "ACTION NEEDED",
|
|
63493
63655
|
count: "[" + data.actionNeedCount + "]"
|
|
63656
|
+
}, {
|
|
63657
|
+
label: "EXTERNAL",
|
|
63658
|
+
count: "[" + data.externalCount + "]"
|
|
63494
63659
|
}]);
|
|
63495
63660
|
});
|
|
63496
63661
|
}, function (err) {
|
|
@@ -63594,11 +63759,20 @@ var useExternalSurvey = function useExternalSurvey(_ref) {
|
|
|
63594
63759
|
emailContent = _useState5[0],
|
|
63595
63760
|
setEmailContent = _useState5[1];
|
|
63596
63761
|
|
|
63762
|
+
var _useState6 = React.useState(false),
|
|
63763
|
+
openModelConfirmShare = _useState6[0],
|
|
63764
|
+
setOpenModelConfirmShare = _useState6[1];
|
|
63765
|
+
|
|
63597
63766
|
var handleToggleModelShare = function handleToggleModelShare() {
|
|
63598
63767
|
if (openModelShare) history.push("/list-survey");
|
|
63599
63768
|
setOpenModelShare(!openModelShare);
|
|
63600
63769
|
};
|
|
63601
63770
|
|
|
63771
|
+
var handleToggleModelConfirmShare = function handleToggleModelConfirmShare() {
|
|
63772
|
+
if (openModelConfirmShare) history.push("/list-survey");
|
|
63773
|
+
setOpenModelConfirmShare(!openModelConfirmShare);
|
|
63774
|
+
};
|
|
63775
|
+
|
|
63602
63776
|
var handleToggleSuggestedTeacher = function handleToggleSuggestedTeacher(teacherId, isChecked) {
|
|
63603
63777
|
var teacherIndex = listEduTeacher.findIndex(function (r) {
|
|
63604
63778
|
return r.generalEducationTeacherId === teacherId;
|
|
@@ -63737,7 +63911,9 @@ var useExternalSurvey = function useExternalSurvey(_ref) {
|
|
|
63737
63911
|
handleChangeEmailContent: handleChangeEmailContent,
|
|
63738
63912
|
emailContent: emailContent,
|
|
63739
63913
|
handleShareSurvey: handleShareSurvey,
|
|
63740
|
-
handleDeleteEmail: handleDeleteEmail
|
|
63914
|
+
handleDeleteEmail: handleDeleteEmail,
|
|
63915
|
+
handleToggleModelConfirmShare: handleToggleModelConfirmShare,
|
|
63916
|
+
openModelConfirmShare: openModelConfirmShare
|
|
63741
63917
|
};
|
|
63742
63918
|
};
|
|
63743
63919
|
|
|
@@ -63808,7 +63984,9 @@ var useListSurveyDetail$1 = function useListSurveyDetail() {
|
|
|
63808
63984
|
handleChangeEmailContent = _useExternalSurvey.handleChangeEmailContent,
|
|
63809
63985
|
emailContent = _useExternalSurvey.emailContent,
|
|
63810
63986
|
handleShareSurvey = _useExternalSurvey.handleShareSurvey,
|
|
63811
|
-
handleDeleteEmail = _useExternalSurvey.handleDeleteEmail
|
|
63987
|
+
handleDeleteEmail = _useExternalSurvey.handleDeleteEmail,
|
|
63988
|
+
handleToggleModelConfirmShare = _useExternalSurvey.handleToggleModelConfirmShare,
|
|
63989
|
+
openModelConfirmShare = _useExternalSurvey.openModelConfirmShare;
|
|
63812
63990
|
|
|
63813
63991
|
var handleToggleModelConfirm = function handleToggleModelConfirm() {
|
|
63814
63992
|
setOpenModelConfirmPublish(!openModelConfirmPublish);
|
|
@@ -64153,7 +64331,7 @@ var useListSurveyDetail$1 = function useListSurveyDetail() {
|
|
|
64153
64331
|
}))).then(function (res) {
|
|
64154
64332
|
setSurveyId(res.data.id);
|
|
64155
64333
|
localStorage.removeItem("dataFormSurvey");
|
|
64156
|
-
|
|
64334
|
+
handleToggleModelConfirmShare();
|
|
64157
64335
|
dispatch(marioCore.setAlert({
|
|
64158
64336
|
type: "success",
|
|
64159
64337
|
message: "Publish survey success"
|
|
@@ -64262,7 +64440,9 @@ var useListSurveyDetail$1 = function useListSurveyDetail() {
|
|
|
64262
64440
|
handleChangeEmailContent: handleChangeEmailContent,
|
|
64263
64441
|
emailContent: emailContent,
|
|
64264
64442
|
handleShareSurvey: handleShareSurvey,
|
|
64265
|
-
handleDeleteEmail: handleDeleteEmail
|
|
64443
|
+
handleDeleteEmail: handleDeleteEmail,
|
|
64444
|
+
handleToggleModelConfirmShare: handleToggleModelConfirmShare,
|
|
64445
|
+
openModelConfirmShare: openModelConfirmShare
|
|
64266
64446
|
};
|
|
64267
64447
|
};
|
|
64268
64448
|
|
|
@@ -64392,7 +64572,7 @@ var TableSelectStudent = function TableSelectStudent(_ref) {
|
|
|
64392
64572
|
};
|
|
64393
64573
|
|
|
64394
64574
|
var ModelSelectQuestion = function ModelSelectQuestion(_ref) {
|
|
64395
|
-
var _template$questionTem, _template$questionTem2;
|
|
64575
|
+
var _template$questionTem, _template$questionTem2, _template$questionTem3, _template$questionTem4;
|
|
64396
64576
|
|
|
64397
64577
|
var open = _ref.open,
|
|
64398
64578
|
handleClose = _ref.handleClose,
|
|
@@ -64440,7 +64620,7 @@ var ModelSelectQuestion = function ModelSelectQuestion(_ref) {
|
|
|
64440
64620
|
}), React__default.createElement("div", {
|
|
64441
64621
|
className: "" + styles$O["innerHtml"],
|
|
64442
64622
|
dangerouslySetInnerHTML: {
|
|
64443
|
-
__html: r.questionText.replace(/<br\s*\/?>/gi,
|
|
64623
|
+
__html: r.questionText.replace(/<br\s*\/?>/gi, "\n")
|
|
64444
64624
|
}
|
|
64445
64625
|
}));
|
|
64446
64626
|
})), React__default.createElement(core.Grid, {
|
|
@@ -64453,6 +64633,16 @@ var ModelSelectQuestion = function ModelSelectQuestion(_ref) {
|
|
|
64453
64633
|
return handleClose();
|
|
64454
64634
|
}
|
|
64455
64635
|
}, "Cancel"), React__default.createElement("button", {
|
|
64636
|
+
className: styles$O["confirm_btn"] + " " + styles$O["mid_btn"],
|
|
64637
|
+
disabled: (template === null || template === void 0 ? void 0 : (_template$questionTem3 = template.questionTemplates) === null || _template$questionTem3 === void 0 ? void 0 : _template$questionTem3.length) === (selectQuestion === null || selectQuestion === void 0 ? void 0 : selectQuestion.length),
|
|
64638
|
+
onClick: function onClick() {
|
|
64639
|
+
return handleSelectTemplate(template);
|
|
64640
|
+
}
|
|
64641
|
+
}, React__default.createElement(core.Typography, {
|
|
64642
|
+
className: "" + styles$O["confirm_btn_title"]
|
|
64643
|
+
}, "Insert All questions [" + (template === null || template === void 0 ? void 0 : (_template$questionTem4 = template.questionTemplates) === null || _template$questionTem4 === void 0 ? void 0 : _template$questionTem4.length) + "]"), React__default.createElement(AddCircleOutlinedIcon, {
|
|
64644
|
+
className: "" + styles$O["confirm_btn_icon"]
|
|
64645
|
+
})), React__default.createElement("button", {
|
|
64456
64646
|
className: "" + styles$O["confirm_btn"],
|
|
64457
64647
|
disabled: handleCheckInsertQuestion(template, selectQuestion === null || selectQuestion === void 0 ? void 0 : selectQuestion.length),
|
|
64458
64648
|
onClick: function onClick() {
|
|
@@ -64908,7 +65098,7 @@ var ModelSendSurvey = function ModelSendSurvey(_ref) {
|
|
|
64908
65098
|
className: "" + styles$O["box-email-content"]
|
|
64909
65099
|
}, React__default.createElement(core.Typography, {
|
|
64910
65100
|
className: "" + styles$O["title-content"]
|
|
64911
|
-
}, "
|
|
65101
|
+
}, "External email"), React__default.createElement(lab.Autocomplete, {
|
|
64912
65102
|
multiple: true,
|
|
64913
65103
|
freeSolo: true,
|
|
64914
65104
|
id: "tags-filled",
|
|
@@ -64929,6 +65119,7 @@ var ModelSendSurvey = function ModelSendSurvey(_ref) {
|
|
|
64929
65119
|
return React__default.createElement(core.TextField, Object.assign({}, params, {
|
|
64930
65120
|
variant: "outlined",
|
|
64931
65121
|
value: textValueSender,
|
|
65122
|
+
placeholder: "Enter external email",
|
|
64932
65123
|
onKeyUp: function onKeyUp(event) {
|
|
64933
65124
|
if (event.key === "Enter") handleEnterAddSender === null || handleEnterAddSender === void 0 ? void 0 : handleEnterAddSender();
|
|
64934
65125
|
},
|
|
@@ -64995,7 +65186,36 @@ var ConfirmPublishSurvey = function ConfirmPublishSurvey(_ref) {
|
|
|
64995
65186
|
return handlePublishSurvey === null || handlePublishSurvey === void 0 ? void 0 : handlePublishSurvey();
|
|
64996
65187
|
},
|
|
64997
65188
|
className: "" + styles$O["btn-send-survey"]
|
|
64998
|
-
}, "
|
|
65189
|
+
}, "PUBLISH SURVEY")));
|
|
65190
|
+
};
|
|
65191
|
+
|
|
65192
|
+
var ConfirmShareSurvey = function ConfirmShareSurvey(_ref) {
|
|
65193
|
+
var open = _ref.open,
|
|
65194
|
+
handleClose = _ref.handleClose,
|
|
65195
|
+
onOpenModelExternal = _ref.onOpenModelExternal;
|
|
65196
|
+
return React__default.createElement(core.Dialog, {
|
|
65197
|
+
open: open,
|
|
65198
|
+
onClose: function onClose() {
|
|
65199
|
+
return handleClose();
|
|
65200
|
+
},
|
|
65201
|
+
className: "" + styles$O["model-confirm-publish"]
|
|
65202
|
+
}, React__default.createElement(core.DialogTitle, null, React__default.createElement(core.Typography, {
|
|
65203
|
+
className: "" + styles$O["dialog-title"]
|
|
65204
|
+
}, "Do you want to share a survey to Teachers?")), React__default.createElement(core.DialogContent, null, React__default.createElement(core.Typography, {
|
|
65205
|
+
className: "" + styles$O["content-confirm-model"]
|
|
65206
|
+
}, "You can share this survey to teachers to get more insight about your student.")), React__default.createElement(core.DialogActions, null, React__default.createElement(core.Button, {
|
|
65207
|
+
className: "" + styles$O["btn-cancel"],
|
|
65208
|
+
onClick: function onClick() {
|
|
65209
|
+
return handleClose();
|
|
65210
|
+
}
|
|
65211
|
+
}, "SKIP"), React__default.createElement(core.Button, {
|
|
65212
|
+
color: "primary",
|
|
65213
|
+
endIcon: React__default.createElement(SendIcon, null),
|
|
65214
|
+
onClick: function onClick() {
|
|
65215
|
+
return onOpenModelExternal === null || onOpenModelExternal === void 0 ? void 0 : onOpenModelExternal();
|
|
65216
|
+
},
|
|
65217
|
+
className: "" + styles$O["btn-send-survey"]
|
|
65218
|
+
}, "YES")));
|
|
64999
65219
|
};
|
|
65000
65220
|
|
|
65001
65221
|
var CreateSurvey = function CreateSurvey() {
|
|
@@ -65052,7 +65272,9 @@ var CreateSurvey = function CreateSurvey() {
|
|
|
65052
65272
|
handleChangeEmailContent = _useCreateSurvey.handleChangeEmailContent,
|
|
65053
65273
|
emailContent = _useCreateSurvey.emailContent,
|
|
65054
65274
|
handleShareSurvey = _useCreateSurvey.handleShareSurvey,
|
|
65055
|
-
handleDeleteEmail = _useCreateSurvey.handleDeleteEmail
|
|
65275
|
+
handleDeleteEmail = _useCreateSurvey.handleDeleteEmail,
|
|
65276
|
+
handleToggleModelConfirmShare = _useCreateSurvey.handleToggleModelConfirmShare,
|
|
65277
|
+
openModelConfirmShare = _useCreateSurvey.openModelConfirmShare;
|
|
65056
65278
|
|
|
65057
65279
|
var goback = function goback() {
|
|
65058
65280
|
history.push("/list-survey");
|
|
@@ -65142,6 +65364,10 @@ var CreateSurvey = function CreateSurvey() {
|
|
|
65142
65364
|
open: openModelConfirmPublish,
|
|
65143
65365
|
handleClose: handleToggleModelConfirm,
|
|
65144
65366
|
handlePublishSurvey: handleCreateSurvey
|
|
65367
|
+
}), React__default.createElement(ConfirmShareSurvey, {
|
|
65368
|
+
open: openModelConfirmShare,
|
|
65369
|
+
handleClose: handleToggleModelConfirmShare,
|
|
65370
|
+
onOpenModelExternal: handleToggleModelShare
|
|
65145
65371
|
}), React__default.createElement(ModelSendSurvey, {
|
|
65146
65372
|
handleClose: handleToggleModelShare,
|
|
65147
65373
|
open: openModelShare,
|