Browse Source

Reworked provision to toasts

pull/12467/head
mpetrov 2 years ago
parent
commit
4cb5072ac6
  1. 10
      ui-ngx/src/app/modules/home/components/widget/lib/settings/common/action/mobile-action-editor.models.ts

10
ui-ngx/src/app/modules/home/components/widget/lib/settings/common/action/mobile-action-editor.models.ts

@ -140,10 +140,12 @@ const processLocationFunction: TbFunction =
const provisioningSuccessFunction: TbFunction = const provisioningSuccessFunction: TbFunction =
'// Function body to handle device provision success. \n' + '// Function body to handle device provision success. \n' +
'// - device - device that was successfully provisioned.\n' + '// - deviceName - name of device that was successfully provisioned.\n' +
'function showDeviceProvisioningSuccess(deviceName, message) {\n' + 'showDeviceProvisioningSuccess(deviceName);\n' +
'\n' +
'function showDeviceProvisioningSuccess(deviceName) {\n' +
' setTimeout(function() {\n' + ' setTimeout(function() {\n' +
' widgetContext.dialogs.alert(`Device ` + deviceName + ` was successfully provisioned`, message).subscribe();\n' + ' widgetContext.showSuccessToast(`Device ` + deviceName + ` was successfully provisioned`).subscribe();\n' +
' }, 100);\n' + ' }, 100);\n' +
'}\n'; '}\n';
@ -154,7 +156,7 @@ const handleEmptyResultFunctionTemplate: TbFunction =
'\n' + '\n' +
'function showEmptyResultDialog(message) {\n' + 'function showEmptyResultDialog(message) {\n' +
' setTimeout(function() {\n' + ' setTimeout(function() {\n' +
' widgetContext.dialogs.alert(\'Empty result\', message).subscribe();\n' + ' widgetContext.showInfoToast(message).subscribe();\n' +
' }, 100);\n' + ' }, 100);\n' +
'}\n'; '}\n';

Loading…
Cancel
Save