mario-teacher-student-client 2.2.29-beta → 2.2.30-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/ActionPoint/constants/function.d.ts +2 -0
- package/dist/containers/GoalPage/components/CreateGoalModel.d.ts +1 -1
- package/dist/containers/GoalPage/components/Steps/ModelPickTarget.d.ts +1 -1
- package/dist/containers/GoalPage/hook/useGoals.d.ts +1 -0
- package/dist/containers/GoalPage/types/types.d.ts +2 -0
- package/dist/index.css +11 -1
- package/dist/index.js +58 -15
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +58 -15
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { IPropModelCreate } from "../types/types";
|
|
3
|
-
declare const CreateGoalModel: ({ open, onToggleModel, activeStep, handleChangeStep, goalFormCreate, handleChangeValueForm, handleReturnCategoryOptions, handleReturnNameOptions, handleReturnDetailOptions, handleReturnTargetOptions, handleRemoveTarget, handleCreateGoal }: IPropModelCreate) => JSX.Element;
|
|
3
|
+
declare const CreateGoalModel: ({ open, onToggleModel, activeStep, handleChangeStep, goalFormCreate, handleChangeValueForm, handleReturnCategoryOptions, handleReturnNameOptions, handleReturnDetailOptions, handleReturnTargetOptions, handleRemoveTarget, handleCreateGoal, handleAddTargetItem }: IPropModelCreate) => JSX.Element;
|
|
4
4
|
export default CreateGoalModel;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { IPickTarget } from "../../types/types";
|
|
3
|
-
declare const ModelPickTarget: ({ onChangeStep, onReturnTargetOptions, valueTargetOptions, onChangeValueForm, onRemoveTarget }: IPickTarget) => JSX.Element;
|
|
3
|
+
declare const ModelPickTarget: ({ onChangeStep, onReturnTargetOptions, valueTargetOptions, onChangeValueForm, onRemoveTarget, onAddTargetItem }: IPickTarget) => JSX.Element;
|
|
4
4
|
export default ModelPickTarget;
|
|
@@ -50,6 +50,7 @@ export interface IPropModelCreate {
|
|
|
50
50
|
handleReturnTargetOptions: Function;
|
|
51
51
|
handleRemoveTarget: Function;
|
|
52
52
|
handleCreateGoal: Function;
|
|
53
|
+
handleAddTargetItem: Function;
|
|
53
54
|
}
|
|
54
55
|
export interface ISelectCategory {
|
|
55
56
|
onChangeStep: Function;
|
|
@@ -75,6 +76,7 @@ export interface IPickTarget {
|
|
|
75
76
|
valueTargetOptions: ITarget[];
|
|
76
77
|
onChangeValueForm: Function;
|
|
77
78
|
onRemoveTarget: Function;
|
|
79
|
+
onAddTargetItem: Function;
|
|
78
80
|
}
|
|
79
81
|
export interface IBaseLineModel {
|
|
80
82
|
onCreateGoal: Function;
|
package/dist/index.css
CHANGED
|
@@ -17599,7 +17599,8 @@ h2._1hrCT {
|
|
|
17599
17599
|
._z3uxc ._2fKtp {
|
|
17600
17600
|
width: 100%;
|
|
17601
17601
|
display: flex;
|
|
17602
|
-
justify-content: center;
|
|
17602
|
+
justify-content: center;
|
|
17603
|
+
justify-content: space-around; }
|
|
17603
17604
|
._z3uxc ._2fKtp ._1V9_B {
|
|
17604
17605
|
background: #336dda;
|
|
17605
17606
|
color: #ffffff;
|
|
@@ -17610,10 +17611,19 @@ h2._1hrCT {
|
|
|
17610
17611
|
background: #517fd5; }
|
|
17611
17612
|
._z3uxc ._2fKtp ._1V9_B:disabled {
|
|
17612
17613
|
background: #517fd5; }
|
|
17614
|
+
._z3uxc ._2fKtp ._1MjbD {
|
|
17615
|
+
background: rgba(102, 112, 128, 0.1);
|
|
17616
|
+
color: #667080;
|
|
17617
|
+
border-radius: 12px;
|
|
17618
|
+
margin-top: 20px;
|
|
17619
|
+
padding: 10px 15px; }
|
|
17613
17620
|
|
|
17614
17621
|
._3cjdO {
|
|
17615
17622
|
min-width: 250px; }
|
|
17616
17623
|
|
|
17624
|
+
._16r__ {
|
|
17625
|
+
min-width: 150px; }
|
|
17626
|
+
|
|
17617
17627
|
._2eP1A {
|
|
17618
17628
|
background-color: white;
|
|
17619
17629
|
border: solid 1px #cbd4c9;
|
package/dist/index.js
CHANGED
|
@@ -72040,7 +72040,12 @@ var useGoals$1 = function useGoals() {
|
|
|
72040
72040
|
};
|
|
72041
72041
|
|
|
72042
72042
|
var handleChangeStep = function handleChangeStep(isBackStep) {
|
|
72043
|
-
!isBackStep
|
|
72043
|
+
if (!isBackStep) {
|
|
72044
|
+
setActiveStep(activeStep + 1);
|
|
72045
|
+
!!goalFormCreate.id && update(goalFormCreate.id, goalFormCreate);
|
|
72046
|
+
} else {
|
|
72047
|
+
setActiveStep(activeStep - 1);
|
|
72048
|
+
}
|
|
72044
72049
|
};
|
|
72045
72050
|
|
|
72046
72051
|
var handleToggleModelCreate = function handleToggleModelCreate() {
|
|
@@ -72071,6 +72076,14 @@ var useGoals$1 = function useGoals() {
|
|
|
72071
72076
|
}));
|
|
72072
72077
|
};
|
|
72073
72078
|
|
|
72079
|
+
var handleAddTargetItem = function handleAddTargetItem() {
|
|
72080
|
+
var targets = goalFormCreate.checkPoints;
|
|
72081
|
+
targets.push(initialTarget);
|
|
72082
|
+
setGoalFormCreate(_extends({}, goalFormCreate, {
|
|
72083
|
+
checkPoints: targets
|
|
72084
|
+
}));
|
|
72085
|
+
};
|
|
72086
|
+
|
|
72074
72087
|
var handleReturnCategoryOptions = function handleReturnCategoryOptions() {
|
|
72075
72088
|
return Object.keys(optionSelect) || [];
|
|
72076
72089
|
};
|
|
@@ -72157,7 +72170,13 @@ var useGoals$1 = function useGoals() {
|
|
|
72157
72170
|
dispatch(marioCore.setLoading(true));
|
|
72158
72171
|
|
|
72159
72172
|
var _temp12 = _catch(function () {
|
|
72160
|
-
return Promise.resolve(createCheckpoint$1(goalId, parseInt(studentId), targets
|
|
72173
|
+
return Promise.resolve(createCheckpoint$1(goalId, parseInt(studentId), targets.map(function (r) {
|
|
72174
|
+
return _extends({}, r, {
|
|
72175
|
+
text: r.text.trim()
|
|
72176
|
+
});
|
|
72177
|
+
}).filter(function (r) {
|
|
72178
|
+
return r.text && r.endTime && r.time && r.status;
|
|
72179
|
+
}))).then(function () {});
|
|
72161
72180
|
}, function (err) {
|
|
72162
72181
|
var _err$response3, _err$response3$data;
|
|
72163
72182
|
|
|
@@ -72176,7 +72195,13 @@ var useGoals$1 = function useGoals() {
|
|
|
72176
72195
|
var update = React.useCallback(function (goalId, data) {
|
|
72177
72196
|
try {
|
|
72178
72197
|
var _temp14 = _catch(function () {
|
|
72179
|
-
return Promise.resolve(updateItem$2(goalId, parseInt(studentId),
|
|
72198
|
+
return Promise.resolve(updateItem$2(goalId, parseInt(studentId), _extends({}, data, {
|
|
72199
|
+
studentId: parseInt(studentId),
|
|
72200
|
+
baseLineChecked: data.baseLineChecked.trim(),
|
|
72201
|
+
category: data.category.trim(),
|
|
72202
|
+
detail: data.detail.trim(),
|
|
72203
|
+
name: data.name.trim()
|
|
72204
|
+
}))).then(function () {});
|
|
72180
72205
|
}, function (err) {
|
|
72181
72206
|
var _err$response4, _err$response4$data;
|
|
72182
72207
|
|
|
@@ -72211,7 +72236,11 @@ var useGoals$1 = function useGoals() {
|
|
|
72211
72236
|
var _temp16 = function () {
|
|
72212
72237
|
if (!goalFormCreate.id) {
|
|
72213
72238
|
return Promise.resolve(createItem$2(_extends({}, goalFormCreate, {
|
|
72214
|
-
studentId: parseInt(studentId)
|
|
72239
|
+
studentId: parseInt(studentId),
|
|
72240
|
+
baseLineChecked: goalFormCreate.baseLineChecked.trim(),
|
|
72241
|
+
category: goalFormCreate.category.trim(),
|
|
72242
|
+
detail: goalFormCreate.detail.trim(),
|
|
72243
|
+
name: goalFormCreate.name.trim()
|
|
72215
72244
|
}))).then(function (res) {
|
|
72216
72245
|
var _temp15 = function () {
|
|
72217
72246
|
if (!!res.data) {
|
|
@@ -72245,7 +72274,9 @@ var useGoals$1 = function useGoals() {
|
|
|
72245
72274
|
}, [goalFormCreate]);
|
|
72246
72275
|
React.useEffect(function () {
|
|
72247
72276
|
if (!openModelCreate) {
|
|
72248
|
-
setGoalFormCreate(initialGoalModel
|
|
72277
|
+
setGoalFormCreate(_extends({}, initialGoalModel, {
|
|
72278
|
+
checkPoints: [initialTarget, initialTarget, initialTarget, initialTarget]
|
|
72279
|
+
}));
|
|
72249
72280
|
setActiveStep(1);
|
|
72250
72281
|
}
|
|
72251
72282
|
}, [openModelCreate]);
|
|
@@ -72267,11 +72298,12 @@ var useGoals$1 = function useGoals() {
|
|
|
72267
72298
|
handleRemoveTarget: handleRemoveTarget,
|
|
72268
72299
|
handleCreateGoal: handleCreateGoal,
|
|
72269
72300
|
goalList: goalList,
|
|
72270
|
-
getById: getById
|
|
72301
|
+
getById: getById,
|
|
72302
|
+
handleAddTargetItem: handleAddTargetItem
|
|
72271
72303
|
};
|
|
72272
72304
|
};
|
|
72273
72305
|
|
|
72274
|
-
var goalPage = {"icon-header":"_YAtNC","cancel-button":"_3bYIU","item-between":"_3huiX","ml-10":"_1Y18n","block-goal":"_1ShQw","container-goal-page":"_jw03r","pointer":"_ZK47B","block-filter":"_3xa3T","select-filter":"_1SlBm","box-goal-item":"_2fvMj","header-item":"_2bu5G","header-item-title":"_3xEHS","title":"_FnPu2","header-button":"_2xAED","header-button-title":"_pOjtL","header-button-icon":"_3Gyut","baseline-item":"_1uv1z","baseline-title":"_1T5lR","box-target":"_93zyw","target-item":"_ogLm4","target-item-title":"_2d5aK","target-item-description":"_3VgfO","target-item-time":"_1y0M2","target-item-box-status":"_3a_lC","target-item-note":"_2qlsz","model-create-goal":"_38RlV","box-content-model":"_1USJi","box-target-content":"_2CG2W","date-range":"_ECsZO","target-count":"_1cgKE","box-step":"_z3uxc","title-step":"_Hz1Wh","title-detail":"_dUniv","description-step":"_3qnsc","box-action":"_2fKtp","button-action":"_1V9_B","select-option":"_3cjdO","input-date-icon":"_2eP1A","date-placeholder":"_2bO1b","box-status-target":"_17V8C","status":"_3U6IZ","completed":"_3D2OE","inprogress":"_1LPjK","notyetstarted":"_2r1u0","ontrack":"_2_vqN"};
|
|
72306
|
+
var goalPage = {"icon-header":"_YAtNC","cancel-button":"_3bYIU","item-between":"_3huiX","ml-10":"_1Y18n","block-goal":"_1ShQw","container-goal-page":"_jw03r","pointer":"_ZK47B","block-filter":"_3xa3T","select-filter":"_1SlBm","box-goal-item":"_2fvMj","header-item":"_2bu5G","header-item-title":"_3xEHS","title":"_FnPu2","header-button":"_2xAED","header-button-title":"_pOjtL","header-button-icon":"_3Gyut","baseline-item":"_1uv1z","baseline-title":"_1T5lR","box-target":"_93zyw","target-item":"_ogLm4","target-item-title":"_2d5aK","target-item-description":"_3VgfO","target-item-time":"_1y0M2","target-item-box-status":"_3a_lC","target-item-note":"_2qlsz","model-create-goal":"_38RlV","box-content-model":"_1USJi","box-target-content":"_2CG2W","date-range":"_ECsZO","target-count":"_1cgKE","box-step":"_z3uxc","title-step":"_Hz1Wh","title-detail":"_dUniv","description-step":"_3qnsc","box-action":"_2fKtp","button-action":"_1V9_B","button-add-grey":"_1MjbD","select-option":"_3cjdO","select-status":"_16r__","input-date-icon":"_2eP1A","date-placeholder":"_2bO1b","box-status-target":"_17V8C","status":"_3U6IZ","completed":"_3D2OE","inprogress":"_1LPjK","notyetstarted":"_2r1u0","ontrack":"_2_vqN"};
|
|
72275
72307
|
|
|
72276
72308
|
var FilterGoalPage = function FilterGoalPage() {
|
|
72277
72309
|
return React__default.createElement(core.Grid, {
|
|
@@ -72470,6 +72502,7 @@ var ChooseArea = function ChooseArea(_ref) {
|
|
|
72470
72502
|
})), React__default.createElement(core.Grid, {
|
|
72471
72503
|
className: "" + goalPage["box-action"]
|
|
72472
72504
|
}, React__default.createElement(core.Button, {
|
|
72505
|
+
disabled: !valueName,
|
|
72473
72506
|
className: "" + goalPage["button-action"],
|
|
72474
72507
|
onClick: function onClick() {
|
|
72475
72508
|
return onChangeStep();
|
|
@@ -72517,6 +72550,7 @@ var DetailFormCreate = function DetailFormCreate(_ref) {
|
|
|
72517
72550
|
})), React__default.createElement(core.Grid, {
|
|
72518
72551
|
className: "" + goalPage["box-action"]
|
|
72519
72552
|
}, React__default.createElement(core.Button, {
|
|
72553
|
+
disabled: !valueDetail,
|
|
72520
72554
|
className: "" + goalPage["button-action"],
|
|
72521
72555
|
onClick: function onClick() {
|
|
72522
72556
|
return onChangeStep();
|
|
@@ -72552,7 +72586,8 @@ var ModelPickTarget = function ModelPickTarget(_ref) {
|
|
|
72552
72586
|
onReturnTargetOptions = _ref.onReturnTargetOptions,
|
|
72553
72587
|
valueTargetOptions = _ref.valueTargetOptions,
|
|
72554
72588
|
onChangeValueForm = _ref.onChangeValueForm,
|
|
72555
|
-
onRemoveTarget = _ref.onRemoveTarget
|
|
72589
|
+
onRemoveTarget = _ref.onRemoveTarget,
|
|
72590
|
+
onAddTargetItem = _ref.onAddTargetItem;
|
|
72556
72591
|
return React__default.createElement(core.Grid, {
|
|
72557
72592
|
className: "" + goalPage["box-step"]
|
|
72558
72593
|
}, React__default.createElement(core.Typography, {
|
|
@@ -72604,14 +72639,13 @@ var ModelPickTarget = function ModelPickTarget(_ref) {
|
|
|
72604
72639
|
customInput: React__default.createElement(CustomInputDatePicker, null),
|
|
72605
72640
|
placeholderText: "day-month-year"
|
|
72606
72641
|
})), React__default.createElement(lab.Autocomplete, {
|
|
72607
|
-
freeSolo: true,
|
|
72608
72642
|
id: "combo-box-demo",
|
|
72609
72643
|
value: target.status,
|
|
72610
72644
|
options: optionStatusTarget,
|
|
72611
72645
|
getOptionLabel: function getOptionLabel(option) {
|
|
72612
72646
|
return option;
|
|
72613
72647
|
},
|
|
72614
|
-
className: goalPage["select-
|
|
72648
|
+
className: goalPage["select-status"] + " " + goalPage["ml-10"],
|
|
72615
72649
|
onChange: function onChange(_e, value) {
|
|
72616
72650
|
return onChangeValueForm(value, "checkPoints", index, "status");
|
|
72617
72651
|
},
|
|
@@ -72628,12 +72662,17 @@ var ModelPickTarget = function ModelPickTarget(_ref) {
|
|
|
72628
72662
|
}));
|
|
72629
72663
|
})), React__default.createElement(core.Grid, {
|
|
72630
72664
|
className: "" + goalPage["box-action"]
|
|
72631
|
-
}, React__default.createElement(core.Button, {
|
|
72665
|
+
}, React__default.createElement(core.Grid, null), React__default.createElement(core.Button, {
|
|
72632
72666
|
className: "" + goalPage["button-action"],
|
|
72633
72667
|
onClick: function onClick() {
|
|
72634
72668
|
return onChangeStep();
|
|
72635
72669
|
}
|
|
72636
|
-
}, "Keep going!")
|
|
72670
|
+
}, "Keep going!"), React__default.createElement(core.Button, {
|
|
72671
|
+
className: "" + goalPage["button-add-grey"],
|
|
72672
|
+
onClick: function onClick() {
|
|
72673
|
+
return onAddTargetItem();
|
|
72674
|
+
}
|
|
72675
|
+
}, React__default.createElement(AddIcon, null), "Add target")));
|
|
72637
72676
|
};
|
|
72638
72677
|
|
|
72639
72678
|
var BaseLine = function BaseLine(_ref) {
|
|
@@ -72678,7 +72717,8 @@ var CreateGoalModel = function CreateGoalModel(_ref) {
|
|
|
72678
72717
|
handleReturnDetailOptions = _ref.handleReturnDetailOptions,
|
|
72679
72718
|
handleReturnTargetOptions = _ref.handleReturnTargetOptions,
|
|
72680
72719
|
handleRemoveTarget = _ref.handleRemoveTarget,
|
|
72681
|
-
handleCreateGoal = _ref.handleCreateGoal
|
|
72720
|
+
handleCreateGoal = _ref.handleCreateGoal,
|
|
72721
|
+
handleAddTargetItem = _ref.handleAddTargetItem;
|
|
72682
72722
|
return React__default.createElement(core.Dialog, {
|
|
72683
72723
|
open: open,
|
|
72684
72724
|
maxWidth: "xl"
|
|
@@ -72726,7 +72766,8 @@ var CreateGoalModel = function CreateGoalModel(_ref) {
|
|
|
72726
72766
|
valueTargetOptions: goalFormCreate.checkPoints,
|
|
72727
72767
|
onReturnTargetOptions: handleReturnTargetOptions,
|
|
72728
72768
|
onChangeValueForm: handleChangeValueForm,
|
|
72729
|
-
onRemoveTarget: handleRemoveTarget
|
|
72769
|
+
onRemoveTarget: handleRemoveTarget,
|
|
72770
|
+
onAddTargetItem: handleAddTargetItem
|
|
72730
72771
|
})), React__default.createElement(core.Grid, {
|
|
72731
72772
|
hidden: activeStep !== 5
|
|
72732
72773
|
}, React__default.createElement(BaseLine, {
|
|
@@ -72751,6 +72792,7 @@ var MyGoals = function MyGoals() {
|
|
|
72751
72792
|
handleReturnTargetOptions = _useGoals.handleReturnTargetOptions,
|
|
72752
72793
|
handleRemoveTarget = _useGoals.handleRemoveTarget,
|
|
72753
72794
|
handleCreateGoal = _useGoals.handleCreateGoal,
|
|
72795
|
+
handleAddTargetItem = _useGoals.handleAddTargetItem,
|
|
72754
72796
|
goalList = _useGoals.goalList,
|
|
72755
72797
|
getById = _useGoals.getById;
|
|
72756
72798
|
|
|
@@ -72777,7 +72819,8 @@ var MyGoals = function MyGoals() {
|
|
|
72777
72819
|
handleReturnDetailOptions: handleReturnDetailOptions,
|
|
72778
72820
|
handleReturnTargetOptions: handleReturnTargetOptions,
|
|
72779
72821
|
handleRemoveTarget: handleRemoveTarget,
|
|
72780
|
-
handleCreateGoal: handleCreateGoal
|
|
72822
|
+
handleCreateGoal: handleCreateGoal,
|
|
72823
|
+
handleAddTargetItem: handleAddTargetItem
|
|
72781
72824
|
}), React__default.createElement(core.Grid, {
|
|
72782
72825
|
className: "" + goalPage["container-goal-page"]
|
|
72783
72826
|
}, React__default.createElement(FilterGoalPage, null), goalList.map(function (goal) {
|