mario-teacher-student-client 2.2.30-beta → 2.2.31-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/GoalPage/hook/useGoals.d.ts +1 -1
- package/dist/index.js +24 -17
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +24 -17
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { IGoal } from "../types/types";
|
|
2
2
|
declare const useGoals: () => {
|
|
3
3
|
activeStep: number;
|
|
4
|
-
handleChangeStep: (isBackStep?: boolean | undefined) => void;
|
|
4
|
+
handleChangeStep: (isBackStep?: boolean | undefined, isTarget?: boolean | undefined) => void;
|
|
5
5
|
handleBackPage: () => void;
|
|
6
6
|
openModelCreate: boolean;
|
|
7
7
|
handleToggleModelCreate: () => void;
|
package/dist/index.js
CHANGED
|
@@ -53479,7 +53479,7 @@ function SettingPage() {
|
|
|
53479
53479
|
className: "" + styles$A["title-activity"]
|
|
53480
53480
|
}, "In-App Notifications"), React__default.createElement(SwitchComponent, {
|
|
53481
53481
|
name: "isTurnOnAllNotification",
|
|
53482
|
-
title: "Turn
|
|
53482
|
+
title: "Turn on all notifications",
|
|
53483
53483
|
value: dataSwitchNotification.isTurnOnAllNotification,
|
|
53484
53484
|
onChange: function onChange(event) {
|
|
53485
53485
|
return handleToggleAllNotification(event.target.checked, true);
|
|
@@ -53510,7 +53510,7 @@ function SettingPage() {
|
|
|
53510
53510
|
className: "" + styles$A["title-activity"]
|
|
53511
53511
|
}, "Email Notifications"), React__default.createElement(SwitchComponent, {
|
|
53512
53512
|
name: "isTurnOnAllEmail",
|
|
53513
|
-
title: "Turn
|
|
53513
|
+
title: "Turn on all emails",
|
|
53514
53514
|
value: dataSwitchNotification.isTurnOnAllEmail,
|
|
53515
53515
|
onChange: function onChange(event) {
|
|
53516
53516
|
return handleToggleAllNotification(event.target.checked);
|
|
@@ -72039,10 +72039,13 @@ var useGoals$1 = function useGoals() {
|
|
|
72039
72039
|
history.push("/personal-learning-plan/" + studentId);
|
|
72040
72040
|
};
|
|
72041
72041
|
|
|
72042
|
-
var handleChangeStep = function handleChangeStep(isBackStep) {
|
|
72042
|
+
var handleChangeStep = function handleChangeStep(isBackStep, isTarget) {
|
|
72043
72043
|
if (!isBackStep) {
|
|
72044
72044
|
setActiveStep(activeStep + 1);
|
|
72045
|
-
|
|
72045
|
+
|
|
72046
|
+
if (!!goalFormCreate.id) {
|
|
72047
|
+
!isTarget ? update(goalFormCreate.id, goalFormCreate) : createCheckPoint(goalFormCreate.id, goalFormCreate.checkPoints);
|
|
72048
|
+
}
|
|
72046
72049
|
} else {
|
|
72047
72050
|
setActiveStep(activeStep - 1);
|
|
72048
72051
|
}
|
|
@@ -72171,8 +72174,10 @@ var useGoals$1 = function useGoals() {
|
|
|
72171
72174
|
|
|
72172
72175
|
var _temp12 = _catch(function () {
|
|
72173
72176
|
return Promise.resolve(createCheckpoint$1(goalId, parseInt(studentId), targets.map(function (r) {
|
|
72177
|
+
var _r$text;
|
|
72178
|
+
|
|
72174
72179
|
return _extends({}, r, {
|
|
72175
|
-
text: r.text.trim()
|
|
72180
|
+
text: r === null || r === void 0 ? void 0 : (_r$text = r.text) === null || _r$text === void 0 ? void 0 : _r$text.trim()
|
|
72176
72181
|
});
|
|
72177
72182
|
}).filter(function (r) {
|
|
72178
72183
|
return r.text && r.endTime && r.time && r.status;
|
|
@@ -72195,12 +72200,14 @@ var useGoals$1 = function useGoals() {
|
|
|
72195
72200
|
var update = React.useCallback(function (goalId, data) {
|
|
72196
72201
|
try {
|
|
72197
72202
|
var _temp14 = _catch(function () {
|
|
72203
|
+
var _data$baseLineChecked, _data$category, _data$detail, _data$name;
|
|
72204
|
+
|
|
72198
72205
|
return Promise.resolve(updateItem$2(goalId, parseInt(studentId), _extends({}, data, {
|
|
72199
72206
|
studentId: parseInt(studentId),
|
|
72200
|
-
baseLineChecked: data.baseLineChecked.trim(),
|
|
72201
|
-
category: data.category.trim(),
|
|
72202
|
-
detail: data.detail.trim(),
|
|
72203
|
-
name: data.name.trim()
|
|
72207
|
+
baseLineChecked: data === null || data === void 0 ? void 0 : (_data$baseLineChecked = data.baseLineChecked) === null || _data$baseLineChecked === void 0 ? void 0 : _data$baseLineChecked.trim(),
|
|
72208
|
+
category: data === null || data === void 0 ? void 0 : (_data$category = data.category) === null || _data$category === void 0 ? void 0 : _data$category.trim(),
|
|
72209
|
+
detail: data === null || data === void 0 ? void 0 : (_data$detail = data.detail) === null || _data$detail === void 0 ? void 0 : _data$detail.trim(),
|
|
72210
|
+
name: data === null || data === void 0 ? void 0 : (_data$name = data.name) === null || _data$name === void 0 ? void 0 : _data$name.trim()
|
|
72204
72211
|
}))).then(function () {});
|
|
72205
72212
|
}, function (err) {
|
|
72206
72213
|
var _err$response4, _err$response4$data;
|
|
@@ -72235,12 +72242,14 @@ var useGoals$1 = function useGoals() {
|
|
|
72235
72242
|
|
|
72236
72243
|
var _temp16 = function () {
|
|
72237
72244
|
if (!goalFormCreate.id) {
|
|
72245
|
+
var _goalFormCreate$baseL, _goalFormCreate$categ, _goalFormCreate$detai, _goalFormCreate$name;
|
|
72246
|
+
|
|
72238
72247
|
return Promise.resolve(createItem$2(_extends({}, goalFormCreate, {
|
|
72239
72248
|
studentId: parseInt(studentId),
|
|
72240
|
-
baseLineChecked: goalFormCreate.baseLineChecked.trim(),
|
|
72241
|
-
category: goalFormCreate.category.trim(),
|
|
72242
|
-
detail: goalFormCreate.detail.trim(),
|
|
72243
|
-
name: goalFormCreate.name.trim()
|
|
72249
|
+
baseLineChecked: goalFormCreate === null || goalFormCreate === void 0 ? void 0 : (_goalFormCreate$baseL = goalFormCreate.baseLineChecked) === null || _goalFormCreate$baseL === void 0 ? void 0 : _goalFormCreate$baseL.trim(),
|
|
72250
|
+
category: goalFormCreate === null || goalFormCreate === void 0 ? void 0 : (_goalFormCreate$categ = goalFormCreate.category) === null || _goalFormCreate$categ === void 0 ? void 0 : _goalFormCreate$categ.trim(),
|
|
72251
|
+
detail: goalFormCreate === null || goalFormCreate === void 0 ? void 0 : (_goalFormCreate$detai = goalFormCreate.detail) === null || _goalFormCreate$detai === void 0 ? void 0 : _goalFormCreate$detai.trim(),
|
|
72252
|
+
name: goalFormCreate === null || goalFormCreate === void 0 ? void 0 : (_goalFormCreate$name = goalFormCreate.name) === null || _goalFormCreate$name === void 0 ? void 0 : _goalFormCreate$name.trim()
|
|
72244
72253
|
}))).then(function (res) {
|
|
72245
72254
|
var _temp15 = function () {
|
|
72246
72255
|
if (!!res.data) {
|
|
@@ -72278,11 +72287,9 @@ var useGoals$1 = function useGoals() {
|
|
|
72278
72287
|
checkPoints: [initialTarget, initialTarget, initialTarget, initialTarget]
|
|
72279
72288
|
}));
|
|
72280
72289
|
setActiveStep(1);
|
|
72290
|
+
getAll();
|
|
72281
72291
|
}
|
|
72282
72292
|
}, [openModelCreate]);
|
|
72283
|
-
React.useEffect(function () {
|
|
72284
|
-
getAll();
|
|
72285
|
-
}, []);
|
|
72286
72293
|
return {
|
|
72287
72294
|
activeStep: activeStep,
|
|
72288
72295
|
handleChangeStep: handleChangeStep,
|
|
@@ -72665,7 +72672,7 @@ var ModelPickTarget = function ModelPickTarget(_ref) {
|
|
|
72665
72672
|
}, React__default.createElement(core.Grid, null), React__default.createElement(core.Button, {
|
|
72666
72673
|
className: "" + goalPage["button-action"],
|
|
72667
72674
|
onClick: function onClick() {
|
|
72668
|
-
return onChangeStep();
|
|
72675
|
+
return onChangeStep(false, true);
|
|
72669
72676
|
}
|
|
72670
72677
|
}, "Keep going!"), React__default.createElement(core.Button, {
|
|
72671
72678
|
className: "" + goalPage["button-add-grey"],
|