touchstudy-core 0.1.184 → 0.1.186

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.
@@ -11971,6 +11971,13 @@ var QuestionGroupBlock = function QuestionGroupBlock(_ref) {
11971
11971
  var handleChangeCategory = function handleChangeCategory(val) {
11972
11972
  setFieldValue(path + ".articles[0].categoryOptions", val !== null && val !== void 0 && val.value ? [val] : []);
11973
11973
  setFieldValue(path + ".articles[0].categories", val !== null && val !== void 0 && val.value ? [val.value] : []);
11974
+ var questions = data.questions;
11975
+ setFieldValue(path + ".questions", questions.map(function (q) {
11976
+ return _extends({}, q, {
11977
+ questionTypeId: null,
11978
+ questionType: null
11979
+ });
11980
+ }));
11974
11981
  };
11975
11982
  var handleChangeSubCategory = function handleChangeSubCategory(val) {
11976
11983
  if (!(val !== null && val !== void 0 && val.value)) {
@@ -11983,6 +11990,13 @@ var QuestionGroupBlock = function QuestionGroupBlock(_ref) {
11983
11990
  setFieldValue(path + ".articles[0].categories[1]", val.value);
11984
11991
  setFieldValue(path + ".articles[0].categoryOptions[1]", val);
11985
11992
  }
11993
+ var questions = data.questions;
11994
+ setFieldValue(path + ".questions", questions.map(function (q) {
11995
+ return _extends({}, q, {
11996
+ questionTypeId: null,
11997
+ questionType: null
11998
+ });
11999
+ }));
11986
12000
  };
11987
12001
  var summary = open ? "" : [t("number_questions", {
11988
12002
  n: data.questionCount
@@ -12367,7 +12381,7 @@ var isSequentialQuestionGroups = function isSequentialQuestionGroups(questionGro
12367
12381
  };
12368
12382
  var getQuestionGroupsAfterQuestionCountChanged = function getQuestionGroupsAfterQuestionCountChanged(questionGroups, questionCount, index, checkSequential) {
12369
12383
  var currentQuestionGroup = questionGroups[index];
12370
- if (currentQuestionGroup.questionCount === questionCount) return;
12384
+ if (currentQuestionGroup.questionCount === questionCount) return questionGroups;
12371
12385
  var prevQuestionGroups = index === 0 ? [] : questionGroups.slice(0, index);
12372
12386
  var nextQuestionGroups = index === questionGroups.length - 1 ? [] : questionGroups.slice(index + 1);
12373
12387
  var questions = currentQuestionGroup.questions;
@@ -12464,6 +12478,8 @@ var _reduceToMathArticles = function reduceToMathArticles(data, isMath) {
12464
12478
  if (key === "articles") {
12465
12479
  var _values$key;
12466
12480
  values[key] = (_values$key = values[key]) !== null && _values$key !== void 0 && _values$key.length ? [values[key][0]] : [DEFAULT_ARTICLE];
12481
+ } else if (key === "questionType" || key === "questionTypeId") {
12482
+ values[key] = null;
12467
12483
  } else if (typeof values[key] === "object" && values[key] !== null) {
12468
12484
  _reduceToMathArticles(values[key]);
12469
12485
  }
@@ -15600,7 +15616,7 @@ var LessonTooltip = function LessonTooltip(_ref) {
15600
15616
  fontSize: "14px",
15601
15617
  fontWeight: "600"
15602
15618
  }
15603
- }, t("" + moment(lesson === null || lesson === void 0 ? void 0 : lesson.date).format(t("date_format"))))), React__default.createElement(Stack, {
15619
+ }, utcToLocalTime(lesson === null || lesson === void 0 ? void 0 : lesson.date, t("date_format")))), React__default.createElement(Stack, {
15604
15620
  display: "flex",
15605
15621
  flexDirection: "row",
15606
15622
  justifyContent: "space-between",