tin-spa 2.3.6 → 2.3.7

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.
@@ -252,7 +252,7 @@ class Core {
252
252
  data[field.name] = this.getInitialValue(field);
253
253
  }
254
254
  });
255
- console.log(data);
255
+ // console.log(data)
256
256
  return data;
257
257
  }
258
258
  static resetObject(fields, data) {
@@ -479,7 +479,7 @@ class DetailsDialogProcessor {
479
479
  const updatedDetailsConfig = Core.getClone(detailsConfig);
480
480
  updatedDetailsConfig.details = row;
481
481
  updatedDetailsConfig.formConfig.mode = (_a = updatedDetailsConfig.mode) !== null && _a !== void 0 ? _a : "view";
482
- if (updatedDetailsConfig.heroField) {
482
+ if (updatedDetailsConfig.heroField && row) {
483
483
  updatedDetailsConfig.heroValue = row[updatedDetailsConfig.heroField];
484
484
  function updateTableConfig(tableConfig) {
485
485
  tableConfig.heroField = updatedDetailsConfig.heroField;
@@ -2239,7 +2239,6 @@ class FilterComponent {
2239
2239
  ngOnInit() {
2240
2240
  }
2241
2241
  ngOnChanges() {
2242
- // console.log("OnChange")
2243
2242
  this.applyFilter(this._filterText);
2244
2243
  }
2245
2244
  keyUp(event) {
@@ -2677,7 +2676,6 @@ class TilesComponent {
2677
2676
  }
2678
2677
  }
2679
2678
  loadData(action, data) {
2680
- console.log("loading");
2681
2679
  if (action) {
2682
2680
  this.dataService.CallApi(action, data).subscribe((apiResponse) => {
2683
2681
  if (apiResponse.success) {
@@ -3406,8 +3404,6 @@ class ViewerComponent {
3406
3404
  this.title = "Documents";
3407
3405
  }
3408
3406
  ngOnInit() {
3409
- // this.fileNames = 'tinashe.jpg'
3410
- console.log("Viewer Init");
3411
3407
  if (this.fileAction) {
3412
3408
  this.loadData();
3413
3409
  }
@@ -3483,8 +3479,6 @@ class FormComponent {
3483
3479
  }
3484
3480
  ngOnInit() {
3485
3481
  var _a, _b, _c, _d;
3486
- console.log("Form init");
3487
- console.log(this.data);
3488
3482
  if (!this.config.fields) {
3489
3483
  this.messageService.toast("Please Configure Form Fields");
3490
3484
  return;
@@ -3514,10 +3508,8 @@ class FormComponent {
3514
3508
  });
3515
3509
  }
3516
3510
  ngOnChanges() {
3517
- console.log("changed");
3518
3511
  }
3519
3512
  ngAfterViewInit() {
3520
- // console.log("Form After View init")
3521
3513
  }
3522
3514
  getVisibleFields() {
3523
3515
  var _a;
@@ -3538,8 +3530,6 @@ class FormComponent {
3538
3530
  return false;
3539
3531
  }
3540
3532
  inputChanged(field, value) {
3541
- console.log("Input Changed");
3542
- // console.log(field)
3543
3533
  this.inputChange.emit({ field: field, value: value });
3544
3534
  this.updateChildOptions(field);
3545
3535
  if (this.config.mode == 'create' && field.child) {
@@ -3547,19 +3537,15 @@ class FormComponent {
3547
3537
  this.data[child.name] = field.options.find(x => x[field.optionValue] == value)[field.child.childValueField];
3548
3538
  }
3549
3539
  if (this.config.mode == 'create' && field.children) {
3550
- console.log(this.data);
3551
3540
  console.log("Children found");
3552
3541
  field.children.forEach(childConfig => {
3553
3542
  let child = this.fields.find(x => x.name == childConfig.childField);
3554
3543
  console.log("Child found");
3555
- console.log(child);
3556
3544
  this.data[child.name] = field.options.find(x => x[field.optionValue] == value)[childConfig.childValueField];
3557
3545
  });
3558
- console.log(this.data);
3559
3546
  }
3560
3547
  }
3561
3548
  updateChildOptions(masterField) {
3562
- console.log(this.data[masterField.name]);
3563
3549
  let child = this.childFields.find(x => x.masterField == masterField.name);
3564
3550
  if (child != null) {
3565
3551
  //current is master
@@ -3574,9 +3560,7 @@ class FormComponent {
3574
3560
  }
3575
3561
  buttonClicked() {
3576
3562
  var _a;
3577
- // console.log("Button Clicked")
3578
3563
  this.buttonClick.emit(this.data);
3579
- // console.log(this.data)
3580
3564
  let button = this.config.button;
3581
3565
  if (!button) {
3582
3566
  return;
@@ -3713,10 +3697,7 @@ class DetailsDialogInternal {
3713
3697
  this.setTitleAction();
3714
3698
  }
3715
3699
  loadData(action, reload) {
3716
- console.log("loading details");
3717
3700
  if (action && this.loadByAction) {
3718
- console.log("Loading action");
3719
- console.log(action);
3720
3701
  this.dataService.CallApi(action).subscribe((apiResponse) => {
3721
3702
  if (apiResponse.success) {
3722
3703
  this.details = apiResponse.data;
@@ -4112,7 +4093,6 @@ class TableInternalComponent {
4112
4093
  }
4113
4094
  }
4114
4095
  loadData(action, data) {
4115
- console.log("loading");
4116
4096
  if (action) {
4117
4097
  this.dataService.CallApi(action, data).subscribe((apiResponse) => {
4118
4098
  if (this.config.logResponse) {
@@ -4202,7 +4182,6 @@ class TableInternalComponent {
4202
4182
  }
4203
4183
  //Events
4204
4184
  searchClicked(x) {
4205
- console.log("Search");
4206
4185
  this.searchClick.emit(x);
4207
4186
  if (this.config.searchConfig.searchAction) {
4208
4187
  this.config.searchConfig.searchAction.method == 'post';
@@ -4210,7 +4189,6 @@ class TableInternalComponent {
4210
4189
  }
4211
4190
  }
4212
4191
  refreshClicked() {
4213
- console.log("Refresh");
4214
4192
  this.refreshClick.emit();
4215
4193
  if (this.config.loadAction) {
4216
4194
  this.loadData(this.config.loadAction, "");
@@ -4221,7 +4199,6 @@ class TableInternalComponent {
4221
4199
  }
4222
4200
  dataLoaded(x) {
4223
4201
  var _a;
4224
- console.log("dataloaded");
4225
4202
  this.dataLoad.emit(x);
4226
4203
  if ((_a = this.config.tileConfig) === null || _a === void 0 ? void 0 : _a.loadAction) {
4227
4204
  this.tileReload.next(true);
@@ -4254,11 +4231,9 @@ class TableInternalComponent {
4254
4231
  this.open(name, row);
4255
4232
  }
4256
4233
  actionClickedEmit(name, row) {
4257
- console.log("Action clicked");
4258
4234
  this.actionClick.emit({ name: name, data: row });
4259
4235
  }
4260
4236
  viewModel(row) {
4261
- console.log("view Clicked");
4262
4237
  this.open('view', row);
4263
4238
  }
4264
4239
  newModel() {
@@ -4387,7 +4362,6 @@ class TableInternalComponent {
4387
4362
  }
4388
4363
  //Misc
4389
4364
  getElevationClass(elevation) {
4390
- console.log(elevation);
4391
4365
  if (elevation == "none") {
4392
4366
  return "";
4393
4367
  }
@@ -4491,10 +4465,7 @@ class DetailsDialog {
4491
4465
  this.setTitleAction();
4492
4466
  }
4493
4467
  loadData(action, reload) {
4494
- console.log("loading details");
4495
4468
  if (action && this.loadByAction) {
4496
- console.log("Loading action");
4497
- console.log(action);
4498
4469
  this.dataService.CallApi(action).subscribe((apiResponse) => {
4499
4470
  if (apiResponse.success) {
4500
4471
  this.details = apiResponse.data;
@@ -4768,7 +4739,6 @@ class TableComponent {
4768
4739
  }
4769
4740
  }
4770
4741
  loadData(action, data) {
4771
- console.log("loading");
4772
4742
  if (action) {
4773
4743
  this.dataService.CallApi(action, data).subscribe((apiResponse) => {
4774
4744
  if (this.config.logResponse) {
@@ -4858,7 +4828,6 @@ class TableComponent {
4858
4828
  }
4859
4829
  //Events
4860
4830
  searchClicked(x) {
4861
- console.log("Search");
4862
4831
  this.searchClick.emit(x);
4863
4832
  if (this.config.searchConfig.searchAction) {
4864
4833
  this.config.searchConfig.searchAction.method == 'post';
@@ -4866,7 +4835,6 @@ class TableComponent {
4866
4835
  }
4867
4836
  }
4868
4837
  refreshClicked() {
4869
- console.log("Refresh");
4870
4838
  this.refreshClick.emit();
4871
4839
  if (this.config.loadAction) {
4872
4840
  this.loadData(this.config.loadAction, "");
@@ -4877,7 +4845,6 @@ class TableComponent {
4877
4845
  }
4878
4846
  dataLoaded(x) {
4879
4847
  var _a;
4880
- console.log("dataloaded");
4881
4848
  this.dataLoad.emit(x);
4882
4849
  if ((_a = this.config.tileConfig) === null || _a === void 0 ? void 0 : _a.loadAction) {
4883
4850
  this.tileReload.next(true);
@@ -4910,11 +4877,9 @@ class TableComponent {
4910
4877
  this.open(name, row);
4911
4878
  }
4912
4879
  actionClickedEmit(name, row) {
4913
- console.log("Action clicked");
4914
4880
  this.actionClick.emit({ name: name, data: row });
4915
4881
  }
4916
4882
  viewModel(row) {
4917
- console.log("view Clicked");
4918
4883
  this.open('view', row);
4919
4884
  }
4920
4885
  newModel() {
@@ -5043,7 +5008,6 @@ class TableComponent {
5043
5008
  }
5044
5009
  //Misc
5045
5010
  getElevationClass(elevation) {
5046
- console.log(elevation);
5047
5011
  if (elevation == "none") {
5048
5012
  return "";
5049
5013
  }
@@ -5283,7 +5247,6 @@ class TenantSettingsComponent {
5283
5247
  this.messageService.confirm(`Rename ?`).subscribe((result) => {
5284
5248
  if (result == "yes") {
5285
5249
  this.dataService.CallApi({ url: 'tenant/tenants?action=rename', method: 'post' }, this.currTenant).subscribe((apiResponse) => {
5286
- console.log(apiResponse);
5287
5250
  if (apiResponse.success) {
5288
5251
  this.authService.updateTenantName(this.currTenant.name);
5289
5252
  this.messageService.toast("Renamed Successfully");
@@ -5688,7 +5651,6 @@ class InventoryComponent {
5688
5651
  }
5689
5652
  loadData() {
5690
5653
  this.dataService.CallApi({ url: 'general/lists/InventoryCategories' }).subscribe((apiResponse) => {
5691
- // console.log(apiResponse)
5692
5654
  this.formConfig.fields.find(x => x.name == 'categoryID').options = apiResponse.data;
5693
5655
  });
5694
5656
  }
@@ -6733,7 +6695,6 @@ class ProfileComponent {
6733
6695
  loadRoles() {
6734
6696
  this.dataService.GetRole("all", "").subscribe((apiResponse) => {
6735
6697
  this.roles = apiResponse;
6736
- // console.log(this.roles)
6737
6698
  }, (error) => {
6738
6699
  this.isProcessing = false;
6739
6700
  this.messageService.toast(this.httpService.Error(error));
@@ -6750,7 +6711,6 @@ class ProfileComponent {
6750
6711
  }
6751
6712
  updateProfile() {
6752
6713
  this.isProcessing = true;
6753
- // console.log(this.profile)
6754
6714
  // return
6755
6715
  this.dataService.UpdateUser(this.profile).subscribe((apiResponse) => {
6756
6716
  this.isProcessing = false;
@@ -6912,7 +6872,6 @@ class UsersComponent {
6912
6872
  }
6913
6873
  UpdateData() {
6914
6874
  this.dataService.GetUser().subscribe((apiResponse) => {
6915
- // console.log(apiResponse)
6916
6875
  this.usersRaw = apiResponse.data;
6917
6876
  this.users = new MatTableDataSource(apiResponse.data);
6918
6877
  this.users.paginator = this.usersPaginator;
@@ -7147,7 +7106,6 @@ class CreateAccountComponent {
7147
7106
  return;
7148
7107
  }
7149
7108
  this.dataService.CallApi({ url: 'User/ad/' + this.register.userName }, '').subscribe((apiResponse) => {
7150
- // console.log(apiResponse)
7151
7109
  if (apiResponse.success) {
7152
7110
  this.register.firstName = apiResponse.data.firstName;
7153
7111
  this.register.lastName = apiResponse.data.surname;
@@ -7161,7 +7119,6 @@ class CreateAccountComponent {
7161
7119
  loadRoles() {
7162
7120
  this.dataService.GetRole("all", "").subscribe((apiResponse) => {
7163
7121
  this.roles = apiResponse;
7164
- // console.log(this.roles)
7165
7122
  }, (error) => {
7166
7123
  this.isProcessing = false;
7167
7124
  this.messageService.toast(this.httpService.Error(error));