From 4cb5072ac6531ed9f84a9e0dfba35f4a6bd4bc62 Mon Sep 17 00:00:00 2001 From: mpetrov Date: Tue, 4 Mar 2025 13:54:15 +0200 Subject: [PATCH] Reworked provision to toasts --- .../common/action/mobile-action-editor.models.ts | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/settings/common/action/mobile-action-editor.models.ts b/ui-ngx/src/app/modules/home/components/widget/lib/settings/common/action/mobile-action-editor.models.ts index 5164b6c8b8..54e70dc34b 100644 --- a/ui-ngx/src/app/modules/home/components/widget/lib/settings/common/action/mobile-action-editor.models.ts +++ b/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 = '// Function body to handle device provision success. \n' + - '// - device - device that was successfully provisioned.\n' + - 'function showDeviceProvisioningSuccess(deviceName, message) {\n' + + '// - deviceName - name of device that was successfully provisioned.\n' + + 'showDeviceProvisioningSuccess(deviceName);\n' + + '\n' + + 'function showDeviceProvisioningSuccess(deviceName) {\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' + '}\n'; @@ -154,7 +156,7 @@ const handleEmptyResultFunctionTemplate: TbFunction = '\n' + 'function showEmptyResultDialog(message) {\n' + ' setTimeout(function() {\n' + - ' widgetContext.dialogs.alert(\'Empty result\', message).subscribe();\n' + + ' widgetContext.showInfoToast(message).subscribe();\n' + ' }, 100);\n' + '}\n';