100% open-source IoT Platform - Integrate your devices, add intelligence, build custom apps
Java asset-managementbuildingdashboarddataplatformdevice-managementedge-computingenergyenergy-managementenergy-monitorfleet-managementfleet-telematicsiotiot-applicationiot-platformmodbusmqttmqtt-brokerota-updaterules-enginesmartcity
Add push notification action to button
Robin Dekkers131c50800d6b
diff --git a/ui/component/or-rules/src/json-viewer/forms/or-rule-form-push-notification.ts b/ui/component/or-rules/src/json-viewer/forms/or-rule-form-push-notification.tsindex 45ce79b5a..6108d49b4 100644--- a/ui/component/or-rules/src/json-viewer/forms/or-rule-form-push-notification.ts+++ b/ui/component/or-rules/src/json-viewer/forms/or-rule-form-push-notification.ts@@ -58,8 +58,8 @@ export class OrRuleFormPushNotification extends translate(i18next)(LitElement) {requiredplaceholder=" "></or-input>- <or-input value="${buttons && buttons[0] && buttons[0].action && buttons[0].action.openInBrowser ? buttons[0].action.openInBrowser : true}"- @or-input-changed="${(e: OrInputChangedEvent) => this.setActionNotificationName(e.detail.value, "buttons.0.action.openInBrowser")}"+ <or-input .value="${action && action.openInBrowser}"+ @or-input-changed="${(e: OrInputChangedEvent) => this.setActionNotificationName(e.detail.value, "action.openInBrowser")}".label="${i18next.t("openInBrowser")}"type="${InputType.SWITCH}"required@@ -87,6 +87,9 @@ export class OrRuleFormPushNotification extends translate(i18next)(LitElement) {if(key && this.action.notification && this.action.notification.message){let message:any = this.action.notification.message;message = set(message, key, value);+ if(key.includes('action')) {+ message = set(message, "buttons.0."+key, value);+ }this.action.notification.message = {...message};}