Butonda Script Kullanımı

SCRIPT

// 
const id = this.recordService.formGroup.controls['ID'].value;
if (id == null) {
  this.recordComponent.onSave(false, true).then(ok => {
    setTimeout(() => {
      console.log('OK', ok);
      this.recordService.grids['b2b-basket-reservation'].grid.onAdd();
    }, 1000);
  })
} else {
  this.recordService.grids['b2b-basket-reservation'].grid.onAdd();
}

Buton Kullanımı

// {
      "controlType": "button",
      "buttonType": "raised",
      "label": "Rezervasyon Ekle",
      "color": "primary",
      "script": "const id = this.recordService.formGroup.controls['ID'].value;\nif (id == null) {\n  this.recordComponent.onSave(false, true).then(ok => {\n    setTimeout(() => {\n      console.log('OK', ok);\n      this.recordService.grids['b2b-basket-reservation'].grid.onAdd();\n    }, 1000);\n  })\n} else {\n  this.recordService.grids['b2b-basket-reservation'].grid.onAdd();\n}"
}

SCRIPT AMACI

Last updated