ps-toolkit-ui 1.3.65 → 1.3.68

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.
@@ -2616,7 +2616,7 @@
2616
2616
  if (option.AccessType === exports.PermissionAccessTypeEnum.Update) {
2617
2617
  if (this_2.table.form) {
2618
2618
  opt.onClick = function () {
2619
- _this.table.form.url = _this.table.url + 'Update/' + _this.row.Data.Id;
2619
+ _this.table.form.url = _this.table.url + 'update/' + _this.row.Data.Id;
2620
2620
  if (_this.table.hasChildren && _this.row.Data.ParentId != null) {
2621
2621
  _this.table.form.onSuccessBase = function () {
2622
2622
  _this.table.modal.hide();
@@ -2641,7 +2641,7 @@
2641
2641
  };
2642
2642
  }
2643
2643
  else {
2644
- opt.url = this_2.table.url + '/Update/' + this_2.row.Data.Id;
2644
+ opt.url = this_2.table.url + '/update/' + this_2.row.Data.Id;
2645
2645
  }
2646
2646
  }
2647
2647
  else if (option.AccessType === exports.PermissionAccessTypeEnum.Delete) {
@@ -2696,15 +2696,15 @@
2696
2696
  p.Accesses = _this.row.Options.filter(function (x) { return x.ParentId === option.Id; });
2697
2697
  opt.modal.table.permissions = p;
2698
2698
  if (opt.modal.table.form) {
2699
- opt.modal.table.form.url = p.getUrl() + 'Insert';
2700
- opt.modal.table.form.baseUrl = p.getUrl() + 'Insert';
2699
+ opt.modal.table.form.url = p.getUrl() + 'insert';
2700
+ opt.modal.table.form.baseUrl = p.getUrl() + 'insert';
2701
2701
  }
2702
2702
  opt.modal.table.set();
2703
2703
  }
2704
2704
  if (opt.modal.form) {
2705
2705
  opt.modal.form.name = option.Name;
2706
- opt.modal.form.url = opt.modal.form.baseUrl + 'Update/' + _this.row.Data.Id;
2707
- opt.modal.form.loadData(opt.modal.form.baseUrl + 'Get/' + _this.row.Data.Id);
2706
+ opt.modal.form.url = opt.modal.form.baseUrl + 'update/' + _this.row.Data.Id;
2707
+ opt.modal.form.loadData(opt.modal.form.baseUrl + 'get/' + _this.row.Data.Id);
2708
2708
  opt.modal.form.onSuccessBase = function () {
2709
2709
  opt.modal.hide();
2710
2710
  };
@@ -2722,8 +2722,8 @@
2722
2722
  p.Accesses = _this.row.Options.filter(function (x) { return x.ParentId === option.Id; });
2723
2723
  r.table.permissions = p;
2724
2724
  if (r.table.form) {
2725
- r.table.form.url = p.getUrl() + 'Insert';
2726
- r.table.form.baseUrl = p.getUrl() + 'Insert';
2725
+ r.table.form.url = p.getUrl() + 'insert';
2726
+ r.table.form.baseUrl = p.getUrl() + 'insert';
2727
2727
  }
2728
2728
  r.table.set();
2729
2729
  }
@@ -4817,10 +4817,7 @@
4817
4817
  FormPlaqueComponent.prototype.onFocusIn = function (e) {
4818
4818
  if (e === void 0) { e = null; }
4819
4819
  if (e == null || !(e.screenX && e.screenX !== 0 && e.screenY && e.screenY !== 0)) {
4820
- setTimeout(function () {
4821
- console.log($('#Part1Input .control'));
4822
- $('#Part1Input .control').focus();
4823
- }, 100);
4820
+ this.part1.focus();
4824
4821
  }
4825
4822
  };
4826
4823
  FormPlaqueComponent.prototype.onKeyDown = function (e) {
@@ -5443,13 +5440,13 @@
5443
5440
  var p = new PermissionClass();
5444
5441
  p.Type = exports.PermissionTypeEnum.Form;
5445
5442
  var lAccess = new PermissionClass();
5446
- lAccess.Action = 'List';
5443
+ lAccess.Action = 'list';
5447
5444
  var iAccess = new PermissionClass();
5448
- iAccess.Action = 'Insert';
5445
+ iAccess.Action = 'insert';
5449
5446
  var uAccess = new PermissionClass();
5450
- uAccess.Action = 'Update';
5447
+ uAccess.Action = 'update';
5451
5448
  var dAccess = new PermissionClass();
5452
- dAccess.Action = 'Delete';
5449
+ dAccess.Action = 'delete';
5453
5450
  p.Accesses = [
5454
5451
  lAccess,
5455
5452
  iAccess,
@@ -6622,12 +6619,18 @@
6622
6619
  this.car.displayLabel = this.carF.displayLabel = this.motor.displayLabel = false;
6623
6620
  this.inp.setValue = function (v) {
6624
6621
  if (v != null) {
6625
- if (v.split('_').length === 2) {
6622
+ if (v.split('_').length === 2 && v.split('_').some(function (x) { return !isNaN(parseInt(x, 10)); })) {
6626
6623
  _this.type = exports.VehicleType.Motorcycle;
6627
6624
  setTimeout(function () {
6628
6625
  _this.motor.setValue(v, false);
6629
6626
  });
6630
6627
  }
6628
+ else if (v.split('_').length === 2) {
6629
+ _this.type = exports.VehicleType.CarF;
6630
+ setTimeout(function () {
6631
+ _this.carF.setValue(v, false);
6632
+ });
6633
+ }
6631
6634
  else if (v.split('_').length === 4) {
6632
6635
  _this.type = exports.VehicleType.Car;
6633
6636
  setTimeout(function () {
@@ -6649,6 +6652,10 @@
6649
6652
  _this.inp.error = exports.InputError.Required;
6650
6653
  return false;
6651
6654
  }
6655
+ if (_this.inp.required && _this.type === exports.VehicleType.CarF && !_this.carF.isValid()) {
6656
+ _this.inp.error = exports.InputError.Required;
6657
+ return false;
6658
+ }
6652
6659
  return true;
6653
6660
  };
6654
6661
  this.inp.clear = function () {
@@ -6657,9 +6664,10 @@
6657
6664
  _this.type = exports.VehicleType.Car;
6658
6665
  _this.car.clear();
6659
6666
  _this.motor.clear();
6667
+ _this.carF.clear();
6660
6668
  };
6661
6669
  this.inp.data = function () {
6662
- return _this.type === exports.VehicleType.Car ? _this.car.data() : _this.type === exports.VehicleType.Motorcycle ? _this.motor.data() : null;
6670
+ return _this.type === exports.VehicleType.Car ? _this.car.data() : _this.type === exports.VehicleType.Motorcycle ? _this.motor.data() : _this.type === exports.VehicleType.CarF ? _this.carF.data() : null;
6663
6671
  };
6664
6672
  };
6665
6673
  FormCarComponent.prototype.changeType = function (t) {
@@ -6670,15 +6678,9 @@
6670
6678
  this.onFocusIn();
6671
6679
  };
6672
6680
  FormCarComponent.prototype.onFocusIn = function () {
6673
- if (this.type === exports.VehicleType.Car) {
6674
- this.car.focus();
6675
- }
6676
- else if (this.type === exports.VehicleType.CarF) {
6677
- this.carF.focus();
6678
- }
6679
- else if (this.type === exports.VehicleType.Motorcycle) {
6680
- this.motor.focus();
6681
- }
6681
+ setTimeout(function () {
6682
+ $('#Part1Input .control').focus();
6683
+ }, 100);
6682
6684
  };
6683
6685
  return FormCarComponent;
6684
6686
  }());
@@ -7353,12 +7355,12 @@
7353
7355
  return this.searchForm ? this.searchForm.json(d) : d;
7354
7356
  };
7355
7357
  TableClass.prototype.getUrl = function () {
7356
- return this.url + 'List';
7358
+ return this.url + 'list';
7357
7359
  };
7358
7360
  TableClass.prototype.showInsertModal = function (cId) {
7359
7361
  if (cId === void 0) { cId = null; }
7360
7362
  var insertAccess = this.permissions.getAccess(exports.PermissionAccessTypeEnum.Insert);
7361
- this.form.url = this.form.baseUrl = this.url + 'Insert' + (cId ? '/' + cId : '');
7363
+ this.form.url = this.form.baseUrl = this.url + 'insert' + (cId ? '/' + cId : '');
7362
7364
  this.form.name = insertAccess.Name;
7363
7365
  this.form.method = exports.Method.Post;
7364
7366
  this.form.inputs.filter(function (x) { return x.inEditDisabled; }).forEach(function (x) { return x.disabled = false; });
@@ -7395,7 +7397,7 @@
7395
7397
  if (access.AccessType === exports.PermissionAccessTypeEnum.Insert) {
7396
7398
  accessInp.class = accessInp.class.replace('blue', 'green');
7397
7399
  if (this_1.form) {
7398
- this_1.form.url = this_1.form.baseUrl = this_1.url + 'Insert';
7400
+ this_1.form.url = this_1.form.baseUrl = this_1.url + 'insert';
7399
7401
  if (!this_1.form.onTop) {
7400
7402
  accessInp.onClick = function () {
7401
7403
  _this.form.onSuccessBase = function () {
@@ -7417,7 +7419,7 @@
7417
7419
  };
7418
7420
  }
7419
7421
  else {
7420
- accessInp.url = this_1.url + 'Insert';
7422
+ accessInp.url = this_1.url + 'insert';
7421
7423
  }
7422
7424
  }
7423
7425
  }
@@ -7425,10 +7427,10 @@
7425
7427
  accessInp.onClick = function () {
7426
7428
  var p = new PermissionClass();
7427
7429
  p.Area = _this.permissions.Area;
7428
- p.Controller = 'Print';
7430
+ p.Controller = 'print';
7429
7431
  p.Action = _this.permissions.Controller + (_this.permissions.Action ? _this.permissions.Action : '');
7430
7432
  var params = $$1.param(_this.searchData(true));
7431
- window.open('/Report' + p.getUrl() + (_this.permissions.RelatedId ? '/' + _this.permissions.RelatedId : '') +
7433
+ window.open('/report' + p.getUrl() + (_this.permissions.RelatedId ? '/' + _this.permissions.RelatedId : '') +
7432
7434
  (params ? '?' + params : ''), '_blank');
7433
7435
  };
7434
7436
  }