tnx-shared 5.1.548 → 5.1.550

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.
@@ -4492,10 +4492,12 @@
4492
4492
  CommonService.prototype.getStartDayEndDayWeek = function (date) {
4493
4493
  if (date === void 0) { date = new Date(); }
4494
4494
  var dateDiff = date.getDate() - date.getDay() + (date.getDay() == 0 ? -6 : 1);
4495
- return [
4496
- new Date(date.setDate(dateDiff)),
4497
- new Date(new Date(date.setDate(dateDiff + 6)))
4498
- ];
4495
+ var startDate = new Date(date.setDate(dateDiff));
4496
+ var endDate = new Date(new Date(date.setDate(dateDiff + 6)));
4497
+ if (startDate.getDate() > endDate.getDate() && startDate.getMonth() == endDate.getMonth()) {
4498
+ endDate.setMonth(endDate.getMonth() + 1);
4499
+ }
4500
+ return [startDate, endDate];
4499
4501
  };
4500
4502
  CommonService.prototype.addHtmlContentWithTagAround = function (lstTag, className, tagAround) {
4501
4503
  var e_6, _b;
@@ -18176,7 +18178,9 @@
18176
18178
  case 10: return [3 /*break*/, 17];
18177
18179
  case 11:
18178
18180
  if (!(resultCheck.success && resultCheck.data)) return [3 /*break*/, 15];
18179
- this.model.formState = exports.FormState.EDIT;
18181
+ if (!this.model.formState) {
18182
+ this.model.formState = exports.FormState.EDIT;
18183
+ }
18180
18184
  if (this.crudForm) {
18181
18185
  this.crudForm.setIsLoadedDataEdit(false);
18182
18186
  }
@@ -33595,7 +33599,7 @@
33595
33599
  }
33596
33600
  this.isDisableOpenFull = this.setting.schema.length <= 4 && !this._commonService.isMobile();
33597
33601
  _super.prototype.ngOnInit.call(this);
33598
- var controlSetDefaultValue = this.setting.schema.filter(function (p) { return p.hasOwnProperty('defaultValue') && p instanceof DropdownControlSchema; });
33602
+ var controlSetDefaultValue = this.setting.schema.filter(function (p) { return p.hasOwnProperty('defaultValue') && (p instanceof DropdownControlSchema || p instanceof DateTimeControlSchema); });
33599
33603
  if (controlSetDefaultValue.length) {
33600
33604
  controlSetDefaultValue.forEach(function (item) {
33601
33605
  _this.defaultValues[item.field] = item.defaultValue;