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.
@@ -241,7 +241,7 @@ class Core {
241
241
  data[field.name] = this.getInitialValue(field);
242
242
  }
243
243
  });
244
- console.log(data);
244
+ // console.log(data)
245
245
  return data;
246
246
  }
247
247
  static resetObject(fields, data) {
@@ -466,7 +466,7 @@ class DetailsDialogProcessor {
466
466
  const updatedDetailsConfig = Core.getClone(detailsConfig);
467
467
  updatedDetailsConfig.details = row;
468
468
  updatedDetailsConfig.formConfig.mode = updatedDetailsConfig.mode ?? "view";
469
- if (updatedDetailsConfig.heroField) {
469
+ if (updatedDetailsConfig.heroField && row) {
470
470
  updatedDetailsConfig.heroValue = row[updatedDetailsConfig.heroField];
471
471
  function updateTableConfig(tableConfig) {
472
472
  tableConfig.heroField = updatedDetailsConfig.heroField;
@@ -2244,7 +2244,6 @@ class FilterComponent {
2244
2244
  ngOnInit() {
2245
2245
  }
2246
2246
  ngOnChanges() {
2247
- // console.log("OnChange")
2248
2247
  this.applyFilter(this._filterText);
2249
2248
  }
2250
2249
  keyUp(event) {
@@ -2680,7 +2679,6 @@ class TilesComponent {
2680
2679
  }
2681
2680
  }
2682
2681
  loadData(action, data) {
2683
- console.log("loading");
2684
2682
  if (action) {
2685
2683
  this.dataService.CallApi(action, data).subscribe((apiResponse) => {
2686
2684
  if (apiResponse.success) {
@@ -3405,8 +3403,6 @@ class ViewerComponent {
3405
3403
  this.title = "Documents";
3406
3404
  }
3407
3405
  ngOnInit() {
3408
- // this.fileNames = 'tinashe.jpg'
3409
- console.log("Viewer Init");
3410
3406
  if (this.fileAction) {
3411
3407
  this.loadData();
3412
3408
  }
@@ -3480,8 +3476,6 @@ class FormComponent {
3480
3476
  this.inputChange = new EventEmitter();
3481
3477
  }
3482
3478
  ngOnInit() {
3483
- console.log("Form init");
3484
- console.log(this.data);
3485
3479
  if (!this.config.fields) {
3486
3480
  this.messageService.toast("Please Configure Form Fields");
3487
3481
  return;
@@ -3511,10 +3505,8 @@ class FormComponent {
3511
3505
  });
3512
3506
  }
3513
3507
  ngOnChanges() {
3514
- console.log("changed");
3515
3508
  }
3516
3509
  ngAfterViewInit() {
3517
- // console.log("Form After View init")
3518
3510
  }
3519
3511
  getVisibleFields() {
3520
3512
  return this.fields?.filter(x => Core.testVisible(this.config, this.data, x));
@@ -3534,8 +3526,6 @@ class FormComponent {
3534
3526
  return false;
3535
3527
  }
3536
3528
  inputChanged(field, value) {
3537
- console.log("Input Changed");
3538
- // console.log(field)
3539
3529
  this.inputChange.emit({ field: field, value: value });
3540
3530
  this.updateChildOptions(field);
3541
3531
  if (this.config.mode == 'create' && field.child) {
@@ -3543,19 +3533,15 @@ class FormComponent {
3543
3533
  this.data[child.name] = field.options.find(x => x[field.optionValue] == value)[field.child.childValueField];
3544
3534
  }
3545
3535
  if (this.config.mode == 'create' && field.children) {
3546
- console.log(this.data);
3547
3536
  console.log("Children found");
3548
3537
  field.children.forEach(childConfig => {
3549
3538
  let child = this.fields.find(x => x.name == childConfig.childField);
3550
3539
  console.log("Child found");
3551
- console.log(child);
3552
3540
  this.data[child.name] = field.options.find(x => x[field.optionValue] == value)[childConfig.childValueField];
3553
3541
  });
3554
- console.log(this.data);
3555
3542
  }
3556
3543
  }
3557
3544
  updateChildOptions(masterField) {
3558
- console.log(this.data[masterField.name]);
3559
3545
  let child = this.childFields.find(x => x.masterField == masterField.name);
3560
3546
  if (child != null) {
3561
3547
  //current is master
@@ -3569,9 +3555,7 @@ class FormComponent {
3569
3555
  }
3570
3556
  }
3571
3557
  buttonClicked() {
3572
- // console.log("Button Clicked")
3573
3558
  this.buttonClick.emit(this.data);
3574
- // console.log(this.data)
3575
3559
  let button = this.config.button;
3576
3560
  if (!button) {
3577
3561
  return;
@@ -3708,10 +3692,7 @@ class DetailsDialogInternal {
3708
3692
  this.setTitleAction();
3709
3693
  }
3710
3694
  loadData(action, reload) {
3711
- console.log("loading details");
3712
3695
  if (action && this.loadByAction) {
3713
- console.log("Loading action");
3714
- console.log(action);
3715
3696
  this.dataService.CallApi(action).subscribe((apiResponse) => {
3716
3697
  if (apiResponse.success) {
3717
3698
  this.details = apiResponse.data;
@@ -4098,7 +4079,6 @@ class TableInternalComponent {
4098
4079
  }
4099
4080
  }
4100
4081
  loadData(action, data) {
4101
- console.log("loading");
4102
4082
  if (action) {
4103
4083
  this.dataService.CallApi(action, data).subscribe((apiResponse) => {
4104
4084
  if (this.config.logResponse) {
@@ -4188,7 +4168,6 @@ class TableInternalComponent {
4188
4168
  }
4189
4169
  //Events
4190
4170
  searchClicked(x) {
4191
- console.log("Search");
4192
4171
  this.searchClick.emit(x);
4193
4172
  if (this.config.searchConfig.searchAction) {
4194
4173
  this.config.searchConfig.searchAction.method == 'post';
@@ -4196,7 +4175,6 @@ class TableInternalComponent {
4196
4175
  }
4197
4176
  }
4198
4177
  refreshClicked() {
4199
- console.log("Refresh");
4200
4178
  this.refreshClick.emit();
4201
4179
  if (this.config.loadAction) {
4202
4180
  this.loadData(this.config.loadAction, "");
@@ -4206,7 +4184,6 @@ class TableInternalComponent {
4206
4184
  }
4207
4185
  }
4208
4186
  dataLoaded(x) {
4209
- console.log("dataloaded");
4210
4187
  this.dataLoad.emit(x);
4211
4188
  if (this.config.tileConfig?.loadAction) {
4212
4189
  this.tileReload.next(true);
@@ -4239,11 +4216,9 @@ class TableInternalComponent {
4239
4216
  this.open(name, row);
4240
4217
  }
4241
4218
  actionClickedEmit(name, row) {
4242
- console.log("Action clicked");
4243
4219
  this.actionClick.emit({ name: name, data: row });
4244
4220
  }
4245
4221
  viewModel(row) {
4246
- console.log("view Clicked");
4247
4222
  this.open('view', row);
4248
4223
  }
4249
4224
  newModel() {
@@ -4371,7 +4346,6 @@ class TableInternalComponent {
4371
4346
  }
4372
4347
  //Misc
4373
4348
  getElevationClass(elevation) {
4374
- console.log(elevation);
4375
4349
  if (elevation == "none") {
4376
4350
  return "";
4377
4351
  }
@@ -4475,10 +4449,7 @@ class DetailsDialog {
4475
4449
  this.setTitleAction();
4476
4450
  }
4477
4451
  loadData(action, reload) {
4478
- console.log("loading details");
4479
4452
  if (action && this.loadByAction) {
4480
- console.log("Loading action");
4481
- console.log(action);
4482
4453
  this.dataService.CallApi(action).subscribe((apiResponse) => {
4483
4454
  if (apiResponse.success) {
4484
4455
  this.details = apiResponse.data;
@@ -4743,7 +4714,6 @@ class TableComponent {
4743
4714
  }
4744
4715
  }
4745
4716
  loadData(action, data) {
4746
- console.log("loading");
4747
4717
  if (action) {
4748
4718
  this.dataService.CallApi(action, data).subscribe((apiResponse) => {
4749
4719
  if (this.config.logResponse) {
@@ -4833,7 +4803,6 @@ class TableComponent {
4833
4803
  }
4834
4804
  //Events
4835
4805
  searchClicked(x) {
4836
- console.log("Search");
4837
4806
  this.searchClick.emit(x);
4838
4807
  if (this.config.searchConfig.searchAction) {
4839
4808
  this.config.searchConfig.searchAction.method == 'post';
@@ -4841,7 +4810,6 @@ class TableComponent {
4841
4810
  }
4842
4811
  }
4843
4812
  refreshClicked() {
4844
- console.log("Refresh");
4845
4813
  this.refreshClick.emit();
4846
4814
  if (this.config.loadAction) {
4847
4815
  this.loadData(this.config.loadAction, "");
@@ -4851,7 +4819,6 @@ class TableComponent {
4851
4819
  }
4852
4820
  }
4853
4821
  dataLoaded(x) {
4854
- console.log("dataloaded");
4855
4822
  this.dataLoad.emit(x);
4856
4823
  if (this.config.tileConfig?.loadAction) {
4857
4824
  this.tileReload.next(true);
@@ -4884,11 +4851,9 @@ class TableComponent {
4884
4851
  this.open(name, row);
4885
4852
  }
4886
4853
  actionClickedEmit(name, row) {
4887
- console.log("Action clicked");
4888
4854
  this.actionClick.emit({ name: name, data: row });
4889
4855
  }
4890
4856
  viewModel(row) {
4891
- console.log("view Clicked");
4892
4857
  this.open('view', row);
4893
4858
  }
4894
4859
  newModel() {
@@ -5016,7 +4981,6 @@ class TableComponent {
5016
4981
  }
5017
4982
  //Misc
5018
4983
  getElevationClass(elevation) {
5019
- console.log(elevation);
5020
4984
  if (elevation == "none") {
5021
4985
  return "";
5022
4986
  }
@@ -5254,7 +5218,6 @@ class TenantSettingsComponent {
5254
5218
  this.messageService.confirm(`Rename ?`).subscribe((result) => {
5255
5219
  if (result == "yes") {
5256
5220
  this.dataService.CallApi({ url: 'tenant/tenants?action=rename', method: 'post' }, this.currTenant).subscribe((apiResponse) => {
5257
- console.log(apiResponse);
5258
5221
  if (apiResponse.success) {
5259
5222
  this.authService.updateTenantName(this.currTenant.name);
5260
5223
  this.messageService.toast("Renamed Successfully");
@@ -5655,7 +5618,6 @@ class InventoryComponent {
5655
5618
  }
5656
5619
  loadData() {
5657
5620
  this.dataService.CallApi({ url: 'general/lists/InventoryCategories' }).subscribe((apiResponse) => {
5658
- // console.log(apiResponse)
5659
5621
  this.formConfig.fields.find(x => x.name == 'categoryID').options = apiResponse.data;
5660
5622
  });
5661
5623
  }
@@ -6694,7 +6656,6 @@ class ProfileComponent {
6694
6656
  loadRoles() {
6695
6657
  this.dataService.GetRole("all", "").subscribe((apiResponse) => {
6696
6658
  this.roles = apiResponse;
6697
- // console.log(this.roles)
6698
6659
  }, (error) => {
6699
6660
  this.isProcessing = false;
6700
6661
  this.messageService.toast(this.httpService.Error(error));
@@ -6711,7 +6672,6 @@ class ProfileComponent {
6711
6672
  }
6712
6673
  updateProfile() {
6713
6674
  this.isProcessing = true;
6714
- // console.log(this.profile)
6715
6675
  // return
6716
6676
  this.dataService.UpdateUser(this.profile).subscribe((apiResponse) => {
6717
6677
  this.isProcessing = false;
@@ -6873,7 +6833,6 @@ class UsersComponent {
6873
6833
  }
6874
6834
  UpdateData() {
6875
6835
  this.dataService.GetUser().subscribe((apiResponse) => {
6876
- // console.log(apiResponse)
6877
6836
  this.usersRaw = apiResponse.data;
6878
6837
  this.users = new MatTableDataSource(apiResponse.data);
6879
6838
  this.users.paginator = this.usersPaginator;
@@ -7106,7 +7065,6 @@ class CreateAccountComponent {
7106
7065
  return;
7107
7066
  }
7108
7067
  this.dataService.CallApi({ url: 'User/ad/' + this.register.userName }, '').subscribe((apiResponse) => {
7109
- // console.log(apiResponse)
7110
7068
  if (apiResponse.success) {
7111
7069
  this.register.firstName = apiResponse.data.firstName;
7112
7070
  this.register.lastName = apiResponse.data.surname;
@@ -7120,7 +7078,6 @@ class CreateAccountComponent {
7120
7078
  loadRoles() {
7121
7079
  this.dataService.GetRole("all", "").subscribe((apiResponse) => {
7122
7080
  this.roles = apiResponse;
7123
- // console.log(this.roles)
7124
7081
  }, (error) => {
7125
7082
  this.isProcessing = false;
7126
7083
  this.messageService.toast(this.httpService.Error(error));