diff --git a/app/server/appsmith-server/src/main/java/com/appsmith/server/migrations/DatabaseChangelog.java b/app/server/appsmith-server/src/main/java/com/appsmith/server/migrations/DatabaseChangelog.java index e8e673a80c..216a3e6df3 100644 --- a/app/server/appsmith-server/src/main/java/com/appsmith/server/migrations/DatabaseChangelog.java +++ b/app/server/appsmith-server/src/main/java/com/appsmith/server/migrations/DatabaseChangelog.java @@ -704,8 +704,10 @@ public class DatabaseChangelog { for (final Map datasource : datasources) { datasource.put("pluginId", plugins.get(datasource.remove("$pluginPackageName"))); final Map authentication = (Map) ((Map) datasource.get("datasourceConfiguration")).get("authentication"); - final String plainPassword = (String) authentication.get("password"); - authentication.put("password", encryptionService.encryptString(plainPassword)); + if (authentication != null) { + final String plainPassword = (String) authentication.get("password"); + authentication.put("password", encryptionService.encryptString(plainPassword)); + } datasource.put(FieldName.ORGANIZATION_ID, organizationId); datasource.put(FieldName.CREATED_AT, Instant.now()); final Map insertedDatasource = mongoTemplate.insert(datasource, mongoTemplate.getCollectionName(Datasource.class)); diff --git a/app/server/appsmith-server/src/main/resources/examples-organization.json b/app/server/appsmith-server/src/main/resources/examples-organization.json index ef77b34cd9..f3966a72bb 100644 --- a/app/server/appsmith-server/src/main/resources/examples-organization.json +++ b/app/server/appsmith-server/src/main/resources/examples-organization.json @@ -8,7 +8,7 @@ "_class": "com.appsmith.server.domains.Organization", "$datasources": [ { - "name": "Mock Db", + "name": "Mock Database", "$pluginPackageName": "postgres-plugin", "datasourceConfiguration": { "connection": { @@ -21,8 +21,8 @@ } ], "authentication": { - "username": "postgres", - "password": "Appsmith2019#", + "username": "fakeapi", + "password": "LimitedAccess123#", "databaseName": "fakeapi" }, "sshProxyEnabled": false @@ -31,70 +31,34 @@ "deleted": false, "policies": [], "_class": "com.appsmith.server.domains.Datasource" + }, + { + "name": "FreshDesk API", + "$pluginPackageName": "restapi-plugin", + "datasourceConfiguration": { + "sshProxyEnabled": false, + "url": "https://appsmithhelp.freshdesk.com" + }, + "invalids": [ ], + "deleted": false, + "policies": [], + "_class": "com.appsmith.server.domains.Datasource" } ], "$applications": [ { - "name": "Customer Support", + "name": "Charts Tutorial", "isPublic": true, "$pages": [ { - "name": "User Data", + "name": "1. Display Chart Data", "$isDefault": true, "$actions": [ { - "name": "abc", - "datasource": { - "$isEmbedded": true, - "name": "DEFAULT_REST_DATASOURCE", - "$pluginPackageName": "restapi-plugin", - "datasourceConfiguration": { - "url": "http://mock-api.appsmith.com" - }, - "invalids": [], - "deleted": false, - "policies": [] - }, - "actionConfiguration": { - "timeoutInMillisecond": 10000, - "paginationType": "NONE", - "path": "/user", - "headers": [ - { - "key": "", - "value": "" - }, - { - "key": "", - "value": "" - } - ], - "queryParameters": [ - { - "key": "", - "value": "" - }, - { - "key": "", - "value": "" - } - ], - "httpMethod": "GET" - }, - "pluginType": "API", - "dynamicBindingPathList": [], - "isValid": true, - "invalids": [], - "jsonPathKeys": [], - "deleted": false, - "policies": [], - "_class": "com.appsmith.server.domains.Action" - }, - { - "name": "approve_user", + "name": "getSignupCount", "datasource": { "$isEmbedded": false, - "name": "Mock Db", + "name": "Mock Database", "$pluginPackageName": "postgres-plugin", "datasourceConfiguration": { "connection": { @@ -107,41 +71,405 @@ } ], "authentication": { - "username": "postgres", - "password": "Appsmith2019#", + "username": "fakeapi", + "password": "LimitedAccess123#", "databaseName": "fakeapi" }, "sshProxyEnabled": false }, - "invalids": [], + "invalids": [ ], "deleted": false, "policies": [] }, "actionConfiguration": { "timeoutInMillisecond": 10000, "paginationType": "NONE", - "body": "UPDATE users\n SET status = 'APPROVED'\n WHERE id = {{usersTable.selectedRow.id}}\n" + "body": "SELECT count(id), TO_CHAR(\"createdAt\" :: DATE, 'dd/mm/yyyy') as sign_up_date FROM users GROUP BY sign_up_date ORDER BY sign_up_date limit 31;\n" }, "pluginType": "DB", - "dynamicBindingPathList": [ - { - "key": "body" - } - ], + "executeOnLoad": true, + "dynamicBindingPathList": [ ], "isValid": true, - "invalids": [], - "jsonPathKeys": [ - "usersTable.selectedRow.id" - ], + "invalids": [ ], + "jsonPathKeys": [ ], "deleted": false, "policies": [], "_class": "com.appsmith.server.domains.Action" - }, + } + ], + "layouts": [ { - "name": "getUsers", + "viewMode": false, + "dsl": { + "widgetName": "MainContainer", + "backgroundColor": "none", + "rightColumn": 1224, + "snapColumns": 16, + "detachFromLayout": true, + "widgetId": "0", + "topRow": 0, + "bottomRow": 1280, + "containerStyle": "none", + "snapRows": 33, + "parentRowSpace": 1, + "type": "CANVAS_WIDGET", + "canExtend": true, + "dynamicBindings": { + + }, + "version": 5, + "minHeight": 1292, + "parentColumnSpace": 1, + "leftColumn": 0, + "children": [ + { + "widgetName": "Text1", + "rightColumn": 11, + "textAlign": "CENTER", + "widgetId": "ka0sqegqwh", + "topRow": 0, + "bottomRow": 1, + "parentRowSpace": 40, + "isVisible": true, + "type": "TEXT_WIDGET", + "dynamicBindings": { + "value": true, + "text": true + }, + "parentId": "0", + "isLoading": false, + "parentColumnSpace": 74, + "leftColumn": 5, + "text": "

{{appsmith.mode !== \"EDIT\" ? \"Edit this application to begin\" : \"Display Chart Data\"}}

", + "textStyle": "LABEL" + }, + { + "widgetName": "Text2", + "rightColumn": 12, + "textAlign": "CENTER", + "widgetId": "dpbv1ua5ng", + "topRow": 1, + "bottomRow": 2, + "parentRowSpace": 40, + "isVisible": true, + "type": "TEXT_WIDGET", + "dynamicBindings": { + "value": true + }, + "parentId": "0", + "isLoading": false, + "parentColumnSpace": 74, + "leftColumn": 4, + "text": "This page demonstrates how to display data in a chart", + "textStyle": "BODY" + }, + { + "widgetName": "Chart1", + "rightColumn": 8, + "allowHorizontalScroll": false, + "widgetId": "n536wy81vu", + "topRow": 3, + "bottomRow": 14, + "parentRowSpace": 40, + "isVisible": true, + "type": "CHART_WIDGET", + "dynamicBindings": { + "chartData": true + }, + "parentId": "0", + "isLoading": false, + "chartData": "[{\"seriesName\":\"Users\",\"data\":\"{{getSignupCount.data.map((dateCount) => { \\nreturn {\\n x: moment(dateCount.sign_up_date).format(\\\"Do\\\"),\\n y: dateCount.count + \\\"\\\"\\n}\\n})}}\"}]", + "yAxisName": "Date", + "parentColumnSpace": 74, + "chartName": "User Sign up Trend", + "leftColumn": 0, + "xAxisName": "Users", + "chartType": "LINE_CHART" + }, + { + "widgetName": "Text3", + "rightColumn": 16, + "textAlign": "LEFT", + "widgetId": "htqwsl576a", + "topRow": 3, + "bottomRow": 9, + "parentRowSpace": 40, + "isVisible": "{{appsmith.mode === \"EDIT\"}}", + "type": "TEXT_WIDGET", + "dynamicBindings": { + "text": true, + "value": true, + "isVisible": true + }, + "parentId": "0", + "isLoading": false, + "parentColumnSpace": 74, + "leftColumn": 9, + "text": "

šŸ’” The chart displays data returned by the getSignupCount Query. The data is bound to the chart property using
{{ \"{{ getSignupCount.data }}\" }}

\nšŸŒŖļø The chart maps over the data returned by getSignupCount and transforms it to an Array of (x,y).

\n🧱 APIs, Queries and Widgets are all objects of the application exposed via Javascript inside {{\"{{}}\"}}

\n

", + "textStyle": "BODY", + "shouldScroll": true, + "dynamicProperties": { + "isVisible": true + } + }, + { + "widgetName": "Text4", + "rightColumn": 16, + "textAlign": "LEFT", + "widgetId": "zjvwf67adp", + "topRow": 10, + "bottomRow": 11, + "parentRowSpace": 40, + "isVisible": "{{appsmith.mode === \"EDIT\"}}", + "type": "TEXT_WIDGET", + "dynamicBindings": { + "value": true, + "isVisible": true + }, + "parentId": "0", + "isLoading": false, + "parentColumnSpace": 74, + "leftColumn": 9, + "text": "-------------------------------------------------------------------", + "textStyle": "LABEL", + "dynamicProperties": { + "isVisible": true + } + }, + { + "widgetName": "Text5", + "rightColumn": 16, + "textAlign": "LEFT", + "widgetId": "rbhxchhlgc", + "topRow": 11, + "bottomRow": 13, + "parentRowSpace": 40, + "isVisible": "{{appsmith.mode === \"EDIT\"}}", + "type": "TEXT_WIDGET", + "dynamicBindings": { + "value": true, + "isVisible": true + }, + "parentId": "0", + "isLoading": false, + "parentColumnSpace": 74, + "leftColumn": 9, + "text": "

šŸ” Inspect the chart properties & the getSignupCount Query.

šŸ“ˆ Update the chart type to a column chart

", + "textStyle": "BODY", + "dynamicProperties": { + "isVisible": true + } + } + ] + }, + "publishedDsl": { + "widgetName": "MainContainer", + "backgroundColor": "none", + "rightColumn": 1224, + "snapColumns": 16, + "detachFromLayout": true, + "widgetId": "0", + "topRow": 0, + "bottomRow": 1280, + "containerStyle": "none", + "snapRows": 33, + "parentRowSpace": 1, + "type": "CANVAS_WIDGET", + "canExtend": true, + "dynamicBindings": { + + }, + "version": 5, + "minHeight": 1292, + "parentColumnSpace": 1, + "leftColumn": 0, + "children": [ + { + "widgetName": "Text1", + "rightColumn": 11, + "textAlign": "CENTER", + "widgetId": "ka0sqegqwh", + "topRow": 0, + "bottomRow": 1, + "parentRowSpace": 40, + "isVisible": true, + "type": "TEXT_WIDGET", + "dynamicBindings": { + "value": true, + "text": true + }, + "parentId": "0", + "isLoading": false, + "parentColumnSpace": 74, + "leftColumn": 5, + "text": "

{{appsmith.mode !== \"EDIT\" ? \"Edit this application to begin\" : \"Display Chart Data\"}}

", + "textStyle": "LABEL" + }, + { + "widgetName": "Text2", + "rightColumn": 12, + "textAlign": "CENTER", + "widgetId": "dpbv1ua5ng", + "topRow": 1, + "bottomRow": 2, + "parentRowSpace": 40, + "isVisible": true, + "type": "TEXT_WIDGET", + "dynamicBindings": { + "value": true + }, + "parentId": "0", + "isLoading": false, + "parentColumnSpace": 74, + "leftColumn": 4, + "text": "This page demonstrates how to display data in a chart", + "textStyle": "BODY" + }, + { + "widgetName": "Chart1", + "rightColumn": 8, + "allowHorizontalScroll": false, + "widgetId": "n536wy81vu", + "topRow": 3, + "bottomRow": 14, + "parentRowSpace": 40, + "isVisible": true, + "type": "CHART_WIDGET", + "dynamicBindings": { + "chartData": true + }, + "parentId": "0", + "isLoading": false, + "chartData": "[{\"seriesName\":\"Users\",\"data\":\"{{getSignupCount.data.map((dateCount) => { \\nreturn {\\n x: moment(dateCount.sign_up_date).format(\\\"Do\\\"),\\n y: dateCount.count + \\\"\\\"\\n}\\n})}}\"}]", + "yAxisName": "Date", + "parentColumnSpace": 74, + "chartName": "User Sign up Trend", + "leftColumn": 0, + "xAxisName": "Users", + "chartType": "LINE_CHART" + }, + { + "widgetName": "Text3", + "rightColumn": 16, + "textAlign": "LEFT", + "widgetId": "htqwsl576a", + "topRow": 3, + "bottomRow": 9, + "parentRowSpace": 40, + "isVisible": "{{appsmith.mode === \"EDIT\"}}", + "type": "TEXT_WIDGET", + "dynamicBindings": { + "text": true, + "value": true, + "isVisible": true + }, + "parentId": "0", + "isLoading": false, + "parentColumnSpace": 74, + "leftColumn": 9, + "text": "

šŸ’” The chart displays data returned by the getSignupCount Query. The data is bound to the chart property using
{{ \"{{ getSignupCount.data }}\" }}

\nšŸŒŖļø The chart maps over the data returned by getSignupCount and transforms it to an Array of (x,y).

\n🧱 APIs, Queries and Widgets are all objects of the application exposed via Javascript inside {{\"{{}}\"}}

\n

", + "textStyle": "BODY", + "shouldScroll": true, + "dynamicProperties": { + "isVisible": true + } + }, + { + "widgetName": "Text4", + "rightColumn": 16, + "textAlign": "LEFT", + "widgetId": "zjvwf67adp", + "topRow": 10, + "bottomRow": 11, + "parentRowSpace": 40, + "isVisible": "{{appsmith.mode === \"EDIT\"}}", + "type": "TEXT_WIDGET", + "dynamicBindings": { + "value": true, + "isVisible": true + }, + "parentId": "0", + "isLoading": false, + "parentColumnSpace": 74, + "leftColumn": 9, + "text": "-------------------------------------------------------------------", + "textStyle": "LABEL", + "dynamicProperties": { + "isVisible": true + } + }, + { + "widgetName": "Text5", + "rightColumn": 16, + "textAlign": "LEFT", + "widgetId": "rbhxchhlgc", + "topRow": 11, + "bottomRow": 13, + "parentRowSpace": 40, + "isVisible": "{{appsmith.mode === \"EDIT\"}}", + "type": "TEXT_WIDGET", + "dynamicBindings": { + "value": true, + "isVisible": true + }, + "parentId": "0", + "isLoading": false, + "parentColumnSpace": 74, + "leftColumn": 9, + "text": "

šŸ” Inspect the chart properties & the getSignupCount Query.

šŸ“ˆ Update the chart type to a column chart

", + "textStyle": "BODY", + "dynamicProperties": { + "isVisible": true + } + } + ] + }, + "layoutOnLoadActions": [ + [ + { + "name": "getSignupCount", + "pluginType": "DB", + "jsonPathKeys": [ ], + "timeoutInMillisecond": 10000 + } + ] + ], + "publishedLayoutOnLoadActions": [ + [ + { + "name": "getSignupCount", + "pluginType": "DB", + "jsonPathKeys": [ ], + "timeoutInMillisecond": 10000 + } + ] + ], + "widgetNames": [ + "Text5", + "Text4", + "Text3", + "Text2", + "Text1", + "MainContainer", + "Chart1" + ], + "deleted": false, + "policies": [ ] + } + ], + "deleted": false, + "policies": [], + "_class": "com.appsmith.server.domains.Page" + }, + { + "name": "2. Filter Chart Data", + "$isDefault": false, + "$actions": [ + { + "name": "getFilteredSignupCount", "datasource": { "$isEmbedded": false, - "name": "Mock Db", + "name": "Mock Database", "$pluginPackageName": "postgres-plugin", "datasourceConfiguration": { "connection": { @@ -154,20 +482,20 @@ } ], "authentication": { - "username": "postgres", - "password": "Appsmith2019#", + "username": "fakeapi", + "password": "LimitedAccess123#", "databaseName": "fakeapi" }, "sshProxyEnabled": false }, - "invalids": [], + "invalids": [ ], "deleted": false, "policies": [] }, "actionConfiguration": { "timeoutInMillisecond": 10000, "paginationType": "NONE", - "body": "SELECT * FROM users where name ilike '%{{usersTable.searchText}}%' ORDER BY id LIMIT 10 offset {{(usersTable.pageNo - 1) * 10}}" + "body": "SELECT count(id), TO_CHAR(\"createdAt\" :: DATE, 'dd/mm/yyyy') as sign_up_date FROM users where \"createdAt\" >= '{{startDatePicker.selectedDate}}' and \"createdAt\" <= '{{endDatePicker.selectedDate}}' GROUP BY sign_up_date ORDER BY sign_up_date;\n" }, "pluginType": "DB", "executeOnLoad": true, @@ -177,108 +505,10 @@ } ], "isValid": true, - "invalids": [], + "invalids": [ ], "jsonPathKeys": [ - "usersTable.searchText", - "(usersTable.pageNo - 1) * 10" - ], - "deleted": false, - "policies": [], - "_class": "com.appsmith.server.domains.Action" - }, - { - "name": "reject_user", - "datasource": { - "$isEmbedded": false, - "name": "Mock Db", - "$pluginPackageName": "postgres-plugin", - "datasourceConfiguration": { - "connection": { - "mode": "READ_WRITE" - }, - "endpoints": [ - { - "host": "fake-api.cvuydmurdlas.us-east-1.rds.amazonaws.com", - "port": 5432 - } - ], - "authentication": { - "username": "postgres", - "password": "Appsmith2019#", - "databaseName": "fakeapi" - }, - "sshProxyEnabled": false - }, - "invalids": [], - "deleted": false, - "policies": [] - }, - "actionConfiguration": { - "timeoutInMillisecond": 10000, - "paginationType": "NONE", - "body": "UPDATE users\n SET status = 'REJECTED'\n WHERE id = {{usersTable.selectedRow.id}}\n" - }, - "pluginType": "DB", - "dynamicBindingPathList": [ - { - "key": "body" - } - ], - "isValid": true, - "invalids": [], - "jsonPathKeys": [ - "usersTable.selectedRow.id" - ], - "deleted": false, - "policies": [], - "_class": "com.appsmith.server.domains.Action" - }, - { - "name": "updateUser", - "datasource": { - "$isEmbedded": false, - "name": "Mock Db", - "$pluginPackageName": "postgres-plugin", - "datasourceConfiguration": { - "connection": { - "mode": "READ_WRITE" - }, - "endpoints": [ - { - "host": "fake-api.cvuydmurdlas.us-east-1.rds.amazonaws.com", - "port": 5432 - } - ], - "authentication": { - "username": "postgres", - "password": "Appsmith2019#", - "databaseName": "fakeapi" - }, - "sshProxyEnabled": false - }, - "invalids": [], - "deleted": false, - "policies": [] - }, - "actionConfiguration": { - "timeoutInMillisecond": 10000, - "paginationType": "NONE", - "body": "UPDATE users SET name = '{{userNameInput.text}}', address = '{{userAddressDropdown.text}}', email = '{{userEmailInput.text}}', role = '{{userRoleDropdown.selectedOptionValue}}' WHERE id = {{usersTable.selectedRow.id}}" - }, - "pluginType": "DB", - "dynamicBindingPathList": [ - { - "key": "body" - } - ], - "isValid": true, - "invalids": [], - "jsonPathKeys": [ - "userRoleDropdown.selectedOptionValue", - "userEmailInput.text", - "userNameInput.text", - "usersTable.selectedRow.id", - "userAddressDropdown.text" + "startDatePicker.selectedDate", + "endDatePicker.selectedDate" ], "deleted": false, "policies": [], @@ -296,24 +526,196 @@ "detachFromLayout": true, "widgetId": "0", "topRow": 0, - "bottomRow": 1480, + "bottomRow": 1280, "containerStyle": "none", "snapRows": 33, "parentRowSpace": 1, "type": "CANVAS_WIDGET", "canExtend": true, "dynamicBindings": { + }, "version": 5, "minHeight": 1292, "parentColumnSpace": 1, "leftColumn": 0, "children": [ + { + "widgetName": "Chart1", + "rightColumn": 8, + "allowHorizontalScroll": false, + "widgetId": "ul3c5oquih", + "topRow": 4, + "bottomRow": 14, + "parentRowSpace": 40, + "isVisible": true, + "type": "CHART_WIDGET", + "dynamicBindings": { + "chartData": true + }, + "parentId": "0", + "isLoading": false, + "chartData": "[{\"seriesName\":\"Users\",\"data\":\"{{getFilteredSignupCount.data.map((dateCount) => { \\nreturn {\\n x: moment(dateCount.sign_up_date, \\\"DD/MM/YYYY\\\").format(\\\"Do- MMM\\\"),\\n y: dateCount.count + \\\"\\\"\\n}\\n})}}\"}]", + "yAxisName": "Users", + "parentColumnSpace": 74, + "chartName": "User Sign up Trend", + "leftColumn": 0, + "xAxisName": "Date", + "chartType": "AREA_CHART" + }, { "widgetName": "Text1", + "rightColumn": 12, + "textAlign": "CENTER", + "widgetId": "esiyii2azf", + "topRow": 0, + "bottomRow": 1, + "parentRowSpace": 40, + "isVisible": true, + "type": "TEXT_WIDGET", + "dynamicBindings": { + "value": true, + "text": true + }, + "parentId": "0", + "isLoading": false, + "parentColumnSpace": 74, + "leftColumn": 4, + "text": "

{{appsmith.mode !== \"EDIT\" ? \"Edit this application to begin\" : \"Filter Chart Data\"}}

", + "textStyle": "LABEL" + }, + { + "widgetName": "startDatePicker", + "defaultDate": "{{moment().subtract(2, \"months\").format(\"YYYY-MM-DD\")}}", "rightColumn": 4, + "dateFormat": "YYYY-MM-DD", + "widgetId": "3tsl49w1s0", + "dynamicProperties": { + "defaultDate": true + }, + "topRow": 3, + "bottomRow": 4, + "parentRowSpace": 40, + "isVisible": true, + "datePickerType": "DATE_PICKER", + "label": "", + "type": "DATE_PICKER_WIDGET", + "dynamicBindings": { + "defaultDate": true, + "isValid": true, + "value": true + }, + "parentId": "0", + "isLoading": false, + "parentColumnSpace": 74, + "leftColumn": 2, + "dynamicTriggers": { + "onDateSelected": true + }, + "isDisabled": false, + "onDateSelected": "{{getFilteredSignupCount.run()}}" + }, + { + "widgetName": "endDatePicker", + "defaultDate": "{{moment().format(\"YYYY-MM-DD\")}}", + "rightColumn": 8, + "dateFormat": "YYYY-MM-DD", + "widgetId": "cocrv71gh5", + "dynamicProperties": { + "defaultDate": true + }, + "topRow": 3, + "bottomRow": 4, + "parentRowSpace": 40, + "isVisible": true, + "datePickerType": "DATE_PICKER", + "label": "", + "type": "DATE_PICKER_WIDGET", + "dynamicBindings": { + "defaultDate": true, + "isValid": true, + "value": true + }, + "parentId": "0", + "isLoading": false, + "parentColumnSpace": 74, + "leftColumn": 6, + "dynamicTriggers": { + "onDateSelected": true + }, + "isDisabled": false, + "onDateSelected": "{{getFilteredSignupCount.run()}}" + }, + { + "widgetName": "Text2", + "rightColumn": 2, + "textAlign": "RIGHT", + "widgetId": "r31px5tpl6", + "topRow": 3, + "bottomRow": 4, + "parentRowSpace": 40, + "isVisible": true, + "type": "TEXT_WIDGET", + "dynamicBindings": { + "value": true + }, + "parentId": "0", + "isLoading": false, + "parentColumnSpace": 74, + "leftColumn": 0, + "text": "Start Date", + "textStyle": "LABEL" + }, + { + "widgetName": "Text3", + "rightColumn": 6, + "textAlign": "RIGHT", + "widgetId": "21rsr77a84", + "topRow": 3, + "bottomRow": 4, + "parentRowSpace": 40, + "isVisible": true, + "type": "TEXT_WIDGET", + "dynamicBindings": { + "value": true + }, + "parentId": "0", + "isLoading": false, + "parentColumnSpace": 74, + "leftColumn": 5, + "text": "End Date", + "textStyle": "LABEL" + }, + { + "widgetName": "Text4", + "rightColumn": 16, "textAlign": "LEFT", - "widgetId": "weg5so2vr1", + "widgetId": "digi7gghdg", + "topRow": 3, + "bottomRow": 8, + "parentRowSpace": 40, + "isVisible": "{{appsmith.mode === \"EDIT\"}}", + "type": "TEXT_WIDGET", + "dynamicBindings": { + "value": true, + "isVisible": true + }, + "parentId": "0", + "isLoading": false, + "parentColumnSpace": 74, + "leftColumn": 9, + "text": "

šŸ’” The chart displays data returned by the getFilteredSignupCount Query.

\nšŸ“… The getFilteredSignupCount Query reads the values of the startDatePicker and endDatePicker to filter the query. The Date Pickers execute the query onDateSelected\n

", + "textStyle": "BODY", + "shouldScroll": true, + "dynamicProperties": { + "isVisible": true + } + }, + { + "widgetName": "Text7", + "rightColumn": 13, + "textAlign": "CENTER", + "widgetId": "aiguj74viz", "topRow": 1, "bottomRow": 2, "parentRowSpace": 40, @@ -325,916 +727,60 @@ "parentId": "0", "isLoading": false, "parentColumnSpace": 74, - "leftColumn": 0, - "text": "

Users

", - "textStyle": "HEADING" + "leftColumn": 3, + "text": "This page demonstrates how to filter and change the data displayed in a chart", + "textStyle": "BODY", + "shouldScroll": false }, { - "widgetName": "Modal1", - "rightColumn": 0, - "detachFromLayout": true, - "widgetId": "byv6k1tm4q", - "topRow": 0, - "bottomRow": 0, - "parentRowSpace": 1, - "isVisible": false, - "canOutsideClickClose": true, - "type": "MODAL_WIDGET", - "canEscapeKeyClose": true, - "dynamicBindings": { - }, - "parentId": "0", - "shouldScrollContents": true, - "blueprint": { - "view": [ - { - "position": { - "top": 0, - "left": 0 - }, - "type": "CANVAS_WIDGET", - "props": { - "shouldScrollContents": false, - "blueprint": { - "view": [ - { - "size": { - "rows": 1, - "cols": 2 - }, - "position": { - "top": 0, - "left": 14 - }, - "type": "ICON_WIDGET", - "props": { - "color": "#040627", - "iconName": "cross", - "iconSize": 24 - } - }, - { - "size": { - "rows": 1, - "cols": 10 - }, - "position": { - "top": 0, - "left": 0 - }, - "type": "TEXT_WIDGET", - "props": { - "text": "Modal Title", - "textStyle": "HEADING" - } - }, - { - "size": { - "rows": 1, - "cols": 3 - }, - "position": { - "top": 4, - "left": 10 - }, - "type": "BUTTON_WIDGET", - "props": { - "buttonStyle": "SECONDARY_BUTTON", - "text": "Cancel" - } - }, - { - "size": { - "rows": 1, - "cols": 3 - }, - "position": { - "top": 4, - "left": 13 - }, - "type": "BUTTON_WIDGET", - "props": { - "buttonStyle": "PRIMARY_BUTTON", - "text": "Confirm" - } - } - ], - "operations": [ - { - "type": "MODIFY_PROPS" - } - ] - }, - "detachFromLayout": true, - "children": [], - "isVisible": true, - "isDisabled": false, - "canExtend": true - } - } - ] - }, - "isLoading": false, - "parentColumnSpace": 1, - "size": "MODAL_LARGE", - "leftColumn": 0, - "children": [ - { - "widgetName": "Canvas1", - "rightColumn": 0, - "detachFromLayout": true, - "widgetId": "w5pk5ifpbq", - "topRow": 0, - "bottomRow": 640, - "parentRowSpace": 1, - "isVisible": true, - "canExtend": true, - "type": "CANVAS_WIDGET", - "parentId": "byv6k1tm4q", - "shouldScrollContents": false, - "blueprint": { - "view": [ - { - "size": { - "rows": 1, - "cols": 2 - }, - "position": { - "top": 0, - "left": 14 - }, - "type": "ICON_WIDGET", - "props": { - "color": "#040627", - "iconName": "cross", - "iconSize": 24 - } - }, - { - "size": { - "rows": 1, - "cols": 10 - }, - "position": { - "top": 0, - "left": 0 - }, - "type": "TEXT_WIDGET", - "props": { - "text": "Modal Title", - "textStyle": "HEADING" - } - }, - { - "size": { - "rows": 1, - "cols": 3 - }, - "position": { - "top": 4, - "left": 10 - }, - "type": "BUTTON_WIDGET", - "props": { - "buttonStyle": "SECONDARY_BUTTON", - "text": "Cancel" - } - }, - { - "size": { - "rows": 1, - "cols": 3 - }, - "position": { - "top": 4, - "left": 13 - }, - "type": "BUTTON_WIDGET", - "props": { - "buttonStyle": "PRIMARY_BUTTON", - "text": "Confirm" - } - } - ], - "operations": [ - { - "type": "MODIFY_PROPS" - } - ] - }, - "minHeight": 0, - "isLoading": false, - "parentColumnSpace": 1, - "leftColumn": 0, - "children": [ - { - "widgetName": "Icon1", - "rightColumn": 16, - "onClick": "{{closeModal('Modal1')}}", - "color": "#040627", - "iconName": "cross", - "widgetId": "3mbbjt4pzc", - "topRow": 0, - "bottomRow": 1, - "isVisible": true, - "type": "ICON_WIDGET", - "parentId": "w5pk5ifpbq", - "isLoading": false, - "leftColumn": 14, - "iconSize": 24 - }, - { - "widgetName": "Text2", - "rightColumn": 10, - "textAlign": "LEFT", - "widgetId": "wcn8me2ef8", - "topRow": 0, - "bottomRow": 1, - "isVisible": true, - "type": "TEXT_WIDGET", - "dynamicBindings": { - "text": true, - "value": true - }, - "parentId": "w5pk5ifpbq", - "isLoading": false, - "leftColumn": 0, - "text": "{{func1}}", - "textStyle": "HEADING" - }, - { - "widgetName": "Button1", - "rightColumn": 13, - "onClick": "{{closeModal('Modal1')}}", - "isDefaultClickDisabled": true, - "widgetId": "sz67dp5my1", - "dynamicProperties": { - }, - "buttonStyle": "SECONDARY_BUTTON", - "topRow": 13, - "bottomRow": 14, - "isVisible": true, - "type": "BUTTON_WIDGET", - "parentId": "w5pk5ifpbq", - "isLoading": false, - "leftColumn": 10, - "dynamicTriggers": { - "onClick": true - }, - "text": "Cancel", - "isDisabled": false - }, - { - "widgetName": "Button2", - "rightColumn": 16, - "onClick": "{{updateUser.run(() => getUsers.run(() => { closeModal('Modal1') }), () => {})}}", - "isDefaultClickDisabled": true, - "widgetId": "tasjzaf7dn", - "dynamicProperties": { - "onClick": true - }, - "buttonStyle": "PRIMARY_BUTTON", - "topRow": 13, - "bottomRow": 14, - "isVisible": true, - "type": "BUTTON_WIDGET", - "dynamicBindings": { - }, - "parentId": "w5pk5ifpbq", - "isLoading": false, - "leftColumn": 13, - "dynamicTriggers": { - "onClick": true - }, - "text": "Update", - "isDisabled": false - }, - { - "widgetName": "Text3", - "rightColumn": 4, - "textAlign": "RIGHT", - "widgetId": "xuwf6yoz8o", - "topRow": 2, - "bottomRow": 3, - "parentRowSpace": 40, - "isVisible": true, - "type": "TEXT_WIDGET", - "dynamicBindings": { - "value": true - }, - "parentId": "w5pk5ifpbq", - "isLoading": false, - "parentColumnSpace": 30.75, - "leftColumn": 0, - "text": "Name", - "textStyle": "LABEL" - }, - { - "widgetName": "userNameInput", - "rightColumn": 14, - "widgetId": "7w6gdpp20h", - "topRow": 2, - "bottomRow": 3, - "parentRowSpace": 40, - "isVisible": true, - "label": "", - "type": "INPUT_WIDGET", - "dynamicBindings": { - "isValid": true, - "defaultText": true, - "value": true - }, - "parentId": "w5pk5ifpbq", - "isLoading": false, - "parentColumnSpace": 30.75, - "leftColumn": 4, - "inputType": "TEXT", - "defaultText": "{{usersTable.selectedRow.name}}" - }, - { - "widgetName": "Text4", - "rightColumn": 4, - "textAlign": "RIGHT", - "widgetId": "ipq7sver55", - "topRow": 3, - "bottomRow": 4, - "parentRowSpace": 40, - "isVisible": true, - "type": "TEXT_WIDGET", - "dynamicBindings": { - "value": true - }, - "parentId": "w5pk5ifpbq", - "isLoading": false, - "parentColumnSpace": 30.75, - "leftColumn": 0, - "text": "Email", - "textStyle": "LABEL" - }, - { - "widgetName": "userEmailInput", - "rightColumn": 14, - "widgetId": "gmxr33ul94", - "topRow": 3, - "bottomRow": 4, - "parentRowSpace": 40, - "isVisible": true, - "label": "", - "type": "INPUT_WIDGET", - "dynamicBindings": { - "isValid": true, - "defaultText": true, - "value": true - }, - "parentId": "w5pk5ifpbq", - "isLoading": false, - "parentColumnSpace": 30.75, - "leftColumn": 4, - "inputType": "TEXT", - "defaultText": "{{usersTable.selectedRow.email}}" - }, - { - "widgetName": "Text5", - "rightColumn": 4, - "textAlign": "RIGHT", - "widgetId": "qodaro6enw", - "topRow": 4, - "bottomRow": 5, - "parentRowSpace": 40, - "isVisible": true, - "type": "TEXT_WIDGET", - "dynamicBindings": { - "value": true - }, - "parentId": "w5pk5ifpbq", - "isLoading": false, - "parentColumnSpace": 30.75, - "leftColumn": 0, - "text": "Role", - "textStyle": "LABEL" - }, - { - "widgetName": "userRoleDropdown", - "rightColumn": 14, - "widgetId": "ca93zv3q74", - "topRow": 4, - "bottomRow": 5, - "parentRowSpace": 40, - "isVisible": true, - "label": "", - "type": "DROP_DOWN_WIDGET", - "dynamicBindings": { - "defaultOptionValue": true, - "selectedOptionArr": true, - "isValid": true, - "selectedIndexArr": true, - "selectedOption": true, - "value": true, - "selectedIndex": true - }, - "parentId": "w5pk5ifpbq", - "isLoading": false, - "defaultOptionValue": "{{usersTable.selectedRow.role}}", - "selectionType": "SINGLE_SELECT", - "parentColumnSpace": 30.75, - "leftColumn": 4, - "options": "[\n {\n \"label\": \"Admin\",\n \"value\": \"Admin\"\n },\n {\n \"label\": \"Editor\",\n \"value\": \"Editor\"\n },\n {\n \"label\": \"Viewer\",\n \"value\": \"Viewer\"\n }\n]" - }, - { - "widgetName": "Text6", - "rightColumn": 4, - "textAlign": "RIGHT", - "widgetId": "6kt0zxnjp2", - "topRow": 6, - "bottomRow": 7, - "parentRowSpace": 40, - "isVisible": true, - "type": "TEXT_WIDGET", - "dynamicBindings": { - "value": true - }, - "parentId": "w5pk5ifpbq", - "isLoading": false, - "parentColumnSpace": 30.75, - "leftColumn": 0, - "text": "Address", - "textStyle": "LABEL" - }, - { - "widgetName": "userAddressDropdown", - "rightColumn": 14, - "widgetId": "dvjvau3h01", - "topRow": 6, - "bottomRow": 9, - "parentRowSpace": 40, - "isVisible": true, - "label": "", - "type": "INPUT_WIDGET", - "dynamicBindings": { - "isValid": true, - "defaultText": true, - "value": true - }, - "parentId": "w5pk5ifpbq", - "isLoading": false, - "parentColumnSpace": 30.75, - "leftColumn": 4, - "inputType": "TEXT", - "defaultText": "{{usersTable.selectedRow.address}}" - }, - { - "widgetName": "Text13", - "rightColumn": 4, - "textAlign": "RIGHT", - "widgetId": "5kbrck0d80", - "topRow": 5, - "bottomRow": 6, - "parentRowSpace": 40, - "isVisible": true, - "type": "TEXT_WIDGET", - "dynamicBindings": { - "value": true - }, - "parentId": "w5pk5ifpbq", - "isLoading": false, - "parentColumnSpace": 30.75, - "leftColumn": 0, - "text": "Gender", - "textStyle": "LABEL" - }, - { - "widgetName": "Dropdown1", - "rightColumn": 14, - "widgetId": "ojpyrgnvll", - "topRow": 5, - "bottomRow": 6, - "parentRowSpace": 40, - "isVisible": true, - "label": "", - "type": "DROP_DOWN_WIDGET", - "dynamicBindings": { - "defaultOptionValue": true, - "selectedOptionArr": true, - "isValid": true, - "selectedIndexArr": true, - "selectedOption": true, - "value": true, - "selectedIndex": true - }, - "parentId": "w5pk5ifpbq", - "isLoading": false, - "defaultOptionValue": "{{usersTable.selectedRow.gender}}", - "selectionType": "SINGLE_SELECT", - "parentColumnSpace": 30.75, - "leftColumn": 4, - "options": "[\n {\n \"label\": \"Male\",\n \"value\": \"Male\"\n },\n {\n \"label\": \"Female\",\n \"value\": \"Female\"\n }\n]" - } - ], - "isDisabled": false - } - ] - }, - { - "hiddenColumns": [ - "updatedAt", - "gender", - "avatar", - "dob", - "address", - "status", - "createdAt" - ], - "widgetName": "usersTable", - "rightColumn": 10, - "columnOrder": [ - "id", - "name", - "email", - "role", - "actions", - "createdAt", - "updatedAt", - "gender", - "avatar", - "dob" - ], - "widgetId": "4onx0po0j1", - "topRow": 2, - "bottomRow": 18, + "widgetName": "Text8", + "rightColumn": 16, + "textAlign": "LEFT", + "widgetId": "kyw545g7n4", + "topRow": 8, + "bottomRow": 9, "parentRowSpace": 40, - "onPageChange": "{{getUsers.run()}}", - "tableData": "{{getTable1Data.run()}}", - "isVisible": true, - "label": "Data", - "searchKey": "", - "type": "TABLE_WIDGET", + "isVisible": "{{appsmith.mode === \"EDIT\"}}", + "type": "TEXT_WIDGET", "dynamicBindings": { - "tableData": true, - "selectedRow": true, - "filteredTableData": true + "value": true, + "isVisible": true }, "parentId": "0", - "serverSidePaginationEnabled": true, "isLoading": false, - "onSearchTextChanged": "{{getUsers.run()}}", "parentColumnSpace": 74, - "leftColumn": 0, - "dynamicTriggers": { - "onSearchTextChanged": true, - "onPageChange": true - }, - "columnActions": [ - { - "actionPayloads": [], - "label": "Edit", - "id": "inz6ivtcdt", - "dynamicTrigger": "{{showModal('Modal1')}}" - } - ], - "columnSizeMap": { - "address": 238, - "id": 91, - "email": 236 + "leftColumn": 9, + "text": "---------------------------------------------------------------------", + "textStyle": "LABEL", + "dynamicProperties": { + "isVisible": true } }, { - "backgroundColor": "#FFFFFF", - "widgetName": "Container1", + "widgetName": "Text9", "rightColumn": 16, - "widgetId": "znedt4bss1", - "containerStyle": "card", - "topRow": 2, - "bottomRow": 12, + "textAlign": "LEFT", + "widgetId": "4i40lfqldh", + "topRow": 9, + "bottomRow": 14, "parentRowSpace": 40, - "isVisible": true, - "type": "CONTAINER_WIDGET", - "parentId": "0", - "blueprint": { - "view": [ - { - "position": { - "top": 0, - "left": 0 - }, - "type": "CANVAS_WIDGET", - "props": { - "detachFromLayout": true, - "children": [ - "2rv46ko5nr", - "6jz7n81a0w", - "pu5tfgbgs8", - "1dqi8yqken", - "rhjs3oqi4x", - "12b8ga1jyb", - "fow2t5em1j", - "95hllivp93", - "mme1t8c9py" - ], - "containerStyle": "none", - "canExtend": false - } - } - ] + "isVisible": "{{appsmith.mode === \"EDIT\"}}", + "type": "TEXT_WIDGET", + "dynamicBindings": { + "text": true, + "value": true, + "isVisible": true }, + "shouldScroll": true, + "parentId": "0", "isLoading": false, "parentColumnSpace": 74, - "leftColumn": 10, - "children": [ - { - "widgetName": "Canvas2", - "rightColumn": 592, - "detachFromLayout": true, - "widgetId": "lz32lxsbsd", - "containerStyle": "none", - "topRow": 0, - "bottomRow": 400, - "parentRowSpace": 1, - "isVisible": true, - "canExtend": false, - "type": "CANVAS_WIDGET", - "parentId": "znedt4bss1", - "minHeight": 400, - "isLoading": false, - "parentColumnSpace": 1, - "leftColumn": 0, - "children": [ - { - "image": "{{usersTable.selectedRow.avatar}}", - "widgetName": "Image1", - "rightColumn": 6, - "widgetId": "2rv46ko5nr", - "dynamicProperties": { - "isVisible": true - }, - "topRow": 0, - "bottomRow": 3, - "parentRowSpace": 40, - "isVisible": "{{usersTable.selectedRow !== undefined}}", - "type": "IMAGE_WIDGET", - "dynamicBindings": { - "image": true, - "isVisible": true - }, - "parentId": "lz32lxsbsd", - "isLoading": false, - "parentColumnSpace": 25.25, - "imageShape": "RECTANGLE", - "leftColumn": 0, - "defaultImage": "https://res.cloudinary.com/drako999/image/upload/v1589196259/default.png" - }, - { - "widgetName": "Text7", - "rightColumn": 13, - "textAlign": "LEFT", - "widgetId": "6jz7n81a0w", - "dynamicProperties": { - "isVisible": true - }, - "topRow": 0, - "bottomRow": 1, - "parentRowSpace": 40, - "isVisible": "{{usersTable.selectedRow !== undefined}}", - "type": "TEXT_WIDGET", - "dynamicBindings": { - "text": true, - "isVisible": true, - "value": true - }, - "parentId": "lz32lxsbsd", - "isLoading": false, - "parentColumnSpace": 25.25, - "leftColumn": 7, - "text": "{{usersTable.selectedRow.name}}", - "textStyle": "LABEL" - }, - { - "widgetName": "Text8", - "rightColumn": 16, - "textAlign": "LEFT", - "widgetId": "pu5tfgbgs8", - "dynamicProperties": { - "isVisible": true - }, - "topRow": 1, - "bottomRow": 2, - "parentRowSpace": 40, - "isVisible": "{{usersTable.selectedRow !== undefined}}", - "type": "TEXT_WIDGET", - "dynamicBindings": { - "text": true, - "isVisible": true, - "value": true - }, - "parentId": "lz32lxsbsd", - "isLoading": false, - "parentColumnSpace": 25.25, - "leftColumn": 7, - "text": "{{usersTable.selectedRow.email}}", - "textStyle": "LABEL" - }, - { - "widgetName": "Text9", - "rightColumn": 16, - "textAlign": "LEFT", - "widgetId": "1dqi8yqken", - "dynamicProperties": { - "isVisible": true - }, - "topRow": 2, - "bottomRow": 3, - "parentRowSpace": 40, - "isVisible": "{{usersTable.selectedRow !== undefined}}", - "type": "TEXT_WIDGET", - "dynamicBindings": { - "text": true, - "isVisible": true, - "value": true - }, - "parentId": "lz32lxsbsd", - "isLoading": false, - "parentColumnSpace": 25.25, - "leftColumn": 7, - "text": "{{usersTable.selectedRow.address}}", - "textStyle": "LABEL" - }, - { - "widgetName": "Text11", - "rightColumn": 16, - "textAlign": "CENTER", - "widgetId": "rhjs3oqi4x", - "dynamicProperties": { - "isVisible": true - }, - "topRow": 6, - "bottomRow": 7, - "parentRowSpace": 40, - "isVisible": "{{usersTable.selectedRow !== undefined}}", - "type": "TEXT_WIDGET", - "dynamicBindings": { - "text": true, - "isVisible": true, - "value": true - }, - "parentId": "lz32lxsbsd", - "isLoading": false, - "parentColumnSpace": 25.25, - "leftColumn": 0, - "text": "

Status: {{usersTable.selectedRow.status === \"APPROVED\" ? \"Approved āœ…\" : \nusersTable.selectedRow.status === \"REJECTED\" ? \"Rejected āŒ\" : \"Pending āŒ›\"}}

", - "textStyle": "HEADING" - }, - { - "widgetName": "Text12", - "rightColumn": 11, - "textAlign": "LEFT", - "widgetId": "12b8ga1jyb", - "topRow": 3, - "bottomRow": 4, - "parentRowSpace": 40, - "isVisible": true, - "type": "TEXT_WIDGET", - "dynamicBindings": { - "text": true, - "value": true - }, - "parentId": "lz32lxsbsd", - "isLoading": false, - "parentColumnSpace": 25.25, - "leftColumn": 7, - "text": "{{ (usersTable.selectedRow.gender === \"Male\" ? \"ā™‚ļø\" : \"ā™€ļø\") + usersTable.selectedRow.gender}}", - "textStyle": "LABEL" - }, - { - "widgetName": "Button3", - "rightColumn": 16, - "onClick": "{{approve_user.run(() => getUsers.run(), () => {})}}", - "isDefaultClickDisabled": true, - "widgetId": "fow2t5em1j", - "dynamicProperties": { - "isVisible": true - }, - "buttonStyle": "PRIMARY_BUTTON", - "topRow": 8, - "bottomRow": 9, - "parentRowSpace": 40, - "isVisible": "{{usersTable.selectedRow !== undefined}}", - "type": "BUTTON_WIDGET", - "dynamicBindings": { - "isVisible": true - }, - "parentId": "lz32lxsbsd", - "isLoading": false, - "parentColumnSpace": 25.25, - "leftColumn": 11, - "dynamicTriggers": { - "onClick": true - }, - "text": "Approve", - "isDisabled": false - }, - { - "widgetName": "Button4", - "rightColumn": 16, - "onClick": "{{showModal('Modal1')}}", - "isDefaultClickDisabled": true, - "widgetId": "95hllivp93", - "dynamicProperties": { - "isVisible": true - }, - "buttonStyle": "PRIMARY_BUTTON", - "topRow": 0, - "bottomRow": 1, - "parentRowSpace": 40, - "isVisible": "{{usersTable.selectedRow !== undefined}}", - "type": "BUTTON_WIDGET", - "dynamicBindings": { - "isVisible": true - }, - "parentId": "lz32lxsbsd", - "isLoading": false, - "parentColumnSpace": 25.25, - "leftColumn": 13, - "dynamicTriggers": { - "onClick": true - }, - "text": "Edit", - "isDisabled": false - }, - { - "widgetName": "Button5", - "rightColumn": 10, - "onClick": "{{reject_user.run(() => getUsers.run(), () => {})}}", - "isDefaultClickDisabled": true, - "widgetId": "4z16xr3mlu", - "dynamicProperties": { - "isVisible": true - }, - "buttonStyle": "SECONDARY_BUTTON", - "topRow": 8, - "bottomRow": 9, - "parentRowSpace": 40, - "isVisible": "{{usersTable.selectedRow !== undefined}}", - "type": "BUTTON_WIDGET", - "dynamicBindings": { - "isVisible": true - }, - "parentId": "lz32lxsbsd", - "isLoading": false, - "parentColumnSpace": 25.25, - "leftColumn": 5, - "dynamicTriggers": { - "onClick": true - }, - "text": "āŒReject", - "isDisabled": false - }, - { - "widgetName": "Text10", - "rightColumn": 16, - "textAlign": "CENTER", - "widgetId": "rz1jcja6o2", - "dynamicProperties": { - "isVisible": true - }, - "topRow": 4, - "bottomRow": 5, - "parentRowSpace": 40, - "isVisible": "{{usersTable.selectedRow === undefined}}", - "type": "TEXT_WIDGET", - "dynamicBindings": { - "isVisible": true, - "value": true - }, - "parentId": "0", - "isLoading": false, - "parentColumnSpace": 74, - "leftColumn": 0, - "text": "

šŸ‘ˆšŸæ Select a user

", - "textStyle": "HEADING" - }, - { - "widgetName": "Text14", - "rightColumn": 16, - "textAlign": "LEFT", - "widgetId": "op0ououevb", - "topRow": 3, - "bottomRow": 4, - "parentRowSpace": 40, - "isVisible": true, - "type": "TEXT_WIDGET", - "dynamicBindings": { - "text": true, - "value": true - }, - "parentId": "lz32lxsbsd", - "isLoading": false, - "parentColumnSpace": 25.25, - "leftColumn": 12, - "text": "{{ (usersTable.selectedRow.role === \"Admin\" ? \"šŸ‘®\" : usersTable.selectedRow.role === \"Editor\" ? \"šŸ–‹ļø\" : \"šŸ”\") + usersTable.selectedRow.role}}", - "textStyle": "LABEL" - } - ] - } - ] + "leftColumn": 9, + "text": "

šŸ” Inspect the getFilteredSignupCount Query.

\nšŸ“… Update the startDatePicker to begin 6 months ago by default\n

šŸ“ˆ Update the x-axis to display the date range selected
\nEx. {{\"{{startDatePicker.selectedDate}} - {{endDatePicker.selectedDate}}\"}}

", + "textStyle": "BODY", + "dynamicProperties": { + "isVisible": true + } } ] }, @@ -1246,24 +792,196 @@ "detachFromLayout": true, "widgetId": "0", "topRow": 0, - "bottomRow": 1560, + "bottomRow": 1280, "containerStyle": "none", "snapRows": 33, "parentRowSpace": 1, "type": "CANVAS_WIDGET", "canExtend": true, "dynamicBindings": { + }, "version": 5, "minHeight": 1292, "parentColumnSpace": 1, "leftColumn": 0, "children": [ + { + "widgetName": "Chart1", + "rightColumn": 8, + "allowHorizontalScroll": false, + "widgetId": "ul3c5oquih", + "topRow": 4, + "bottomRow": 14, + "parentRowSpace": 40, + "isVisible": true, + "type": "CHART_WIDGET", + "dynamicBindings": { + "chartData": true + }, + "parentId": "0", + "isLoading": false, + "chartData": "[{\"seriesName\":\"Users\",\"data\":\"{{getFilteredSignupCount.data.map((dateCount) => { \\nreturn {\\n x: moment(dateCount.sign_up_date, \\\"DD/MM/YYYY\\\").format(\\\"Do- MMM\\\"),\\n y: dateCount.count + \\\"\\\"\\n}\\n})}}\"}]", + "yAxisName": "Users", + "parentColumnSpace": 74, + "chartName": "User Sign up Trend", + "leftColumn": 0, + "xAxisName": "Date", + "chartType": "AREA_CHART" + }, { "widgetName": "Text1", + "rightColumn": 12, + "textAlign": "CENTER", + "widgetId": "esiyii2azf", + "topRow": 0, + "bottomRow": 1, + "parentRowSpace": 40, + "isVisible": true, + "type": "TEXT_WIDGET", + "dynamicBindings": { + "value": true, + "text": true + }, + "parentId": "0", + "isLoading": false, + "parentColumnSpace": 74, + "leftColumn": 4, + "text": "

{{appsmith.mode !== \"EDIT\" ? \"Edit this application to begin\" : \"Filter Chart Data\"}}

", + "textStyle": "LABEL" + }, + { + "widgetName": "startDatePicker", + "defaultDate": "{{moment().subtract(2, \"months\").format(\"YYYY-MM-DD\")}}", "rightColumn": 4, + "dateFormat": "YYYY-MM-DD", + "widgetId": "3tsl49w1s0", + "dynamicProperties": { + "defaultDate": true + }, + "topRow": 3, + "bottomRow": 4, + "parentRowSpace": 40, + "isVisible": true, + "datePickerType": "DATE_PICKER", + "label": "", + "type": "DATE_PICKER_WIDGET", + "dynamicBindings": { + "defaultDate": true, + "isValid": true, + "value": true + }, + "parentId": "0", + "isLoading": false, + "parentColumnSpace": 74, + "leftColumn": 2, + "dynamicTriggers": { + "onDateSelected": true + }, + "isDisabled": false, + "onDateSelected": "{{getFilteredSignupCount.run()}}" + }, + { + "widgetName": "endDatePicker", + "defaultDate": "{{moment().format(\"YYYY-MM-DD\")}}", + "rightColumn": 8, + "dateFormat": "YYYY-MM-DD", + "widgetId": "cocrv71gh5", + "dynamicProperties": { + "defaultDate": true + }, + "topRow": 3, + "bottomRow": 4, + "parentRowSpace": 40, + "isVisible": true, + "datePickerType": "DATE_PICKER", + "label": "", + "type": "DATE_PICKER_WIDGET", + "dynamicBindings": { + "defaultDate": true, + "isValid": true, + "value": true + }, + "parentId": "0", + "isLoading": false, + "parentColumnSpace": 74, + "leftColumn": 6, + "dynamicTriggers": { + "onDateSelected": true + }, + "isDisabled": false, + "onDateSelected": "{{getFilteredSignupCount.run()}}" + }, + { + "widgetName": "Text2", + "rightColumn": 2, + "textAlign": "RIGHT", + "widgetId": "r31px5tpl6", + "topRow": 3, + "bottomRow": 4, + "parentRowSpace": 40, + "isVisible": true, + "type": "TEXT_WIDGET", + "dynamicBindings": { + "value": true + }, + "parentId": "0", + "isLoading": false, + "parentColumnSpace": 74, + "leftColumn": 0, + "text": "Start Date", + "textStyle": "LABEL" + }, + { + "widgetName": "Text3", + "rightColumn": 6, + "textAlign": "RIGHT", + "widgetId": "21rsr77a84", + "topRow": 3, + "bottomRow": 4, + "parentRowSpace": 40, + "isVisible": true, + "type": "TEXT_WIDGET", + "dynamicBindings": { + "value": true + }, + "parentId": "0", + "isLoading": false, + "parentColumnSpace": 74, + "leftColumn": 5, + "text": "End Date", + "textStyle": "LABEL" + }, + { + "widgetName": "Text4", + "rightColumn": 16, "textAlign": "LEFT", - "widgetId": "weg5so2vr1", + "widgetId": "digi7gghdg", + "topRow": 3, + "bottomRow": 8, + "parentRowSpace": 40, + "isVisible": "{{appsmith.mode === \"EDIT\"}}", + "type": "TEXT_WIDGET", + "dynamicBindings": { + "value": true, + "isVisible": true + }, + "parentId": "0", + "isLoading": false, + "parentColumnSpace": 74, + "leftColumn": 9, + "text": "

šŸ’” The chart displays data returned by the getFilteredSignupCount Query.

\nšŸ“… The getFilteredSignupCount Query reads the values of the startDatePicker and endDatePicker to filter the query. The Date Pickers execute the query onDateSelected\n

", + "textStyle": "BODY", + "shouldScroll": true, + "dynamicProperties": { + "isVisible": true + } + }, + { + "widgetName": "Text7", + "rightColumn": 13, + "textAlign": "CENTER", + "widgetId": "aiguj74viz", "topRow": 1, "bottomRow": 2, "parentRowSpace": 40, @@ -1275,15 +993,573 @@ "parentId": "0", "isLoading": false, "parentColumnSpace": 74, + "leftColumn": 3, + "text": "This page demonstrates how to filter and change the data displayed in a chart", + "textStyle": "BODY", + "shouldScroll": false + }, + { + "widgetName": "Text8", + "rightColumn": 16, + "textAlign": "LEFT", + "widgetId": "kyw545g7n4", + "topRow": 8, + "bottomRow": 9, + "parentRowSpace": 40, + "isVisible": "{{appsmith.mode === \"EDIT\"}}", + "type": "TEXT_WIDGET", + "dynamicBindings": { + "value": true, + "isVisible": true + }, + "parentId": "0", + "isLoading": false, + "parentColumnSpace": 74, + "leftColumn": 9, + "text": "---------------------------------------------------------------------", + "textStyle": "LABEL", + "dynamicProperties": { + "isVisible": true + } + }, + { + "widgetName": "Text9", + "rightColumn": 16, + "textAlign": "LEFT", + "widgetId": "4i40lfqldh", + "topRow": 9, + "bottomRow": 14, + "parentRowSpace": 40, + "isVisible": "{{appsmith.mode === \"EDIT\"}}", + "type": "TEXT_WIDGET", + "dynamicBindings": { + "text": true, + "value": true, + "isVisible": true + }, + "shouldScroll": true, + "parentId": "0", + "isLoading": false, + "parentColumnSpace": 74, + "leftColumn": 9, + "text": "

šŸ” Inspect the getFilteredSignupCount Query.

\nšŸ“… Update the startDatePicker to begin 6 months ago by default\n

šŸ“ˆ Update the x-axis to display the date range selected
\nEx. {{\"{{startDatePicker.selectedDate}} - {{endDatePicker.selectedDate}}\"}}

", + "textStyle": "BODY", + "dynamicProperties": { + "isVisible": true + } + } + ] + }, + "layoutOnLoadActions": [ + [ + { + "name": "getFilteredSignupCount", + "pluginType": "DB", + "jsonPathKeys": [ + "startDatePicker.selectedDate", + "endDatePicker.selectedDate" + ], + "timeoutInMillisecond": 10000 + } + ] + ], + "publishedLayoutOnLoadActions": [ + [ + { + "name": "getFilteredSignupCount", + "pluginType": "DB", + "jsonPathKeys": [ + "startDatePicker.selectedDate", + "endDatePicker.selectedDate" + ], + "timeoutInMillisecond": 10000 + } + ] + ], + "widgetNames": [ + "endDatePicker", + "Text9", + "Text8", + "Text7", + "startDatePicker", + "Text4", + "Text3", + "Text2", + "Text1", + "MainContainer", + "Chart1" + ], + "deleted": false, + "policies": [ ] + } + ], + "deleted": false, + "policies": [], + "_class": "com.appsmith.server.domains.Page" + } + ], + "deleted": false, + "policies": [], + "_class": "com.appsmith.server.domains.Application" + }, + { + "name": "Customer Support Dashboard", + "isPublic": true, + "$pages": [ + { + "name": "Users Page", + "$isDefault": false, + "$actions": [ + { + "name": "Api1", + "datasource": { + "$isEmbedded": true, + "name": "https://api.razorpay.com", + "$pluginPackageName": "restapi-plugin", + "datasourceConfiguration": { + "url": "https://api.razorpay.com" + }, + "invalids": [ ], + "deleted": false, + "policies": [ ] + }, + "actionConfiguration": { + "timeoutInMillisecond": 10000, + "paginationType": "NONE", + "path": "/v1/payments/pay_29QQoUBi66xm2f/refund", + "headers": [ + { + "key": "Authorization", + "value": "Basic cnpwX3Rlc3RfSVNsVXdaWmJXUzQ1Tlo6UFJFaTZSdzBEYVdlZEtnU3VOcU5LY3B5" + }, + { + "key": "Content-Type", + "value": "application/json" + } + ], + "queryParameters": [ + { + "key": "", + "value": "" + }, + { + "key": "", + "value": "" + } + ], + "body": "{ \"amount\": 2000}", + "httpMethod": "POST" + }, + "pluginType": "API", + "dynamicBindingPathList": [ ], + "isValid": true, + "invalids": [ ], + "jsonPathKeys": [ ], + "deleted": false, + "policies": [], + "_class": "com.appsmith.server.domains.Action" + }, + { + "name": "getOrderProducts", + "datasource": { + "$isEmbedded": false, + "name": "Mock Database", + "$pluginPackageName": "postgres-plugin", + "datasourceConfiguration": { + "connection": { + "mode": "READ_WRITE" + }, + "endpoints": [ + { + "host": "fake-api.cvuydmurdlas.us-east-1.rds.amazonaws.com", + "port": 5432 + } + ], + "authentication": { + "username": "fakeapi", + "password": "LimitedAccess123#", + "databaseName": "fakeapi" + }, + "sshProxyEnabled": false + }, + "invalids": [ ], + "deleted": false, + "policies": [] + }, + "actionConfiguration": { + "timeoutInMillisecond": 10000, + "paginationType": "NONE", + "body": "SELECT products.* FROM products inner join \"orderProductMap\" on products.\"productId\" = \"orderProductMap\".\"productId\" where \"orderProductMap\".\"orderId\" = {{ordersTable.selectedRow.id}} ORDER BY id LIMIT 10;\n" + }, + "pluginType": "DB", + "dynamicBindingPathList": [ + { + "key": "body" + } + ], + "isValid": true, + "invalids": [ ], + "jsonPathKeys": [ + "ordersTable.selectedRow.id" + ], + "deleted": false, + "policies": [], + "_class": "com.appsmith.server.domains.Action" + }, + { + "name": "getOrders", + "datasource": { + "$isEmbedded": false, + "name": "Mock Database", + "$pluginPackageName": "postgres-plugin", + "datasourceConfiguration": { + "connection": { + "mode": "READ_WRITE" + }, + "endpoints": [ + { + "host": "fake-api.cvuydmurdlas.us-east-1.rds.amazonaws.com", + "port": 5432 + } + ], + "authentication": { + "username": "fakeapi", + "password": "LimitedAccess123#", + "databaseName": "fakeapi" + }, + "sshProxyEnabled": false + }, + "invalids": [ ], + "deleted": false, + "policies": [] + }, + "actionConfiguration": { + "timeoutInMillisecond": 10000, + "paginationType": "NONE", + "body": "SELECT * FROM orders where \"userId\"={{usersTable.selectedRow.id}} ORDER BY status LIMIT 10;\n" + }, + "pluginType": "DB", + "dynamicBindingPathList": [ + { + "key": "body" + } + ], + "isValid": true, + "invalids": [ ], + "jsonPathKeys": [ + "usersTable.selectedRow.id" + ], + "deleted": false, + "policies": [], + "_class": "com.appsmith.server.domains.Action" + }, + { + "name": "getUsers", + "datasource": { + "$isEmbedded": false, + "name": "Mock Database", + "$pluginPackageName": "postgres-plugin", + "datasourceConfiguration": { + "connection": { + "mode": "READ_WRITE" + }, + "endpoints": [ + { + "host": "fake-api.cvuydmurdlas.us-east-1.rds.amazonaws.com", + "port": 5432 + } + ], + "authentication": { + "username": "fakeapi", + "password": "LimitedAccess123#", + "databaseName": "fakeapi" + }, + "sshProxyEnabled": false + }, + "invalids": [ ], + "deleted": false, + "policies": [] + }, + "actionConfiguration": { + "timeoutInMillisecond": 10000, + "paginationType": "NONE", + "body": "SELECT * FROM users where email ilike '%{{usersTable.searchText}}%' ORDER BY id LIMIT 10 offset {{(usersTable.pageNo - 1) * 10}}" + }, + "pluginType": "DB", + "executeOnLoad": true, + "dynamicBindingPathList": [ + { + "key": "body" + } + ], + "isValid": true, + "invalids": [ ], + "jsonPathKeys": [ + "usersTable.searchText", + "(usersTable.pageNo - 1) * 10" + ], + "deleted": false, + "policies": [], + "_class": "com.appsmith.server.domains.Action" + }, + { + "name": "markOrderRefund", + "datasource": { + "$isEmbedded": false, + "name": "Mock Database", + "$pluginPackageName": "postgres-plugin", + "datasourceConfiguration": { + "connection": { + "mode": "READ_WRITE" + }, + "endpoints": [ + { + "host": "fake-api.cvuydmurdlas.us-east-1.rds.amazonaws.com", + "port": 5432 + } + ], + "authentication": { + "username": "fakeapi", + "password": "LimitedAccess123#", + "databaseName": "fakeapi" + }, + "sshProxyEnabled": false + }, + "invalids": [ ], + "deleted": false, + "policies": [] + }, + "actionConfiguration": { + "timeoutInMillisecond": 10000, + "paginationType": "NONE", + "body": "UPDATE orders\n SET status = 'REFUNDED'\n WHERE id = {{ordersTable.selectedRow.id}};\n" + }, + "pluginType": "DB", + "dynamicBindingPathList": [ + { + "key": "body" + } + ], + "isValid": true, + "invalids": [ ], + "jsonPathKeys": [ + "ordersTable.selectedRow.id" + ], + "deleted": false, + "policies": [], + "_class": "com.appsmith.server.domains.Action" + }, + { + "name": "refundAPI", + "datasource": { + "$isEmbedded": true, + "name": "https://api.razorpay.com", + "$pluginPackageName": "restapi-plugin", + "datasourceConfiguration": { + "url": "https://api.razorpay.com" + }, + "invalids": [ ], + "deleted": false, + "policies": [ ] + }, + "actionConfiguration": { + "timeoutInMillisecond": 10000, + "paginationType": "NONE", + "path": "/v1/payments/{{ordersTable.selectedRow.paymentId}}/refund", + "headers": [ + { + "key": "Authorization", + "value": "Basic cnpwX3Rlc3RfSVNsVXdaWmJXUzQ1Tlo6UFJFaTZSdzBEYVdlZEtnU3VOcU5LY3B5" + }, + { + "key": "Content-Type", + "value": "application/json" + } + ], + "queryParameters": [ + { + "key": "", + "value": "" + }, + { + "key": "", + "value": "" + } + ], + "body": "{ \n\t\"amount\": \"{{ordersTable.selectedRow.orderAmount * 100}}\"\n}", + "httpMethod": "POST" + }, + "pluginType": "API", + "dynamicBindingPathList": [ + { + "key": "body" + }, + { + "key": "path" + } + ], + "isValid": true, + "invalids": [ ], + "jsonPathKeys": [ + "ordersTable.selectedRow.orderAmount * 100", + "ordersTable.selectedRow.paymentId" + ], + "deleted": false, + "policies": [], + "_class": "com.appsmith.server.domains.Action" + }, + { + "name": "updateUser", + "datasource": { + "$isEmbedded": false, + "name": "Mock Database", + "$pluginPackageName": "postgres-plugin", + "datasourceConfiguration": { + "connection": { + "mode": "READ_WRITE" + }, + "endpoints": [ + { + "host": "fake-api.cvuydmurdlas.us-east-1.rds.amazonaws.com", + "port": 5432 + } + ], + "authentication": { + "username": "fakeapi", + "password": "LimitedAccess123#", + "databaseName": "fakeapi" + }, + "sshProxyEnabled": false + }, + "invalids": [ ], + "deleted": false, + "policies": [] + }, + "actionConfiguration": { + "timeoutInMillisecond": 10000, + "paginationType": "NONE", + "body": "UPDATE users SET name = '{{nameInput.text}}', address = '{{addressInput.text}}', email = '{{emailInput.text}}', \"phoneNo\" = '{{phoneInput.text}}' WHERE id = {{usersTable.selectedRow.id}}" + }, + "pluginType": "DB", + "dynamicBindingPathList": [ + { + "key": "body" + } + ], + "isValid": true, + "invalids": [ ], + "jsonPathKeys": [ + "phoneInput.text", + "addressInput.text", + "nameInput.text", + "usersTable.selectedRow.id", + "emailInput.text" + ], + "deleted": false, + "policies": [], + "_class": "com.appsmith.server.domains.Action" + } + ], + "layouts": [ + { + "viewMode": false, + "dsl": { + "widgetName": "MainContainer", + "backgroundColor": "none", + "rightColumn": 1224, + "snapColumns": 16, + "detachFromLayout": true, + "widgetId": "0", + "topRow": 0, + "bottomRow": 1360, + "containerStyle": "none", + "snapRows": 33, + "parentRowSpace": 1, + "type": "CANVAS_WIDGET", + "canExtend": true, + "dynamicBindings": { + + }, + "version": 5, + "minHeight": 1292, + "parentColumnSpace": 1, + "leftColumn": 0, + "children": [ + { + "widgetName": "Text1", + "rightColumn": 4, + "textAlign": "LEFT", + "widgetId": "5302vrcr7x", + "topRow": 0, + "bottomRow": 1, + "parentRowSpace": 40, + "isVisible": true, + "type": "TEXT_WIDGET", + "dynamicBindings": { + "value": true + }, + "parentId": "0", + "isLoading": false, + "parentColumnSpace": 74, "leftColumn": 0, - "text": "

Users

", + "text": "Users", "textStyle": "HEADING" }, + { + "hiddenColumns": [ + "createdAt", + "updatedAt", + "avatar", + "dob", + "gender", + "role", + "status", + "address" + ], + "widgetName": "usersTable", + "rightColumn": 9, + "widgetId": "z0l09s5jaz", + "topRow": 1, + "bottomRow": 17, + "parentRowSpace": 40, + "onPageChange": "{{getUsers.run()}}", + "tableData": "{{getUsers.data}}", + "isVisible": true, + "label": "Data", + "searchKey": "", + "type": "TABLE_WIDGET", + "dynamicBindings": { + "tableData": true, + "selectedRow": true, + "filteredTableData": true, + "defaultSearchText": true + }, + "parentId": "0", + "serverSidePaginationEnabled": true, + "isLoading": false, + "onSearchTextChanged": "{{getUsers.run()}}", + "parentColumnSpace": 74, + "leftColumn": 0, + "dynamicTriggers": { + "onSearchTextChanged": true, + "onRowSelected": true, + "onPageChange": true + }, + "onRowSelected": "{{getOrders.run()}}", + "columnActions": [ ], + "columnSizeMap": { + "address": 204, + "name": 268, + "id": 74, + "email": 311 + }, + "defaultSearchText": "{{appsmith.URL.queryParams.email}}" + }, { "widgetName": "Modal1", "rightColumn": 0, "detachFromLayout": true, - "widgetId": "byv6k1tm4q", + "widgetId": "qcv5mxmdse", "topRow": 0, "bottomRow": 0, "parentRowSpace": 1, @@ -1292,6 +1568,7 @@ "type": "MODAL_WIDGET", "canEscapeKeyClose": true, "dynamicBindings": { + }, "parentId": "0", "shouldScrollContents": true, @@ -1376,7 +1653,7 @@ ] }, "detachFromLayout": true, - "children": [], + "children": [ ], "isVisible": true, "isDisabled": false, "canExtend": true @@ -1393,14 +1670,14 @@ "widgetName": "Canvas1", "rightColumn": 0, "detachFromLayout": true, - "widgetId": "w5pk5ifpbq", + "widgetId": "9pgyrkail5", "topRow": 0, "bottomRow": 640, "parentRowSpace": 1, "isVisible": true, "canExtend": true, "type": "CANVAS_WIDGET", - "parentId": "byv6k1tm4q", + "parentId": "qcv5mxmdse", "shouldScrollContents": false, "blueprint": { "view": [ @@ -1483,62 +1760,57 @@ "onClick": "{{closeModal('Modal1')}}", "color": "#040627", "iconName": "cross", - "widgetId": "3mbbjt4pzc", + "widgetId": "3g9bl2sr58", "topRow": 0, "bottomRow": 1, "isVisible": true, "type": "ICON_WIDGET", - "parentId": "w5pk5ifpbq", + "parentId": "9pgyrkail5", "isLoading": false, "leftColumn": 14, "iconSize": 24 }, { "widgetName": "Text2", - "rightColumn": 10, + "rightColumn": 14, "textAlign": "LEFT", - "widgetId": "wcn8me2ef8", + "widgetId": "lddwvwekdx", "topRow": 0, "bottomRow": 1, "isVisible": true, "type": "TEXT_WIDGET", "dynamicBindings": { + "text": true, "value": true }, - "parentId": "w5pk5ifpbq", + "parentId": "9pgyrkail5", "isLoading": false, "leftColumn": 0, - "text": "User Data", - "textStyle": "HEADING" + "text": "

šŸ–‹ļø Edit {{usersTable.selectedRow.name}}'s Profile

", + "textStyle": "LABEL" }, { "widgetName": "Button1", - "rightColumn": 13, - "onClick": "{{closeModal('Modal1')}}", + "rightColumn": 12, "isDefaultClickDisabled": true, - "widgetId": "sz67dp5my1", - "dynamicProperties": { - }, + "widgetId": "0asi0ps632", "buttonStyle": "SECONDARY_BUTTON", "topRow": 13, "bottomRow": 14, "isVisible": true, "type": "BUTTON_WIDGET", - "parentId": "w5pk5ifpbq", + "parentId": "9pgyrkail5", "isLoading": false, - "leftColumn": 10, - "dynamicTriggers": { - "onClick": true - }, + "leftColumn": 9, "text": "Cancel", "isDisabled": false }, { "widgetName": "Button2", "rightColumn": 16, - "onClick": "{{updateUser.run(() => getUsers.run(() => { closeModal('Modal1') }), () => {})}}", + "onClick": "{{updateUser.run(() => getUsers.run(() => closeModal('Modal1')), () => showAlert('error'))}}", "isDefaultClickDisabled": true, - "widgetId": "tasjzaf7dn", + "widgetId": "9aoww0u181", "dynamicProperties": { "onClick": true }, @@ -1548,21 +1820,22 @@ "isVisible": true, "type": "BUTTON_WIDGET", "dynamicBindings": { + }, - "parentId": "w5pk5ifpbq", + "parentId": "9pgyrkail5", "isLoading": false, - "leftColumn": 13, + "leftColumn": 12, "dynamicTriggers": { "onClick": true }, - "text": "Update", + "text": "Save", "isDisabled": false }, { - "widgetName": "Text3", + "widgetName": "Text10", "rightColumn": 4, "textAlign": "RIGHT", - "widgetId": "xuwf6yoz8o", + "widgetId": "zxqqitzf07", "topRow": 2, "bottomRow": 3, "parentRowSpace": 40, @@ -1571,7 +1844,7 @@ "dynamicBindings": { "value": true }, - "parentId": "w5pk5ifpbq", + "parentId": "9pgyrkail5", "isLoading": false, "parentColumnSpace": 30.75, "leftColumn": 0, @@ -1579,9 +1852,93 @@ "textStyle": "LABEL" }, { - "widgetName": "userNameInput", - "rightColumn": 14, - "widgetId": "7w6gdpp20h", + "widgetName": "Text11", + "rightColumn": 4, + "textAlign": "RIGHT", + "widgetId": "52whn6clnv", + "topRow": 3, + "bottomRow": 4, + "parentRowSpace": 40, + "isVisible": true, + "type": "TEXT_WIDGET", + "dynamicBindings": { + "value": true + }, + "parentId": "9pgyrkail5", + "isLoading": false, + "parentColumnSpace": 30.75, + "leftColumn": 0, + "text": "Email", + "textStyle": "LABEL" + }, + { + "widgetName": "Text12", + "rightColumn": 4, + "textAlign": "RIGHT", + "widgetId": "qhmfxrxrp8", + "topRow": 5, + "bottomRow": 6, + "parentRowSpace": 40, + "isVisible": true, + "type": "TEXT_WIDGET", + "dynamicBindings": { + "value": true + }, + "parentId": "9pgyrkail5", + "isLoading": false, + "parentColumnSpace": 30.75, + "leftColumn": 0, + "text": "Address", + "textStyle": "LABEL" + }, + { + "widgetName": "addressInput", + "rightColumn": 13, + "widgetId": "5w60gql1bf", + "topRow": 5, + "bottomRow": 8, + "parentRowSpace": 40, + "isVisible": true, + "label": "", + "type": "INPUT_WIDGET", + "dynamicBindings": { + "isValid": true, + "defaultText": true, + "value": true + }, + "parentId": "9pgyrkail5", + "isLoading": false, + "parentColumnSpace": 30.75, + "leftColumn": 4, + "inputType": "TEXT", + "defaultText": "{{usersTable.selectedRow.address}}" + }, + { + "widgetName": "emailInput", + "rightColumn": 13, + "widgetId": "l97o8yvlrc", + "topRow": 3, + "bottomRow": 4, + "parentRowSpace": 40, + "isVisible": true, + "label": "", + "type": "INPUT_WIDGET", + "dynamicBindings": { + "isValid": true, + "defaultText": true, + "value": true + }, + "parentId": "9pgyrkail5", + "isLoading": false, + "parentColumnSpace": 30.75, + "leftColumn": 4, + "inputType": "TEXT", + "defaultText": "{{usersTable.selectedRow.email}}" + }, + { + "widgetName": "nameInput", + "rightColumn": 13, + "widgetId": "dorbm7hw83", "topRow": 2, "bottomRow": 3, "parentRowSpace": 40, @@ -1593,7 +1950,7 @@ "defaultText": true, "value": true }, - "parentId": "w5pk5ifpbq", + "parentId": "9pgyrkail5", "isLoading": false, "parentColumnSpace": 30.75, "leftColumn": 4, @@ -1601,31 +1958,31 @@ "defaultText": "{{usersTable.selectedRow.name}}" }, { - "widgetName": "Text4", + "widgetName": "Text20", "rightColumn": 4, "textAlign": "RIGHT", - "widgetId": "ipq7sver55", - "topRow": 3, - "bottomRow": 4, + "widgetId": "gds83r70jn", + "topRow": 4, + "bottomRow": 5, "parentRowSpace": 40, "isVisible": true, "type": "TEXT_WIDGET", "dynamicBindings": { "value": true }, - "parentId": "w5pk5ifpbq", + "parentId": "9pgyrkail5", "isLoading": false, "parentColumnSpace": 30.75, "leftColumn": 0, - "text": "Email", + "text": "Phone No", "textStyle": "LABEL" }, { - "widgetName": "userEmailInput", - "rightColumn": 14, - "widgetId": "gmxr33ul94", - "topRow": 3, - "bottomRow": 4, + "widgetName": "phoneInput", + "rightColumn": 13, + "widgetId": "lcmqk3xayr", + "topRow": 4, + "bottomRow": 5, "parentRowSpace": 40, "isVisible": true, "label": "", @@ -1635,225 +1992,27 @@ "defaultText": true, "value": true }, - "parentId": "w5pk5ifpbq", + "parentId": "9pgyrkail5", "isLoading": false, + "regex": "^[0-9]{1,10}$", "parentColumnSpace": 30.75, "leftColumn": 4, "inputType": "TEXT", - "defaultText": "{{usersTable.selectedRow.email}}" - }, - { - "widgetName": "Text5", - "rightColumn": 4, - "textAlign": "RIGHT", - "widgetId": "qodaro6enw", - "topRow": 4, - "bottomRow": 5, - "parentRowSpace": 40, - "isVisible": true, - "type": "TEXT_WIDGET", - "dynamicBindings": { - "value": true - }, - "parentId": "w5pk5ifpbq", - "isLoading": false, - "parentColumnSpace": 30.75, - "leftColumn": 0, - "text": "Role", - "textStyle": "LABEL" - }, - { - "widgetName": "userRoleDropdown", - "rightColumn": 14, - "widgetId": "ca93zv3q74", - "topRow": 4, - "bottomRow": 5, - "parentRowSpace": 40, - "isVisible": true, - "label": "", - "type": "DROP_DOWN_WIDGET", - "dynamicBindings": { - "defaultOptionValue": true, - "selectedOptionArr": true, - "isValid": true, - "selectedIndexArr": true, - "selectedOption": true, - "value": true, - "selectedIndex": true - }, - "parentId": "w5pk5ifpbq", - "isLoading": false, - "defaultOptionValue": "{{usersTable.selectedRow.role}}", - "selectionType": "SINGLE_SELECT", - "parentColumnSpace": 30.75, - "leftColumn": 4, - "options": "[\n {\n \"label\": \"Admin\",\n \"value\": \"Admin\"\n },\n {\n \"label\": \"Editor\",\n \"value\": \"Editor\"\n },\n {\n \"label\": \"Viewer\",\n \"value\": \"Viewer\"\n }\n]" - }, - { - "widgetName": "Text6", - "rightColumn": 4, - "textAlign": "RIGHT", - "widgetId": "6kt0zxnjp2", - "topRow": 6, - "bottomRow": 7, - "parentRowSpace": 40, - "isVisible": true, - "type": "TEXT_WIDGET", - "dynamicBindings": { - "value": true - }, - "parentId": "w5pk5ifpbq", - "isLoading": false, - "parentColumnSpace": 30.75, - "leftColumn": 0, - "text": "Address", - "textStyle": "LABEL" - }, - { - "widgetName": "userAddressDropdown", - "rightColumn": 14, - "widgetId": "dvjvau3h01", - "topRow": 6, - "bottomRow": 9, - "parentRowSpace": 40, - "isVisible": true, - "label": "", - "type": "INPUT_WIDGET", - "dynamicBindings": { - "isValid": true, - "defaultText": true, - "value": true - }, - "parentId": "w5pk5ifpbq", - "isLoading": false, - "parentColumnSpace": 30.75, - "leftColumn": 4, - "inputType": "TEXT", - "defaultText": "{{usersTable.selectedRow.address}}" - }, - { - "isVisible": true, - "text": "Gender", - "textStyle": "LABEL", - "textAlign": "RIGHT", - "widgetName": "Text13", - "type": "TEXT_WIDGET", - "isLoading": false, - "parentColumnSpace": 30.75, - "parentRowSpace": 40, - "leftColumn": 0, - "rightColumn": 4, - "topRow": 5, - "bottomRow": 6, - "parentId": "w5pk5ifpbq", - "widgetId": "5kbrck0d80", - "dynamicBindings": { - "value": true - } - }, - { - "isVisible": true, - "label": "", - "selectionType": "SINGLE_SELECT", - "options": "[\n {\n \"label\": \"Male\",\n \"value\": \"Male\"\n },\n {\n \"label\": \"Female\",\n \"value\": \"Female\"\n }\n]", - "widgetName": "Dropdown1", - "defaultOptionValue": "{{usersTable.selectedRow.gender}}", - "type": "DROP_DOWN_WIDGET", - "isLoading": false, - "parentColumnSpace": 30.75, - "parentRowSpace": 40, - "leftColumn": 4, - "rightColumn": 14, - "topRow": 5, - "bottomRow": 6, - "parentId": "w5pk5ifpbq", - "widgetId": "ojpyrgnvll", - "dynamicBindings": { - "isValid": true, - "selectedOption": true, - "selectedOptionArr": true, - "selectedIndex": true, - "selectedIndexArr": true, - "value": true, - "defaultOptionValue": true - } + "defaultText": "{{usersTable.selectedRow.phoneNo || \"\"}}" } ], "isDisabled": false } ] }, - { - "hiddenColumns": [ - "updatedAt", - "gender", - "avatar", - "dob", - "address", - "status", - "createdAt" - ], - "widgetName": "usersTable", - "rightColumn": 10, - "columnOrder": [ - "id", - "name", - "email", - "role", - "actions", - "createdAt", - "updatedAt", - "gender", - "avatar", - "dob" - ], - "widgetId": "4onx0po0j1", - "topRow": 2, - "bottomRow": 18, - "parentRowSpace": 40, - "onPageChange": "{{getUsers.run()}}", - "tableData": "{{getUsers.data}}", - "isVisible": true, - "label": "Data", - "searchKey": "", - "type": "TABLE_WIDGET", - "dynamicBindings": { - "tableData": true, - "selectedRow": true, - "filteredTableData": true - }, - "parentId": "0", - "serverSidePaginationEnabled": true, - "isLoading": false, - "onSearchTextChanged": "{{getUsers.run()}}", - "parentColumnSpace": 74, - "leftColumn": 0, - "dynamicTriggers": { - "onSearchTextChanged": true, - "onPageChange": true - }, - "columnActions": [ - { - "actionPayloads": [], - "label": "Edit", - "id": "inz6ivtcdt", - "dynamicTrigger": "{{showModal('Modal1')}}" - } - ], - "columnSizeMap": { - "address": 238, - "id": 91, - "email": 236 - } - }, { "backgroundColor": "#FFFFFF", "widgetName": "Container1", "rightColumn": 16, - "widgetId": "znedt4bss1", + "widgetId": "5wiefwlh3m", "containerStyle": "card", - "topRow": 2, - "bottomRow": 12, + "topRow": 1, + "bottomRow": 9, "parentRowSpace": 40, "isVisible": true, "type": "CONTAINER_WIDGET", @@ -1869,15 +2028,17 @@ "props": { "detachFromLayout": true, "children": [ - "2rv46ko5nr", - "6jz7n81a0w", - "pu5tfgbgs8", - "1dqi8yqken", - "rhjs3oqi4x", - "12b8ga1jyb", - "fow2t5em1j", - "95hllivp93", - "mme1t8c9py" + "8c8ixb84rt", + "vxs1336eti", + "n1tn6qwmfu", + "75njm0wxgx", + "2wymlwykex", + "4x7s4ffqyc", + "m8jxuiwony", + "3mqfe3k3qf", + "lhds2qaxeg", + "p4p3or0jcd", + "uh5tweohvx" ], "containerStyle": "none", "canExtend": false @@ -1887,13 +2048,13 @@ }, "isLoading": false, "parentColumnSpace": 74, - "leftColumn": 10, + "leftColumn": 9, "children": [ { "widgetName": "Canvas2", "rightColumn": 592, "detachFromLayout": true, - "widgetId": "lz32lxsbsd", + "widgetId": "c2nnq6o54h", "containerStyle": "none", "topRow": 0, "bottomRow": 400, @@ -1901,143 +2062,67 @@ "isVisible": true, "canExtend": false, "type": "CANVAS_WIDGET", - "parentId": "znedt4bss1", + "parentId": "5wiefwlh3m", "minHeight": 400, "isLoading": false, "parentColumnSpace": 1, "leftColumn": 0, "children": [ { - "image": "{{usersTable.selectedRow.avatar}}", - "widgetName": "Image1", - "rightColumn": 6, - "widgetId": "2rv46ko5nr", - "topRow": 0, - "bottomRow": 3, - "parentRowSpace": 40, - "isVisible": "{{usersTable.selectedRow !== undefined}}", - "type": "IMAGE_WIDGET", - "dynamicBindings": { - "image": true, - "isVisible": true - }, - "parentId": "lz32lxsbsd", - "isLoading": false, - "parentColumnSpace": 25.25, - "imageShape": "RECTANGLE", - "leftColumn": 0, - "defaultImage": "https://res.cloudinary.com/drako999/image/upload/v1589196259/default.png", + "widgetName": "Button3", + "rightColumn": 16, + "onClick": "{{showModal('Modal1')}}", + "isDefaultClickDisabled": true, + "widgetId": "8c8ixb84rt", "dynamicProperties": { "isVisible": true - } - }, - { - "widgetName": "Text7", - "rightColumn": 13, - "textAlign": "LEFT", - "widgetId": "6jz7n81a0w", + }, + "buttonStyle": "PRIMARY_BUTTON", "topRow": 0, "bottomRow": 1, "parentRowSpace": 40, "isVisible": "{{usersTable.selectedRow !== undefined}}", - "type": "TEXT_WIDGET", + "type": "BUTTON_WIDGET", "dynamicBindings": { - "text": true, - "value": true, "isVisible": true }, - "parentId": "lz32lxsbsd", + "parentId": "c2nnq6o54h", "isLoading": false, - "parentColumnSpace": 25.25, - "leftColumn": 7, - "text": "{{usersTable.selectedRow.name}}", - "textStyle": "LABEL", - "dynamicProperties": { - "isVisible": true - } - }, - { - "widgetName": "Text8", - "rightColumn": 16, - "textAlign": "LEFT", - "widgetId": "pu5tfgbgs8", - "topRow": 1, - "bottomRow": 2, - "parentRowSpace": 40, - "isVisible": "{{usersTable.selectedRow !== undefined}}", - "type": "TEXT_WIDGET", - "dynamicBindings": { - "text": true, - "value": true, - "isVisible": true + "parentColumnSpace": 20.625, + "leftColumn": 13, + "dynamicTriggers": { + "onClick": true }, - "parentId": "lz32lxsbsd", - "isLoading": false, - "parentColumnSpace": 25.25, - "leftColumn": 7, - "text": "{{usersTable.selectedRow.email}}", - "textStyle": "LABEL", - "dynamicProperties": { - "isVisible": true - } + "text": "Edit", + "isDisabled": false }, { - "widgetName": "Text9", - "rightColumn": 16, - "textAlign": "LEFT", - "widgetId": "1dqi8yqken", - "topRow": 2, + "image": "{{usersTable.selectedRow.avatar}}", + "widgetName": "Image1", + "rightColumn": 7, + "widgetId": "vxs1336eti", + "topRow": 0, "bottomRow": 3, "parentRowSpace": 40, - "isVisible": "{{usersTable.selectedRow !== undefined}}", - "type": "TEXT_WIDGET", + "isVisible": true, + "type": "IMAGE_WIDGET", "dynamicBindings": { - "text": true, - "value": true, - "isVisible": true + "image": true }, - "parentId": "lz32lxsbsd", + "parentId": "c2nnq6o54h", "isLoading": false, - "parentColumnSpace": 25.25, - "leftColumn": 7, - "text": "{{usersTable.selectedRow.address}}", - "textStyle": "LABEL", - "dynamicProperties": { - "isVisible": true - } - }, - { - "widgetName": "Text11", - "rightColumn": 16, - "textAlign": "CENTER", - "widgetId": "rhjs3oqi4x", - "topRow": 6, - "bottomRow": 7, - "parentRowSpace": 40, - "isVisible": "{{usersTable.selectedRow !== undefined}}", - "type": "TEXT_WIDGET", - "dynamicBindings": { - "text": true, - "value": true, - "isVisible": true - }, - "parentId": "lz32lxsbsd", - "isLoading": false, - "parentColumnSpace": 25.25, + "parentColumnSpace": 20.625, + "imageShape": "RECTANGLE", "leftColumn": 0, - "text": "

Status: {{usersTable.selectedRow.status === \"APPROVED\" ? \"Approved āœ…\" : \nusersTable.selectedRow.status === \"REJECTED\" ? \"Rejected āŒ\" : \"Pending āŒ›\"}}

", - "textStyle": "HEADING", - "dynamicProperties": { - "isVisible": true - } + "defaultImage": "https://res.cloudinary.com/drako999/image/upload/v1589196259/default.png" }, { - "widgetName": "Text12", - "rightColumn": 11, + "widgetName": "Text3", + "rightColumn": 13, "textAlign": "LEFT", - "widgetId": "12b8ga1jyb", - "topRow": 3, - "bottomRow": 4, + "widgetId": "n1tn6qwmfu", + "topRow": 0, + "bottomRow": 1, "parentRowSpace": 40, "isVisible": true, "type": "TEXT_WIDGET", @@ -2045,107 +2130,90 @@ "text": true, "value": true }, - "parentId": "lz32lxsbsd", + "parentId": "c2nnq6o54h", "isLoading": false, - "parentColumnSpace": 25.25, + "parentColumnSpace": 20.625, "leftColumn": 7, - "text": "{{ (usersTable.selectedRow.gender === \"Male\" ? \"ā™‚ļø\" : \"ā™€ļø\") + usersTable.selectedRow.gender}}", + "text": "{{usersTable.selectedRow.name}}", "textStyle": "LABEL" }, { - "widgetName": "Button3", - "rightColumn": 16, - "isDefaultClickDisabled": true, - "widgetId": "fow2t5em1j", - "buttonStyle": "PRIMARY_BUTTON", - "topRow": 8, - "bottomRow": 9, + "widgetName": "Text4", + "rightColumn": 15, + "textAlign": "LEFT", + "widgetId": "75njm0wxgx", + "topRow": 1, + "bottomRow": 2, "parentRowSpace": 40, - "isVisible": "{{usersTable.selectedRow !== undefined}}", - "type": "BUTTON_WIDGET", + "isVisible": true, + "type": "TEXT_WIDGET", "dynamicBindings": { - "isVisible": true + "text": true, + "value": true }, - "parentId": "lz32lxsbsd", + "parentId": "c2nnq6o54h", "isLoading": false, - "parentColumnSpace": 25.25, - "leftColumn": 11, - "text": "Approve", - "isDisabled": false, - "dynamicTriggers": { - "onClick": true - }, - "onClick": "{{approve_user.run(() => getUsers.run(), () => {})}}", - "dynamicProperties": { - "isVisible": true - } + "parentColumnSpace": 20.625, + "leftColumn": 7, + "text": "{{usersTable.selectedRow.email}}", + "textStyle": "LABEL" }, { - "widgetName": "Button4", - "rightColumn": 16, - "onClick": "{{showModal('Modal1')}}", - "isDefaultClickDisabled": true, - "widgetId": "95hllivp93", - "buttonStyle": "PRIMARY_BUTTON", - "topRow": 0, - "bottomRow": 1, + "widgetName": "Text5", + "rightColumn": 15, + "textAlign": "LEFT", + "widgetId": "2wymlwykex", + "topRow": 2, + "bottomRow": 3, "parentRowSpace": 40, - "isVisible": "{{usersTable.selectedRow !== undefined}}", - "type": "BUTTON_WIDGET", + "isVisible": true, + "type": "TEXT_WIDGET", "dynamicBindings": { - "isVisible": true + "text": true, + "value": true }, - "parentId": "lz32lxsbsd", + "parentId": "c2nnq6o54h", "isLoading": false, "parentColumnSpace": 25.25, - "leftColumn": 13, - "dynamicTriggers": { - "onClick": true - }, - "text": "Edit", - "isDisabled": false, - "dynamicProperties": { - "isVisible": true - } + "leftColumn": 7, + "text": "{{usersTable.selectedRow.address}}", + "textStyle": "LABEL" }, { - "widgetName": "Button5", - "rightColumn": 10, - "isDefaultClickDisabled": true, - "widgetId": "4z16xr3mlu", + "widgetName": "Text6", + "rightColumn": 11, + "textAlign": "LEFT", + "widgetId": "4x7s4ffqyc", "dynamicProperties": { "isVisible": true }, - "buttonStyle": "SECONDARY_BUTTON", - "topRow": 8, - "bottomRow": 9, + "topRow": 3, + "bottomRow": 4, "parentRowSpace": 40, "isVisible": "{{usersTable.selectedRow !== undefined}}", - "type": "BUTTON_WIDGET", + "type": "TEXT_WIDGET", "dynamicBindings": { - "isVisible": true + "text": true, + "isVisible": true, + "value": true }, - "parentId": "lz32lxsbsd", + "parentId": "c2nnq6o54h", "isLoading": false, "parentColumnSpace": 25.25, - "leftColumn": 5, - "text": "āŒReject", - "isDisabled": false, - "dynamicTriggers": { - "onClick": true - }, - "onClick": "{{reject_user.run(() => getUsers.run(), () => {})}}" + "leftColumn": 7, + "text": "

{{ (usersTable.selectedRow.gender === \"Male\" ? \"ā™‚ļø\" : \"ā™€ļø\") + usersTable.selectedRow.gender}}

", + "textStyle": "LABEL" }, { - "widgetName": "Text10", - "rightColumn": 16, + "widgetName": "Text8", + "rightColumn": 7, "textAlign": "CENTER", - "widgetId": "rz1jcja6o2", + "widgetId": "3mqfe3k3qf", "dynamicProperties": { "isVisible": true }, - "topRow": 4, - "bottomRow": 5, + "topRow": 3, + "bottomRow": 4, "parentRowSpace": 40, "isVisible": "{{usersTable.selectedRow === undefined}}", "type": "TEXT_WIDGET", @@ -2153,29 +2221,342 @@ "isVisible": true, "value": true }, - "parentId": "0", + "parentId": "c2nnq6o54h", "isLoading": false, - "parentColumnSpace": 74, + "parentColumnSpace": 25.25, "leftColumn": 0, "text": "

šŸ‘ˆšŸæ Select a user

", + "textStyle": "LABEL" + }, + { + "widgetName": "Text21", + "rightColumn": 15, + "textAlign": "LEFT", + "widgetId": "uvw0ma9kfr", + "topRow": 4, + "bottomRow": 5, + "parentRowSpace": 40, + "isVisible": true, + "type": "TEXT_WIDGET", + "dynamicBindings": { + "text": true, + "value": true + }, + "parentId": "c2nnq6o54h", + "isLoading": false, + "parentColumnSpace": 29.875, + "leftColumn": 7, + "text": "{{usersTable.selectedRow.phoneNo || \"\"}}", + "textStyle": "LABEL" + } + ] + } + ] + }, + { + "hiddenColumns": [ + "userId", + "orderDate" + ], + "widgetName": "ordersTable", + "rightColumn": 8, + "columnOrder": [ + "id", + "deliveryAddress", + "orderAmount", + "status" + ], + "widgetId": "xr3qu1jpj8", + "topRow": 19, + "bottomRow": 32, + "parentRowSpace": 40, + "tableData": "{{getOrders.data}}", + "isVisible": true, + "label": "Data", + "searchKey": "", + "type": "TABLE_WIDGET", + "dynamicBindings": { + "tableData": true, + "selectedRow": true, + "filteredTableData": true + }, + "parentId": "0", + "isLoading": false, + "parentColumnSpace": 74, + "leftColumn": 0, + "dynamicTriggers": { + "onRowSelected": true + }, + "onRowSelected": "{{getOrderProducts.run()}}", + "columnSizeMap": { + "userId": 111 + } + }, + { + "widgetName": "Text13", + "rightColumn": 4, + "textAlign": "LEFT", + "widgetId": "euwmlckp34", + "topRow": 18, + "bottomRow": 19, + "parentRowSpace": 40, + "isVisible": true, + "type": "TEXT_WIDGET", + "dynamicBindings": { + "value": true, + "text": true + }, + "parentId": "0", + "isLoading": false, + "parentColumnSpace": 74, + "leftColumn": 0, + "text": "{{usersTable.selectedRow ? usersTable.selectedRow.name + \"'s Orders\" : \"ā˜šŸ½ Select a user\"}}", + "textStyle": "HEADING" + }, + { + "backgroundColor": "#FFFFFF", + "widgetName": "Container2", + "rightColumn": 16, + "widgetId": "xlb8hua7ie", + "containerStyle": "card", + "topRow": 19, + "bottomRow": 32, + "parentRowSpace": 40, + "isVisible": true, + "type": "CONTAINER_WIDGET", + "parentId": "0", + "blueprint": { + "view": [ + { + "position": { + "top": 0, + "left": 0 + }, + "type": "CANVAS_WIDGET", + "props": { + "detachFromLayout": true, + "children": [ + "v8531ch9d8", + "0cz98i5vmt" + ], + "containerStyle": "none", + "canExtend": false + } + } + ] + }, + "isLoading": false, + "parentColumnSpace": 74, + "leftColumn": 8, + "children": [ + { + "widgetName": "Canvas3", + "rightColumn": 592, + "detachFromLayout": true, + "widgetId": "gutl68s87o", + "containerStyle": "none", + "topRow": 0, + "bottomRow": 400, + "parentRowSpace": 1, + "isVisible": true, + "canExtend": false, + "type": "CANVAS_WIDGET", + "parentId": "xlb8hua7ie", + "minHeight": 400, + "isLoading": false, + "parentColumnSpace": 1, + "leftColumn": 0, + "children": [ + { + "widgetName": "Text15", + "rightColumn": 7, + "textAlign": "LEFT", + "widgetId": "0cz98i5vmt", + "topRow": 0, + "bottomRow": 1, + "parentRowSpace": 40, + "isVisible": true, + "type": "TEXT_WIDGET", + "dynamicBindings": { + "text": true, + "value": true + }, + "parentId": "gutl68s87o", + "isLoading": false, + "parentColumnSpace": 29.875, + "leftColumn": 0, + "text": "{{\"Order# \" + ordersTable.selectedRow.id}}", "textStyle": "HEADING" }, { - "isVisible": true, - "text": "{{ (usersTable.selectedRow.role === \"Admin\" ? \"šŸ‘®\" : usersTable.selectedRow.role === \"Editor\" ? \"šŸ–‹ļø\" : \"šŸ”\") + usersTable.selectedRow.role}}", - "textStyle": "LABEL", + "widgetName": "Text16", + "rightColumn": 11, "textAlign": "LEFT", - "widgetName": "Text14", + "widgetId": "ec7hwwpigw", + "topRow": 1, + "bottomRow": 2, + "parentRowSpace": 40, + "isVisible": true, + "type": "TEXT_WIDGET", + "dynamicBindings": { + "text": true, + "value": true + }, + "parentId": "gutl68s87o", + "isLoading": false, + "parentColumnSpace": 29.875, + "leftColumn": 0, + "text": "{{ordersTable.selectedRow.deliveryAddress}}", + "textStyle": "LABEL" + }, + { + "widgetName": "Text17", + "rightColumn": 8, + "textAlign": "LEFT", + "widgetId": "jgv0uu3x5g", + "topRow": 2, + "bottomRow": 3, + "parentRowSpace": 40, + "isVisible": true, + "type": "TEXT_WIDGET", + "dynamicBindings": { + "text": true, + "value": true + }, + "parentId": "gutl68s87o", + "isLoading": false, + "parentColumnSpace": 29.875, + "leftColumn": 4, + "text": "{{ordersTable.selectedRow.status}}", + "textStyle": "LABEL" + }, + { + "widgetName": "Button6", + "rightColumn": 16, + "onClick": "{{showModal('Modal2')}}", + "isDefaultClickDisabled": true, + "widgetId": "am2dpsi2q3", + "dynamicProperties": { + "isDisabled": true + }, + "buttonStyle": "DANGER_BUTTON", + "topRow": 0, + "bottomRow": 1, + "parentRowSpace": 40, + "isVisible": true, + "type": "BUTTON_WIDGET", + "dynamicBindings": { + "isDisabled": true + }, + "parentId": "gutl68s87o", + "isLoading": false, + "parentColumnSpace": 29.875, + "leftColumn": 12, + "dynamicTriggers": { + "onClick": true + }, + "text": "Refund", + "isDisabled": "{{ordersTable.selectedRow === undefined || ordersTable.selectedRow.status === \"REFUNDED\" || appsmith.user.email !== \"nikhil@appsmith.com\"}}" + }, + { + "hiddenColumns": [ + "mrp", + "imageUrl", + "description", + "isListed", + "availabilityDate", + "channel" + ], + "widgetName": "Table1", + "rightColumn": 16, + "columnOrder": [ + "productId", + "productName", + "listingPrice", + "category", + "mrp", + "imageUrl", + "description", + "isListed", + "availabilityDate", + "channel" + ], + "widgetId": "db1kphrwnt", + "topRow": 5, + "bottomRow": 12, + "parentRowSpace": 40, + "tableData": "{{getOrderProducts.data}}", + "isVisible": true, + "label": "Data", + "searchKey": "", + "type": "TABLE_WIDGET", + "dynamicBindings": { + "tableData": true, + "selectedRow": true, + "filteredTableData": true + }, + "parentId": "gutl68s87o", + "isLoading": false, + "parentColumnSpace": 29.875, + "leftColumn": 0 + }, + { + "widgetName": "Text18", + "rightColumn": 4, + "textAlign": "LEFT", + "widgetId": "0dxro3kpwp", + "topRow": 4, + "bottomRow": 5, + "parentRowSpace": 40, + "isVisible": true, + "type": "TEXT_WIDGET", + "dynamicBindings": { + "value": true + }, + "parentId": "gutl68s87o", + "isLoading": false, + "parentColumnSpace": 29.875, + "leftColumn": 0, + "text": "Products", + "textStyle": "HEADING" + }, + { + "widgetName": "Text19", + "rightColumn": 4, + "textAlign": "LEFT", + "widgetId": "ek4t9o9djx", + "topRow": 2, + "bottomRow": 3, + "parentRowSpace": 40, + "isVisible": true, + "type": "TEXT_WIDGET", + "dynamicBindings": { + "text": true, + "value": true + }, + "parentId": "gutl68s87o", + "isLoading": false, + "parentColumnSpace": 34.5, + "leftColumn": 0, + "text": "{{\"₹\" + ordersTable.selectedRow.orderAmount}}", + "textStyle": "LABEL" + }, + { + "isVisible": true, + "text": "{{appsmith.user.email !== \"nikhil@appsmith.com\" ? \"Only Admins can initiate refunds\" : \"\"}}", + "textStyle": "HEADING", + "textAlign": "CENTER", + "widgetName": "Text24", "type": "TEXT_WIDGET", "isLoading": false, - "parentColumnSpace": 25.25, + "parentColumnSpace": 34.5, "parentRowSpace": 40, - "leftColumn": 12, - "rightColumn": 16, + "leftColumn": 2, + "rightColumn": 15, "topRow": 3, "bottomRow": 4, - "parentId": "lz32lxsbsd", - "widgetId": "op0ououevb", + "parentId": "gutl68s87o", + "widgetId": "1macn19a8h", "dynamicBindings": { "text": true, "value": true @@ -2186,143 +2567,1753 @@ ] }, { - "isVisible": true, - "shouldScrollContents": false, - "widgetName": "Tabs1", - "tabs": [ + "isVisible": false, + "size": "MODAL_SMALL", + "canEscapeKeyClose": true, + "detachFromLayout": true, + "canOutsideClickClose": true, + "shouldScrollContents": true, + "widgetName": "Modal2", + "children": [ { - "label": "Tab 1", - "id": "tab1" - }, - { - "label": "Tab 2", - "id": "tab2" + "isVisible": true, + "widgetName": "Canvas4", + "detachFromLayout": true, + "canExtend": true, + "isDisabled": false, + "shouldScrollContents": false, + "children": [ + { + "isVisible": true, + "widgetName": "Icon2", + "iconName": "cross", + "iconSize": 24, + "color": "#040627", + "type": "ICON_WIDGET", + "isLoading": false, + "leftColumn": 14, + "rightColumn": 16, + "topRow": 0, + "bottomRow": 1, + "parentId": "bek8vtf45d", + "widgetId": "h2bzyryz3k", + "onClick": "{{closeModal('Modal2')}}" + }, + { + "isVisible": true, + "text": "Refund Order #{{ordersTable.selectedRow.id}}", + "textStyle": "HEADING", + "textAlign": "LEFT", + "widgetName": "Text22", + "type": "TEXT_WIDGET", + "isLoading": false, + "leftColumn": 0, + "rightColumn": 10, + "topRow": 0, + "bottomRow": 1, + "parentId": "bek8vtf45d", + "widgetId": "3c2d1zfzu7", + "dynamicBindings": { + "value": true, + "text": true + } + }, + { + "isVisible": true, + "text": "Cancel", + "buttonStyle": "SECONDARY_BUTTON", + "widgetName": "Button7", + "isDisabled": false, + "isDefaultClickDisabled": true, + "type": "BUTTON_WIDGET", + "isLoading": false, + "leftColumn": 10, + "rightColumn": 13, + "topRow": 4, + "bottomRow": 5, + "parentId": "bek8vtf45d", + "widgetId": "w8hwwktvmg", + "dynamicTriggers": { + "onClick": true + }, + "onClick": "{{closeModal('Modal2')}}" + }, + { + "isVisible": true, + "text": "Confirm", + "buttonStyle": "PRIMARY_BUTTON", + "widgetName": "Button8", + "isDisabled": false, + "isDefaultClickDisabled": true, + "type": "BUTTON_WIDGET", + "isLoading": false, + "leftColumn": 13, + "rightColumn": 16, + "topRow": 4, + "bottomRow": 5, + "parentId": "bek8vtf45d", + "widgetId": "54fh5v9z6f", + "onClick": "{{refundAPI.run(() => markOrderRefund.run(() => getOrders.run(() => closeModal('Modal2'))), () => {})}}", + "dynamicProperties": { + "onClick": true + }, + "dynamicTriggers": { + "onClick": true + } + }, + { + "isVisible": true, + "text": "Are you sure you want to refund this order?", + "textStyle": "LABEL", + "textAlign": "LEFT", + "widgetName": "Text23", + "type": "TEXT_WIDGET", + "isLoading": false, + "parentColumnSpace": 26, + "parentRowSpace": 40, + "leftColumn": 1, + "rightColumn": 13, + "topRow": 2, + "bottomRow": 3, + "parentId": "bek8vtf45d", + "widgetId": "z2k233aijz", + "dynamicBindings": { + "value": true + } + } + ], + "blueprint": { + "view": [ + { + "type": "ICON_WIDGET", + "position": { + "left": 14, + "top": 0 + }, + "size": { + "rows": 1, + "cols": 2 + }, + "props": { + "iconName": "cross", + "iconSize": 24, + "color": "#040627" + } + }, + { + "type": "TEXT_WIDGET", + "position": { + "left": 0, + "top": 0 + }, + "size": { + "rows": 1, + "cols": 10 + }, + "props": { + "text": "Modal Title", + "textStyle": "HEADING" + } + }, + { + "type": "BUTTON_WIDGET", + "position": { + "left": 10, + "top": 4 + }, + "size": { + "rows": 1, + "cols": 3 + }, + "props": { + "text": "Cancel", + "buttonStyle": "SECONDARY_BUTTON" + } + }, + { + "type": "BUTTON_WIDGET", + "position": { + "left": 13, + "top": 4 + }, + "size": { + "rows": 1, + "cols": 3 + }, + "props": { + "text": "Confirm", + "buttonStyle": "PRIMARY_BUTTON" + } + } + ], + "operations": [ + { + "type": "MODIFY_PROPS" + } + ] + }, + "minHeight": 0, + "type": "CANVAS_WIDGET", + "isLoading": false, + "parentColumnSpace": 1, + "parentRowSpace": 1, + "leftColumn": 0, + "rightColumn": 0, + "topRow": 0, + "bottomRow": 280, + "parentId": "apytb4wr2y", + "widgetId": "bek8vtf45d" } ], - "selectedTab": "Tab 1", "blueprint": { "view": [ { "type": "CANVAS_WIDGET", "position": { - "top": 0, - "left": 0 - }, - "size": { - "rows": 6, - "cols": 16 + "left": 0, + "top": 0 }, "props": { - "containerStyle": "none", - "canExtend": false, "detachFromLayout": true, - "children": [], - "tabId": "tab1" - } - }, - { - "type": "CANVAS_WIDGET", - "position": { - "top": 0, - "left": 0 - }, - "size": { - "rows": 6, - "cols": 16 - }, - "props": { - "containerStyle": "none", - "canExtend": false, - "detachFromLayout": true, - "children": [ - "lkn2q6gati" - ], - "tabId": "tab2" + "canExtend": true, + "isVisible": true, + "isDisabled": false, + "shouldScrollContents": false, + "children": [ ], + "blueprint": { + "view": [ + { + "type": "ICON_WIDGET", + "position": { + "left": 14, + "top": 0 + }, + "size": { + "rows": 1, + "cols": 2 + }, + "props": { + "iconName": "cross", + "iconSize": 24, + "color": "#040627" + } + }, + { + "type": "TEXT_WIDGET", + "position": { + "left": 0, + "top": 0 + }, + "size": { + "rows": 1, + "cols": 10 + }, + "props": { + "text": "Modal Title", + "textStyle": "HEADING" + } + }, + { + "type": "BUTTON_WIDGET", + "position": { + "left": 10, + "top": 4 + }, + "size": { + "rows": 1, + "cols": 3 + }, + "props": { + "text": "Cancel", + "buttonStyle": "SECONDARY_BUTTON" + } + }, + { + "type": "BUTTON_WIDGET", + "position": { + "left": 13, + "top": 4 + }, + "size": { + "rows": 1, + "cols": 3 + }, + "props": { + "text": "Confirm", + "buttonStyle": "PRIMARY_BUTTON" + } + } + ], + "operations": [ + { + "type": "MODIFY_PROPS" + } + ] + } } } ] }, - "type": "TABS_WIDGET", + "type": "MODAL_WIDGET", + "isLoading": false, + "parentColumnSpace": 1, + "parentRowSpace": 1, + "leftColumn": 0, + "rightColumn": 0, + "topRow": 0, + "bottomRow": 0, + "parentId": "0", + "widgetId": "apytb4wr2y" + }, + { + "isVisible": true, + "widgetName": "Chart1", + "chartType": "PIE_CHART", + "chartName": "Orders", + "allowHorizontalScroll": false, + "chartData": "[{\"seriesName\":\"Order Status\",\"data\":\"[\\n {\\n \\\"x\\\": \\\"ORDER_PLACED\\\",\\n \\\"y\\\": {{getOrders.data.filter((order) => { return order.status === \\\"ORDER_PLACED\\\" }).length}}\\n },\\n {\\n \\\"x\\\": \\\"OUT_FOR_DELIVERY\\\",\\n \\\"y\\\": {{getOrders.data.filter((order) => { return order.status === \\\"OUT_FOR_DELIVERY\\\" }).length}}\\n },\\n {\\n \\\"x\\\": \\\"PAYMENT_PENDING\\\",\\n \\\"y\\\": {{getOrders.data.filter((order) => { return order.status === \\\"PAYMENT_PENDING\\\" }).length}}\\n },\\n {\\n \\\"x\\\": \\\"REFUNDED\\\",\\n \\\"y\\\": {{getOrders.data.filter((order) => { return order.status === \\\"REFUNDED\\\" }).length}}\\n }\\n \\n]\"}]", + "xAxisName": "Last Week", + "yAxisName": "Total Order Revenue $", + "type": "CHART_WIDGET", "isLoading": false, "parentColumnSpace": 74, "parentRowSpace": 40, - "leftColumn": 0, - "rightColumn": 9, - "topRow": 20, - "bottomRow": 37, + "leftColumn": 9, + "rightColumn": 16, + "topRow": 9, + "bottomRow": 17, "parentId": "0", - "widgetId": "2kmt5gdvho", + "widgetId": "jr461ymixc", + "dynamicBindings": { + "chartData": true + } + } + ] + }, + "publishedDsl": { + "widgetName": "MainContainer", + "backgroundColor": "none", + "rightColumn": 1224, + "snapColumns": 16, + "detachFromLayout": true, + "widgetId": "0", + "topRow": 0, + "bottomRow": 1360, + "containerStyle": "none", + "snapRows": 33, + "parentRowSpace": 1, + "type": "CANVAS_WIDGET", + "canExtend": true, + "dynamicBindings": { + + }, + "version": 5, + "minHeight": 1292, + "parentColumnSpace": 1, + "leftColumn": 0, + "children": [ + { + "widgetName": "Text1", + "rightColumn": 4, + "textAlign": "LEFT", + "widgetId": "5302vrcr7x", + "topRow": 0, + "bottomRow": 1, + "parentRowSpace": 40, + "isVisible": true, + "type": "TEXT_WIDGET", + "dynamicBindings": { + "value": true + }, + "parentId": "0", + "isLoading": false, + "parentColumnSpace": 74, + "leftColumn": 0, + "text": "Users", + "textStyle": "HEADING" + }, + { + "hiddenColumns": [ + "createdAt", + "updatedAt", + "avatar", + "dob", + "gender", + "role", + "status", + "address" + ], + "widgetName": "usersTable", + "rightColumn": 9, + "widgetId": "z0l09s5jaz", + "topRow": 1, + "bottomRow": 17, + "parentRowSpace": 40, + "onPageChange": "{{getUsers.run()}}", + "tableData": "{{getUsers.data}}", + "isVisible": true, + "label": "Data", + "searchKey": "", + "type": "TABLE_WIDGET", + "dynamicBindings": { + "tableData": true, + "selectedRow": true, + "filteredTableData": true, + "defaultSearchText": true + }, + "parentId": "0", + "serverSidePaginationEnabled": true, + "isLoading": false, + "onSearchTextChanged": "{{getUsers.run()}}", + "parentColumnSpace": 74, + "leftColumn": 0, + "dynamicTriggers": { + "onSearchTextChanged": true, + "onRowSelected": true, + "onPageChange": true + }, + "onRowSelected": "{{getOrders.run()}}", + "columnActions": [ ], + "columnSizeMap": { + "address": 204, + "name": 268, + "id": 74, + "email": 311 + }, + "defaultSearchText": "{{appsmith.URL.queryParams.email}}" + }, + { + "widgetName": "Modal1", + "rightColumn": 0, + "detachFromLayout": true, + "widgetId": "qcv5mxmdse", + "topRow": 0, + "bottomRow": 0, + "parentRowSpace": 1, + "isVisible": false, + "canOutsideClickClose": true, + "type": "MODAL_WIDGET", + "canEscapeKeyClose": true, + "dynamicBindings": { + + }, + "parentId": "0", + "shouldScrollContents": true, + "blueprint": { + "view": [ + { + "position": { + "top": 0, + "left": 0 + }, + "type": "CANVAS_WIDGET", + "props": { + "shouldScrollContents": false, + "blueprint": { + "view": [ + { + "size": { + "rows": 1, + "cols": 2 + }, + "position": { + "top": 0, + "left": 14 + }, + "type": "ICON_WIDGET", + "props": { + "color": "#040627", + "iconName": "cross", + "iconSize": 24 + } + }, + { + "size": { + "rows": 1, + "cols": 10 + }, + "position": { + "top": 0, + "left": 0 + }, + "type": "TEXT_WIDGET", + "props": { + "text": "Modal Title", + "textStyle": "HEADING" + } + }, + { + "size": { + "rows": 1, + "cols": 3 + }, + "position": { + "top": 4, + "left": 10 + }, + "type": "BUTTON_WIDGET", + "props": { + "buttonStyle": "SECONDARY_BUTTON", + "text": "Cancel" + } + }, + { + "size": { + "rows": 1, + "cols": 3 + }, + "position": { + "top": 4, + "left": 13 + }, + "type": "BUTTON_WIDGET", + "props": { + "buttonStyle": "PRIMARY_BUTTON", + "text": "Confirm" + } + } + ], + "operations": [ + { + "type": "MODIFY_PROPS" + } + ] + }, + "detachFromLayout": true, + "children": [ ], + "isVisible": true, + "isDisabled": false, + "canExtend": true + } + } + ] + }, + "isLoading": false, + "parentColumnSpace": 1, + "size": "MODAL_LARGE", + "leftColumn": 0, + "children": [ + { + "widgetName": "Canvas1", + "rightColumn": 0, + "detachFromLayout": true, + "widgetId": "9pgyrkail5", + "topRow": 0, + "bottomRow": 640, + "parentRowSpace": 1, + "isVisible": true, + "canExtend": true, + "type": "CANVAS_WIDGET", + "parentId": "qcv5mxmdse", + "shouldScrollContents": false, + "blueprint": { + "view": [ + { + "size": { + "rows": 1, + "cols": 2 + }, + "position": { + "top": 0, + "left": 14 + }, + "type": "ICON_WIDGET", + "props": { + "color": "#040627", + "iconName": "cross", + "iconSize": 24 + } + }, + { + "size": { + "rows": 1, + "cols": 10 + }, + "position": { + "top": 0, + "left": 0 + }, + "type": "TEXT_WIDGET", + "props": { + "text": "Modal Title", + "textStyle": "HEADING" + } + }, + { + "size": { + "rows": 1, + "cols": 3 + }, + "position": { + "top": 4, + "left": 10 + }, + "type": "BUTTON_WIDGET", + "props": { + "buttonStyle": "SECONDARY_BUTTON", + "text": "Cancel" + } + }, + { + "size": { + "rows": 1, + "cols": 3 + }, + "position": { + "top": 4, + "left": 13 + }, + "type": "BUTTON_WIDGET", + "props": { + "buttonStyle": "PRIMARY_BUTTON", + "text": "Confirm" + } + } + ], + "operations": [ + { + "type": "MODIFY_PROPS" + } + ] + }, + "minHeight": 0, + "isLoading": false, + "parentColumnSpace": 1, + "leftColumn": 0, + "children": [ + { + "widgetName": "Icon1", + "rightColumn": 16, + "onClick": "{{closeModal('Modal1')}}", + "color": "#040627", + "iconName": "cross", + "widgetId": "3g9bl2sr58", + "topRow": 0, + "bottomRow": 1, + "isVisible": true, + "type": "ICON_WIDGET", + "parentId": "9pgyrkail5", + "isLoading": false, + "leftColumn": 14, + "iconSize": 24 + }, + { + "widgetName": "Text2", + "rightColumn": 14, + "textAlign": "LEFT", + "widgetId": "lddwvwekdx", + "topRow": 0, + "bottomRow": 1, + "isVisible": true, + "type": "TEXT_WIDGET", + "dynamicBindings": { + "text": true, + "value": true + }, + "parentId": "9pgyrkail5", + "isLoading": false, + "leftColumn": 0, + "text": "

šŸ–‹ļø Edit {{usersTable.selectedRow.name}}'s Profile

", + "textStyle": "LABEL" + }, + { + "widgetName": "Button1", + "rightColumn": 12, + "isDefaultClickDisabled": true, + "widgetId": "0asi0ps632", + "buttonStyle": "SECONDARY_BUTTON", + "topRow": 13, + "bottomRow": 14, + "isVisible": true, + "type": "BUTTON_WIDGET", + "parentId": "9pgyrkail5", + "isLoading": false, + "leftColumn": 9, + "text": "Cancel", + "isDisabled": false + }, + { + "widgetName": "Button2", + "rightColumn": 16, + "onClick": "{{updateUser.run(() => getUsers.run(() => closeModal('Modal1')), () => showAlert('error'))}}", + "isDefaultClickDisabled": true, + "widgetId": "9aoww0u181", + "dynamicProperties": { + "onClick": true + }, + "buttonStyle": "PRIMARY_BUTTON", + "topRow": 13, + "bottomRow": 14, + "isVisible": true, + "type": "BUTTON_WIDGET", + "dynamicBindings": { + + }, + "parentId": "9pgyrkail5", + "isLoading": false, + "leftColumn": 12, + "dynamicTriggers": { + "onClick": true + }, + "text": "Save", + "isDisabled": false + }, + { + "widgetName": "Text10", + "rightColumn": 4, + "textAlign": "RIGHT", + "widgetId": "zxqqitzf07", + "topRow": 2, + "bottomRow": 3, + "parentRowSpace": 40, + "isVisible": true, + "type": "TEXT_WIDGET", + "dynamicBindings": { + "value": true + }, + "parentId": "9pgyrkail5", + "isLoading": false, + "parentColumnSpace": 30.75, + "leftColumn": 0, + "text": "Name", + "textStyle": "LABEL" + }, + { + "widgetName": "Text11", + "rightColumn": 4, + "textAlign": "RIGHT", + "widgetId": "52whn6clnv", + "topRow": 3, + "bottomRow": 4, + "parentRowSpace": 40, + "isVisible": true, + "type": "TEXT_WIDGET", + "dynamicBindings": { + "value": true + }, + "parentId": "9pgyrkail5", + "isLoading": false, + "parentColumnSpace": 30.75, + "leftColumn": 0, + "text": "Email", + "textStyle": "LABEL" + }, + { + "widgetName": "Text12", + "rightColumn": 4, + "textAlign": "RIGHT", + "widgetId": "qhmfxrxrp8", + "topRow": 5, + "bottomRow": 6, + "parentRowSpace": 40, + "isVisible": true, + "type": "TEXT_WIDGET", + "dynamicBindings": { + "value": true + }, + "parentId": "9pgyrkail5", + "isLoading": false, + "parentColumnSpace": 30.75, + "leftColumn": 0, + "text": "Address", + "textStyle": "LABEL" + }, + { + "widgetName": "addressInput", + "rightColumn": 13, + "widgetId": "5w60gql1bf", + "topRow": 5, + "bottomRow": 8, + "parentRowSpace": 40, + "isVisible": true, + "label": "", + "type": "INPUT_WIDGET", + "dynamicBindings": { + "isValid": true, + "defaultText": true, + "value": true + }, + "parentId": "9pgyrkail5", + "isLoading": false, + "parentColumnSpace": 30.75, + "leftColumn": 4, + "inputType": "TEXT", + "defaultText": "{{usersTable.selectedRow.address}}" + }, + { + "widgetName": "emailInput", + "rightColumn": 13, + "widgetId": "l97o8yvlrc", + "topRow": 3, + "bottomRow": 4, + "parentRowSpace": 40, + "isVisible": true, + "label": "", + "type": "INPUT_WIDGET", + "dynamicBindings": { + "isValid": true, + "defaultText": true, + "value": true + }, + "parentId": "9pgyrkail5", + "isLoading": false, + "parentColumnSpace": 30.75, + "leftColumn": 4, + "inputType": "TEXT", + "defaultText": "{{usersTable.selectedRow.email}}" + }, + { + "widgetName": "nameInput", + "rightColumn": 13, + "widgetId": "dorbm7hw83", + "topRow": 2, + "bottomRow": 3, + "parentRowSpace": 40, + "isVisible": true, + "label": "", + "type": "INPUT_WIDGET", + "dynamicBindings": { + "isValid": true, + "defaultText": true, + "value": true + }, + "parentId": "9pgyrkail5", + "isLoading": false, + "parentColumnSpace": 30.75, + "leftColumn": 4, + "inputType": "TEXT", + "defaultText": "{{usersTable.selectedRow.name}}" + }, + { + "widgetName": "Text20", + "rightColumn": 4, + "textAlign": "RIGHT", + "widgetId": "gds83r70jn", + "topRow": 4, + "bottomRow": 5, + "parentRowSpace": 40, + "isVisible": true, + "type": "TEXT_WIDGET", + "dynamicBindings": { + "value": true + }, + "parentId": "9pgyrkail5", + "isLoading": false, + "parentColumnSpace": 30.75, + "leftColumn": 0, + "text": "Phone No", + "textStyle": "LABEL" + }, + { + "widgetName": "phoneInput", + "rightColumn": 13, + "widgetId": "lcmqk3xayr", + "topRow": 4, + "bottomRow": 5, + "parentRowSpace": 40, + "isVisible": true, + "label": "", + "type": "INPUT_WIDGET", + "dynamicBindings": { + "isValid": true, + "defaultText": true, + "value": true + }, + "parentId": "9pgyrkail5", + "isLoading": false, + "regex": "^[0-9]{1,10}$", + "parentColumnSpace": 30.75, + "leftColumn": 4, + "inputType": "TEXT", + "defaultText": "{{usersTable.selectedRow.phoneNo || \"\"}}" + } + ], + "isDisabled": false + } + ] + }, + { + "backgroundColor": "#FFFFFF", + "widgetName": "Container1", + "rightColumn": 16, + "widgetId": "5wiefwlh3m", + "containerStyle": "card", + "topRow": 1, + "bottomRow": 9, + "parentRowSpace": 40, + "isVisible": true, + "type": "CONTAINER_WIDGET", + "parentId": "0", + "blueprint": { + "view": [ + { + "position": { + "top": 0, + "left": 0 + }, + "type": "CANVAS_WIDGET", + "props": { + "detachFromLayout": true, + "children": [ + "8c8ixb84rt", + "vxs1336eti", + "n1tn6qwmfu", + "75njm0wxgx", + "2wymlwykex", + "4x7s4ffqyc", + "m8jxuiwony", + "3mqfe3k3qf", + "lhds2qaxeg", + "p4p3or0jcd", + "uh5tweohvx" + ], + "containerStyle": "none", + "canExtend": false + } + } + ] + }, + "isLoading": false, + "parentColumnSpace": 74, + "leftColumn": 9, + "children": [ + { + "widgetName": "Canvas2", + "rightColumn": 592, + "detachFromLayout": true, + "widgetId": "c2nnq6o54h", + "containerStyle": "none", + "topRow": 0, + "bottomRow": 400, + "parentRowSpace": 1, + "isVisible": true, + "canExtend": false, + "type": "CANVAS_WIDGET", + "parentId": "5wiefwlh3m", + "minHeight": 400, + "isLoading": false, + "parentColumnSpace": 1, + "leftColumn": 0, + "children": [ + { + "widgetName": "Button3", + "rightColumn": 16, + "onClick": "{{showModal('Modal1')}}", + "isDefaultClickDisabled": true, + "widgetId": "8c8ixb84rt", + "dynamicProperties": { + "isVisible": true + }, + "buttonStyle": "PRIMARY_BUTTON", + "topRow": 0, + "bottomRow": 1, + "parentRowSpace": 40, + "isVisible": "{{usersTable.selectedRow !== undefined}}", + "type": "BUTTON_WIDGET", + "dynamicBindings": { + "isVisible": true + }, + "parentId": "c2nnq6o54h", + "isLoading": false, + "parentColumnSpace": 20.625, + "leftColumn": 13, + "dynamicTriggers": { + "onClick": true + }, + "text": "Edit", + "isDisabled": false + }, + { + "image": "{{usersTable.selectedRow.avatar}}", + "widgetName": "Image1", + "rightColumn": 7, + "widgetId": "vxs1336eti", + "topRow": 0, + "bottomRow": 3, + "parentRowSpace": 40, + "isVisible": true, + "type": "IMAGE_WIDGET", + "dynamicBindings": { + "image": true + }, + "parentId": "c2nnq6o54h", + "isLoading": false, + "parentColumnSpace": 20.625, + "imageShape": "RECTANGLE", + "leftColumn": 0, + "defaultImage": "https://res.cloudinary.com/drako999/image/upload/v1589196259/default.png" + }, + { + "widgetName": "Text3", + "rightColumn": 13, + "textAlign": "LEFT", + "widgetId": "n1tn6qwmfu", + "topRow": 0, + "bottomRow": 1, + "parentRowSpace": 40, + "isVisible": true, + "type": "TEXT_WIDGET", + "dynamicBindings": { + "text": true, + "value": true + }, + "parentId": "c2nnq6o54h", + "isLoading": false, + "parentColumnSpace": 20.625, + "leftColumn": 7, + "text": "{{usersTable.selectedRow.name}}", + "textStyle": "LABEL" + }, + { + "widgetName": "Text4", + "rightColumn": 15, + "textAlign": "LEFT", + "widgetId": "75njm0wxgx", + "topRow": 1, + "bottomRow": 2, + "parentRowSpace": 40, + "isVisible": true, + "type": "TEXT_WIDGET", + "dynamicBindings": { + "text": true, + "value": true + }, + "parentId": "c2nnq6o54h", + "isLoading": false, + "parentColumnSpace": 20.625, + "leftColumn": 7, + "text": "{{usersTable.selectedRow.email}}", + "textStyle": "LABEL" + }, + { + "widgetName": "Text5", + "rightColumn": 15, + "textAlign": "LEFT", + "widgetId": "2wymlwykex", + "topRow": 2, + "bottomRow": 3, + "parentRowSpace": 40, + "isVisible": true, + "type": "TEXT_WIDGET", + "dynamicBindings": { + "text": true, + "value": true + }, + "parentId": "c2nnq6o54h", + "isLoading": false, + "parentColumnSpace": 25.25, + "leftColumn": 7, + "text": "{{usersTable.selectedRow.address}}", + "textStyle": "LABEL" + }, + { + "widgetName": "Text6", + "rightColumn": 11, + "textAlign": "LEFT", + "widgetId": "4x7s4ffqyc", + "dynamicProperties": { + "isVisible": true + }, + "topRow": 3, + "bottomRow": 4, + "parentRowSpace": 40, + "isVisible": "{{usersTable.selectedRow !== undefined}}", + "type": "TEXT_WIDGET", + "dynamicBindings": { + "text": true, + "isVisible": true, + "value": true + }, + "parentId": "c2nnq6o54h", + "isLoading": false, + "parentColumnSpace": 25.25, + "leftColumn": 7, + "text": "

{{ (usersTable.selectedRow.gender === \"Male\" ? \"ā™‚ļø\" : \"ā™€ļø\") + usersTable.selectedRow.gender}}

", + "textStyle": "LABEL" + }, + { + "widgetName": "Text8", + "rightColumn": 7, + "textAlign": "CENTER", + "widgetId": "3mqfe3k3qf", + "dynamicProperties": { + "isVisible": true + }, + "topRow": 3, + "bottomRow": 4, + "parentRowSpace": 40, + "isVisible": "{{usersTable.selectedRow === undefined}}", + "type": "TEXT_WIDGET", + "dynamicBindings": { + "isVisible": true, + "value": true + }, + "parentId": "c2nnq6o54h", + "isLoading": false, + "parentColumnSpace": 25.25, + "leftColumn": 0, + "text": "

šŸ‘ˆšŸæ Select a user

", + "textStyle": "LABEL" + }, + { + "widgetName": "Text21", + "rightColumn": 15, + "textAlign": "LEFT", + "widgetId": "uvw0ma9kfr", + "topRow": 4, + "bottomRow": 5, + "parentRowSpace": 40, + "isVisible": true, + "type": "TEXT_WIDGET", + "dynamicBindings": { + "text": true, + "value": true + }, + "parentId": "c2nnq6o54h", + "isLoading": false, + "parentColumnSpace": 29.875, + "leftColumn": 7, + "text": "{{usersTable.selectedRow.phoneNo || \"\"}}", + "textStyle": "LABEL" + } + ] + } + ] + }, + { + "hiddenColumns": [ + "userId", + "orderDate" + ], + "widgetName": "ordersTable", + "rightColumn": 8, + "columnOrder": [ + "id", + "deliveryAddress", + "orderAmount", + "status" + ], + "widgetId": "xr3qu1jpj8", + "topRow": 19, + "bottomRow": 32, + "parentRowSpace": 40, + "tableData": "{{getOrders.data}}", + "isVisible": true, + "label": "Data", + "searchKey": "", + "type": "TABLE_WIDGET", + "dynamicBindings": { + "tableData": true, + "selectedRow": true, + "filteredTableData": true + }, + "parentId": "0", + "isLoading": false, + "parentColumnSpace": 74, + "leftColumn": 0, + "dynamicTriggers": { + "onRowSelected": true + }, + "onRowSelected": "{{getOrderProducts.run()}}", + "columnSizeMap": { + "userId": 111 + } + }, + { + "widgetName": "Text13", + "rightColumn": 4, + "textAlign": "LEFT", + "widgetId": "euwmlckp34", + "topRow": 18, + "bottomRow": 19, + "parentRowSpace": 40, + "isVisible": true, + "type": "TEXT_WIDGET", + "dynamicBindings": { + "value": true, + "text": true + }, + "parentId": "0", + "isLoading": false, + "parentColumnSpace": 74, + "leftColumn": 0, + "text": "{{usersTable.selectedRow ? usersTable.selectedRow.name + \"'s Orders\" : \"ā˜šŸ½ Select a user\"}}", + "textStyle": "HEADING" + }, + { + "backgroundColor": "#FFFFFF", + "widgetName": "Container2", + "rightColumn": 16, + "widgetId": "xlb8hua7ie", + "containerStyle": "card", + "topRow": 19, + "bottomRow": 32, + "parentRowSpace": 40, + "isVisible": true, + "type": "CONTAINER_WIDGET", + "parentId": "0", + "blueprint": { + "view": [ + { + "position": { + "top": 0, + "left": 0 + }, + "type": "CANVAS_WIDGET", + "props": { + "detachFromLayout": true, + "children": [ + "v8531ch9d8", + "0cz98i5vmt" + ], + "containerStyle": "none", + "canExtend": false + } + } + ] + }, + "isLoading": false, + "parentColumnSpace": 74, + "leftColumn": 8, + "children": [ + { + "widgetName": "Canvas3", + "rightColumn": 592, + "detachFromLayout": true, + "widgetId": "gutl68s87o", + "containerStyle": "none", + "topRow": 0, + "bottomRow": 400, + "parentRowSpace": 1, + "isVisible": true, + "canExtend": false, + "type": "CANVAS_WIDGET", + "parentId": "xlb8hua7ie", + "minHeight": 400, + "isLoading": false, + "parentColumnSpace": 1, + "leftColumn": 0, + "children": [ + { + "widgetName": "Text15", + "rightColumn": 7, + "textAlign": "LEFT", + "widgetId": "0cz98i5vmt", + "topRow": 0, + "bottomRow": 1, + "parentRowSpace": 40, + "isVisible": true, + "type": "TEXT_WIDGET", + "dynamicBindings": { + "text": true, + "value": true + }, + "parentId": "gutl68s87o", + "isLoading": false, + "parentColumnSpace": 29.875, + "leftColumn": 0, + "text": "{{\"Order# \" + ordersTable.selectedRow.id}}", + "textStyle": "HEADING" + }, + { + "widgetName": "Text16", + "rightColumn": 11, + "textAlign": "LEFT", + "widgetId": "ec7hwwpigw", + "topRow": 1, + "bottomRow": 2, + "parentRowSpace": 40, + "isVisible": true, + "type": "TEXT_WIDGET", + "dynamicBindings": { + "text": true, + "value": true + }, + "parentId": "gutl68s87o", + "isLoading": false, + "parentColumnSpace": 29.875, + "leftColumn": 0, + "text": "{{ordersTable.selectedRow.deliveryAddress}}", + "textStyle": "LABEL" + }, + { + "widgetName": "Text17", + "rightColumn": 8, + "textAlign": "LEFT", + "widgetId": "jgv0uu3x5g", + "topRow": 2, + "bottomRow": 3, + "parentRowSpace": 40, + "isVisible": true, + "type": "TEXT_WIDGET", + "dynamicBindings": { + "text": true, + "value": true + }, + "parentId": "gutl68s87o", + "isLoading": false, + "parentColumnSpace": 29.875, + "leftColumn": 4, + "text": "{{ordersTable.selectedRow.status}}", + "textStyle": "LABEL" + }, + { + "widgetName": "Button6", + "rightColumn": 16, + "onClick": "{{showModal('Modal2')}}", + "isDefaultClickDisabled": true, + "widgetId": "am2dpsi2q3", + "dynamicProperties": { + "isDisabled": true + }, + "buttonStyle": "DANGER_BUTTON", + "topRow": 0, + "bottomRow": 1, + "parentRowSpace": 40, + "isVisible": true, + "type": "BUTTON_WIDGET", + "dynamicBindings": { + "isDisabled": true + }, + "parentId": "gutl68s87o", + "isLoading": false, + "parentColumnSpace": 29.875, + "leftColumn": 12, + "dynamicTriggers": { + "onClick": true + }, + "text": "Refund", + "isDisabled": "{{ordersTable.selectedRow === undefined || ordersTable.selectedRow.status === \"REFUNDED\" || appsmith.user.email !== \"nikhil@appsmith.com\"}}" + }, + { + "hiddenColumns": [ + "mrp", + "imageUrl", + "description", + "isListed", + "availabilityDate", + "channel" + ], + "widgetName": "Table1", + "rightColumn": 16, + "columnOrder": [ + "productId", + "productName", + "listingPrice", + "category", + "mrp", + "imageUrl", + "description", + "isListed", + "availabilityDate", + "channel" + ], + "widgetId": "db1kphrwnt", + "topRow": 5, + "bottomRow": 12, + "parentRowSpace": 40, + "tableData": "{{getOrderProducts.data}}", + "isVisible": true, + "label": "Data", + "searchKey": "", + "type": "TABLE_WIDGET", + "dynamicBindings": { + "tableData": true, + "selectedRow": true, + "filteredTableData": true + }, + "parentId": "gutl68s87o", + "isLoading": false, + "parentColumnSpace": 29.875, + "leftColumn": 0 + }, + { + "widgetName": "Text18", + "rightColumn": 4, + "textAlign": "LEFT", + "widgetId": "0dxro3kpwp", + "topRow": 4, + "bottomRow": 5, + "parentRowSpace": 40, + "isVisible": true, + "type": "TEXT_WIDGET", + "dynamicBindings": { + "value": true + }, + "parentId": "gutl68s87o", + "isLoading": false, + "parentColumnSpace": 29.875, + "leftColumn": 0, + "text": "Products", + "textStyle": "HEADING" + }, + { + "widgetName": "Text19", + "rightColumn": 4, + "textAlign": "LEFT", + "widgetId": "ek4t9o9djx", + "topRow": 2, + "bottomRow": 3, + "parentRowSpace": 40, + "isVisible": true, + "type": "TEXT_WIDGET", + "dynamicBindings": { + "text": true, + "value": true + }, + "parentId": "gutl68s87o", + "isLoading": false, + "parentColumnSpace": 34.5, + "leftColumn": 0, + "text": "{{\"₹\" + ordersTable.selectedRow.orderAmount}}", + "textStyle": "LABEL" + }, + { + "isVisible": true, + "text": "{{appsmith.user.email !== \"nikhil@appsmith.com\" ? \"Only Admins can initiate refunds\" : \"\"}}", + "textStyle": "HEADING", + "textAlign": "CENTER", + "widgetName": "Text24", + "type": "TEXT_WIDGET", + "isLoading": false, + "parentColumnSpace": 34.5, + "parentRowSpace": 40, + "leftColumn": 2, + "rightColumn": 15, + "topRow": 3, + "bottomRow": 4, + "parentId": "gutl68s87o", + "widgetId": "1macn19a8h", + "dynamicBindings": { + "text": true, + "value": true + } + } + ] + } + ] + }, + { + "isVisible": false, + "size": "MODAL_SMALL", + "canEscapeKeyClose": true, + "detachFromLayout": true, + "canOutsideClickClose": true, + "shouldScrollContents": true, + "widgetName": "Modal2", "children": [ - { - "isVisible": true, - "widgetName": "Canvas3", - "containerStyle": "none", - "canExtend": false, - "detachFromLayout": true, - "children": [], - "tabId": "tab1", - "minHeight": 280, - "type": "CANVAS_WIDGET", - "isLoading": false, - "parentColumnSpace": 1, - "parentRowSpace": 1, - "leftColumn": 0, - "rightColumn": 592, - "topRow": 0, - "bottomRow": 280, - "parentId": "2kmt5gdvho", - "widgetId": "eo5744d1ac" - }, { "isVisible": true, "widgetName": "Canvas4", - "containerStyle": "none", - "canExtend": false, "detachFromLayout": true, + "canExtend": true, + "isDisabled": false, + "shouldScrollContents": false, "children": [ { "isVisible": true, - "label": "", - "options": [ - { - "id": "1", - "label": "Male", - "value": "M" - }, - { - "id": "2", - "label": "Female", - "value": "F" - } - ], - "defaultOptionValue": "M", - "widgetName": "RadioGroup1", - "type": "RADIO_GROUP_WIDGET", + "widgetName": "Icon2", + "iconName": "cross", + "iconSize": 24, + "color": "#040627", + "type": "ICON_WIDGET", "isLoading": false, - "parentColumnSpace": 39.125, + "leftColumn": 14, + "rightColumn": 16, + "topRow": 0, + "bottomRow": 1, + "parentId": "bek8vtf45d", + "widgetId": "h2bzyryz3k", + "onClick": "{{closeModal('Modal2')}}" + }, + { + "isVisible": true, + "text": "Refund Order #{{ordersTable.selectedRow.id}}", + "textStyle": "HEADING", + "textAlign": "LEFT", + "widgetName": "Text22", + "type": "TEXT_WIDGET", + "isLoading": false, + "leftColumn": 0, + "rightColumn": 10, + "topRow": 0, + "bottomRow": 1, + "parentId": "bek8vtf45d", + "widgetId": "3c2d1zfzu7", + "dynamicBindings": { + "value": true, + "text": true + } + }, + { + "isVisible": true, + "text": "Cancel", + "buttonStyle": "SECONDARY_BUTTON", + "widgetName": "Button7", + "isDisabled": false, + "isDefaultClickDisabled": true, + "type": "BUTTON_WIDGET", + "isLoading": false, + "leftColumn": 10, + "rightColumn": 13, + "topRow": 4, + "bottomRow": 5, + "parentId": "bek8vtf45d", + "widgetId": "w8hwwktvmg", + "dynamicTriggers": { + "onClick": true + }, + "onClick": "{{closeModal('Modal2')}}" + }, + { + "isVisible": true, + "text": "Confirm", + "buttonStyle": "PRIMARY_BUTTON", + "widgetName": "Button8", + "isDisabled": false, + "isDefaultClickDisabled": true, + "type": "BUTTON_WIDGET", + "isLoading": false, + "leftColumn": 13, + "rightColumn": 16, + "topRow": 4, + "bottomRow": 5, + "parentId": "bek8vtf45d", + "widgetId": "54fh5v9z6f", + "onClick": "{{refundAPI.run(() => markOrderRefund.run(() => getOrders.run(() => closeModal('Modal2'))), () => {})}}", + "dynamicProperties": { + "onClick": true + }, + "dynamicTriggers": { + "onClick": true + } + }, + { + "isVisible": true, + "text": "Are you sure you want to refund this order?", + "textStyle": "LABEL", + "textAlign": "LEFT", + "widgetName": "Text23", + "type": "TEXT_WIDGET", + "isLoading": false, + "parentColumnSpace": 26, "parentRowSpace": 40, - "leftColumn": 6, - "rightColumn": 9, - "topRow": 1, + "leftColumn": 1, + "rightColumn": 13, + "topRow": 2, "bottomRow": 3, - "parentId": "tc29qir6tk", - "widgetId": "lkn2q6gati" + "parentId": "bek8vtf45d", + "widgetId": "z2k233aijz", + "dynamicBindings": { + "value": true + } } ], - "tabId": "tab2", - "minHeight": 280, + "blueprint": { + "view": [ + { + "type": "ICON_WIDGET", + "position": { + "left": 14, + "top": 0 + }, + "size": { + "rows": 1, + "cols": 2 + }, + "props": { + "iconName": "cross", + "iconSize": 24, + "color": "#040627" + } + }, + { + "type": "TEXT_WIDGET", + "position": { + "left": 0, + "top": 0 + }, + "size": { + "rows": 1, + "cols": 10 + }, + "props": { + "text": "Modal Title", + "textStyle": "HEADING" + } + }, + { + "type": "BUTTON_WIDGET", + "position": { + "left": 10, + "top": 4 + }, + "size": { + "rows": 1, + "cols": 3 + }, + "props": { + "text": "Cancel", + "buttonStyle": "SECONDARY_BUTTON" + } + }, + { + "type": "BUTTON_WIDGET", + "position": { + "left": 13, + "top": 4 + }, + "size": { + "rows": 1, + "cols": 3 + }, + "props": { + "text": "Confirm", + "buttonStyle": "PRIMARY_BUTTON" + } + } + ], + "operations": [ + { + "type": "MODIFY_PROPS" + } + ] + }, + "minHeight": 0, "type": "CANVAS_WIDGET", "isLoading": false, "parentColumnSpace": 1, "parentRowSpace": 1, "leftColumn": 0, - "rightColumn": 592, + "rightColumn": 0, "topRow": 0, "bottomRow": 280, - "parentId": "2kmt5gdvho", - "widgetId": "tc29qir6tk" + "parentId": "apytb4wr2y", + "widgetId": "bek8vtf45d" } - ] + ], + "blueprint": { + "view": [ + { + "type": "CANVAS_WIDGET", + "position": { + "left": 0, + "top": 0 + }, + "props": { + "detachFromLayout": true, + "canExtend": true, + "isVisible": true, + "isDisabled": false, + "shouldScrollContents": false, + "children": [ ], + "blueprint": { + "view": [ + { + "type": "ICON_WIDGET", + "position": { + "left": 14, + "top": 0 + }, + "size": { + "rows": 1, + "cols": 2 + }, + "props": { + "iconName": "cross", + "iconSize": 24, + "color": "#040627" + } + }, + { + "type": "TEXT_WIDGET", + "position": { + "left": 0, + "top": 0 + }, + "size": { + "rows": 1, + "cols": 10 + }, + "props": { + "text": "Modal Title", + "textStyle": "HEADING" + } + }, + { + "type": "BUTTON_WIDGET", + "position": { + "left": 10, + "top": 4 + }, + "size": { + "rows": 1, + "cols": 3 + }, + "props": { + "text": "Cancel", + "buttonStyle": "SECONDARY_BUTTON" + } + }, + { + "type": "BUTTON_WIDGET", + "position": { + "left": 13, + "top": 4 + }, + "size": { + "rows": 1, + "cols": 3 + }, + "props": { + "text": "Confirm", + "buttonStyle": "PRIMARY_BUTTON" + } + } + ], + "operations": [ + { + "type": "MODIFY_PROPS" + } + ] + } + } + } + ] + }, + "type": "MODAL_WIDGET", + "isLoading": false, + "parentColumnSpace": 1, + "parentRowSpace": 1, + "leftColumn": 0, + "rightColumn": 0, + "topRow": 0, + "bottomRow": 0, + "parentId": "0", + "widgetId": "apytb4wr2y" + }, + { + "isVisible": true, + "widgetName": "Chart1", + "chartType": "PIE_CHART", + "chartName": "Orders", + "allowHorizontalScroll": false, + "chartData": "[{\"seriesName\":\"Order Status\",\"data\":\"[\\n {\\n \\\"x\\\": \\\"ORDER_PLACED\\\",\\n \\\"y\\\": {{getOrders.data.filter((order) => { return order.status === \\\"ORDER_PLACED\\\" }).length}}\\n },\\n {\\n \\\"x\\\": \\\"OUT_FOR_DELIVERY\\\",\\n \\\"y\\\": {{getOrders.data.filter((order) => { return order.status === \\\"OUT_FOR_DELIVERY\\\" }).length}}\\n },\\n {\\n \\\"x\\\": \\\"PAYMENT_PENDING\\\",\\n \\\"y\\\": {{getOrders.data.filter((order) => { return order.status === \\\"PAYMENT_PENDING\\\" }).length}}\\n },\\n {\\n \\\"x\\\": \\\"REFUNDED\\\",\\n \\\"y\\\": {{getOrders.data.filter((order) => { return order.status === \\\"REFUNDED\\\" }).length}}\\n }\\n \\n]\"}]", + "xAxisName": "Last Week", + "yAxisName": "Total Order Revenue $", + "type": "CHART_WIDGET", + "isLoading": false, + "parentColumnSpace": 74, + "parentRowSpace": 40, + "leftColumn": 9, + "rightColumn": 16, + "topRow": 9, + "bottomRow": 17, + "parentId": "0", + "widgetId": "jr461ymixc", + "dynamicBindings": { + "chartData": true + } } ] }, @@ -2353,41 +4344,826 @@ ] ], "widgetNames": [ - "Text9", "Button1", "Text8", - "Text7", "Text6", "Text5", "Text4", "Text3", - "userAddressDropdown", "Text2", "Container1", + "Icon2", "Text1", "Icon1", + "Container2", + "Chart1", "usersTable", - "userNameInput", - "userEmailInput", - "userRoleDropdown", + "Text23", + "Text24", + "Text21", + "Text22", + "Text20", + "Table1", "Image1", - "Text14", + "ordersTable", + "Text18", + "Text19", + "phoneInput", + "Text16", + "nameInput", + "Text17", + "emailInput", "MainContainer", + "Text15", "Text12", + "Canvas4", "Text13", "Text10", "Text11", "Modal1", "Canvas1", + "Modal2", "Canvas2", - "Button5", - "Button4", + "Canvas3", "Button3", "Button2", - "Dropdown1" + "Button8", + "addressInput", + "Button7", + "Button6" ], "deleted": false, - "policies": [] + "policies": [ ] + } + ], + "deleted": false, + "policies": [], + "_class": "com.appsmith.server.domains.Page" + }, + { + "name": "Support Tickets", + "$isDefault": true, + "$actions": [ + { + "name": "getTickets", + "datasource": { + "$isEmbedded": true, + "name": "https://appsmithhelp.freshdesk.com", + "$pluginPackageName": "restapi-plugin", + "datasourceConfiguration": { + "url": "https://appsmithhelp.freshdesk.com" + }, + "invalids": [ ], + "deleted": false, + "policies": [ ] + }, + "actionConfiguration": { + "timeoutInMillisecond": 10000, + "paginationType": "NONE", + "path": "/api/v2/tickets", + "headers": [ + { + "key": "Authorization", + "value": "Basic dG51cjdrUlk4MjRCM3l5eElaeTp0ZXN0" + }, + { + "key": "", + "value": "" + } + ], + "queryParameters": [ + { + "key": "include", + "value": "requester,description" + }, + { + "key": "", + "value": "" + } + ], + "httpMethod": "GET" + }, + "pluginType": "API", + "dynamicBindingPathList": [ ], + "isValid": true, + "invalids": [ ], + "jsonPathKeys": [ ], + "deleted": false, + "policies": [], + "_class": "com.appsmith.server.domains.Action" + } + ], + "layouts": [ + { + "viewMode": false, + "dsl": { + "widgetName": "MainContainer", + "backgroundColor": "none", + "rightColumn": 1224, + "snapColumns": 16, + "detachFromLayout": true, + "widgetId": "0", + "topRow": 0, + "bottomRow": 1280, + "containerStyle": "none", + "snapRows": 33, + "parentRowSpace": 1, + "type": "CANVAS_WIDGET", + "canExtend": true, + "dynamicBindings": { + + }, + "version": 5, + "minHeight": 1292, + "parentColumnSpace": 1, + "leftColumn": 0, + "children": [ + { + "isVisible": true, + "shouldScrollContents": false, + "widgetName": "Tabs1", + "tabs": "[{\"label\":\"Blank\",\"id\":\"tab1\"},{\"label\":\"Email\",\"id\":\"tab2\"}]", + "shouldShowTabs": false, + "defaultTab": "{{ticketsTable.selectedRow === undefined ? \"Blank\" : \"Email\"}}", + "blueprint": { + "view": [ + { + "type": "CANVAS_WIDGET", + "position": { + "top": 0, + "left": 0 + }, + "size": { + "rows": 6, + "cols": 16 + }, + "props": { + "containerStyle": "none", + "canExtend": false, + "detachFromLayout": true, + "children": [ + "6af2mwjii8" + ], + "tabId": "tab1" + } + }, + { + "type": "CANVAS_WIDGET", + "position": { + "top": 0, + "left": 0 + }, + "size": { + "rows": 6, + "cols": 16 + }, + "props": { + "containerStyle": "none", + "canExtend": false, + "detachFromLayout": true, + "children": [ + "bv27fj7bs5", + "6af2mwjii8" + ], + "tabId": "tab2" + } + } + ] + }, + "type": "TABS_WIDGET", + "isLoading": false, + "parentColumnSpace": 74, + "parentRowSpace": 40, + "leftColumn": 8, + "rightColumn": 16, + "topRow": 0, + "bottomRow": 20, + "parentId": "0", + "widgetId": "28qy9d4q6j", + "children": [ + { + "isVisible": true, + "widgetName": "Canvas2", + "containerStyle": "none", + "canExtend": false, + "detachFromLayout": true, + "children": [ + { + "isVisible": true, + "text": "

šŸ‘ˆ Select a Support Ticket

", + "textStyle": "LABEL", + "textAlign": "LEFT", + "widgetName": "Text2", + "type": "TEXT_WIDGET", + "isLoading": false, + "parentColumnSpace": 34.5, + "parentRowSpace": 40, + "leftColumn": 3, + "rightColumn": 14, + "topRow": 8, + "bottomRow": 9, + "parentId": "ugkkycsm7d", + "widgetId": "66o8bjkz30", + "dynamicBindings": { + "value": true + } + } + ], + "tabId": "tab1", + "minHeight": 280, + "type": "CANVAS_WIDGET", + "isLoading": false, + "parentColumnSpace": 1, + "parentRowSpace": 1, + "leftColumn": 0, + "rightColumn": 592, + "topRow": 0, + "bottomRow": 280, + "parentId": "28qy9d4q6j", + "widgetId": "ugkkycsm7d" + }, + { + "isVisible": true, + "widgetName": "Canvas3", + "containerStyle": "none", + "canExtend": false, + "detachFromLayout": true, + "children": [ + { + "widgetName": "Text1", + "rightColumn": 16, + "textAlign": "LEFT", + "widgetId": "bv27fj7bs5", + "topRow": 2, + "bottomRow": 19, + "parentRowSpace": 40, + "isVisible": true, + "type": "TEXT_WIDGET", + "dynamicBindings": { + "text": true, + "value": true + }, + "shouldScroll": true, + "parentId": "0", + "isLoading": false, + "parentColumnSpace": 74, + "leftColumn": 0, + "text": "{{ticketsTable.selectedRow.description}}", + "textStyle": "LABEL" + }, + { + "widgetName": "Button1", + "rightColumn": 16, + "onClick": "{{navigateTo('Users Page', { email: ticketsTable.selectedRow.email })}}", + "isDefaultClickDisabled": true, + "widgetId": "6af2mwjii8", + "dynamicProperties": { + "onClick": true + }, + "buttonStyle": "PRIMARY_BUTTON", + "topRow": 0, + "bottomRow": 1, + "parentRowSpace": 40, + "isVisible": true, + "type": "BUTTON_WIDGET", + "dynamicBindings": { + + }, + "parentId": "6rczwfuxqd", + "isLoading": false, + "parentColumnSpace": 34.5, + "leftColumn": 13, + "dynamicTriggers": { + "onClick": true + }, + "text": "View User", + "isDisabled": false + }, + { + "isVisible": true, + "text": "

Support Email

", + "textStyle": "LABEL", + "textAlign": "LEFT", + "widgetName": "Text3", + "type": "TEXT_WIDGET", + "isLoading": false, + "parentColumnSpace": 34.5, + "parentRowSpace": 40, + "leftColumn": 0, + "rightColumn": 7, + "topRow": 0, + "bottomRow": 1, + "parentId": "bx74wpc2rn", + "widgetId": "t23uk8t09q", + "dynamicBindings": { + "value": true + } + } + ], + "tabId": "tab2", + "minHeight": 280, + "type": "CANVAS_WIDGET", + "isLoading": false, + "parentColumnSpace": 1, + "parentRowSpace": 1, + "leftColumn": 0, + "rightColumn": 592, + "topRow": 0, + "bottomRow": 280, + "parentId": "28qy9d4q6j", + "widgetId": "bx74wpc2rn" + } + ], + "dynamicBindings": { + "selectedTab": true, + "defaultTab": true + } + }, + { + "isVisible": true, + "backgroundColor": "#FFFFFF", + "widgetName": "Container1", + "containerStyle": "card", + "children": [ + { + "isVisible": true, + "widgetName": "Canvas4", + "containerStyle": "none", + "canExtend": false, + "detachFromLayout": true, + "children": [ + { + "hiddenColumns": [ + "description", + "actions" + ], + "widgetName": "ticketsTable", + "rightColumn": 16, + "widgetId": "472a29heor", + "topRow": 1, + "bottomRow": 19, + "parentRowSpace": 40, + "tableData": "{{getTickets.data.map((ticket) => {\n\treturn {\n\t\tid: ticket.id,\n\t\temail: ticket.requester.email,\n\t\tsubject: ticket.subject,\n\t\tdescription: ticket.description\n\t}\n})}}", + "isVisible": true, + "label": "Data", + "searchKey": "", + "type": "TABLE_WIDGET", + "dynamicBindings": { + "tableData": true, + "selectedRow": true, + "filteredTableData": true + }, + "parentId": "0", + "serverSidePaginationEnabled": true, + "isLoading": false, + "parentColumnSpace": 74, + "leftColumn": 0, + "columnActions": [ ], + "columnSizeMap": { + "subject": 217, + "id": 115, + "email": 217 + } + }, + { + "isVisible": true, + "text": "

Freskdesk Tickets

", + "textStyle": "LABEL", + "textAlign": "LEFT", + "widgetName": "Text4", + "type": "TEXT_WIDGET", + "isLoading": false, + "parentColumnSpace": 74, + "parentRowSpace": 40, + "leftColumn": 0, + "rightColumn": 10, + "topRow": 0, + "bottomRow": 1, + "parentId": "0", + "widgetId": "dqzd7flg31", + "dynamicBindings": { + "value": true + } + } + ], + "minHeight": 400, + "type": "CANVAS_WIDGET", + "isLoading": false, + "parentColumnSpace": 1, + "parentRowSpace": 1, + "leftColumn": 0, + "rightColumn": 592, + "topRow": 0, + "bottomRow": 400, + "parentId": "dkhget3ru7", + "widgetId": "pammdjlrth" + } + ], + "blueprint": { + "view": [ + { + "type": "CANVAS_WIDGET", + "position": { + "top": 0, + "left": 0 + }, + "props": { + "containerStyle": "none", + "canExtend": false, + "detachFromLayout": true, + "children": [ + "472a29heor", + "dqzd7flg31" + ] + } + } + ] + }, + "type": "CONTAINER_WIDGET", + "isLoading": false, + "parentColumnSpace": 74, + "parentRowSpace": 40, + "leftColumn": 0, + "rightColumn": 8, + "topRow": 0, + "bottomRow": 20, + "parentId": "0", + "widgetId": "dkhget3ru7" + } + ] + }, + "publishedDsl": { + "widgetName": "MainContainer", + "backgroundColor": "none", + "rightColumn": 1224, + "snapColumns": 16, + "detachFromLayout": true, + "widgetId": "0", + "topRow": 0, + "bottomRow": 1280, + "containerStyle": "none", + "snapRows": 33, + "parentRowSpace": 1, + "type": "CANVAS_WIDGET", + "canExtend": true, + "dynamicBindings": { + + }, + "version": 5, + "minHeight": 1292, + "parentColumnSpace": 1, + "leftColumn": 0, + "children": [ + { + "isVisible": true, + "shouldScrollContents": false, + "widgetName": "Tabs1", + "tabs": "[{\"label\":\"Blank\",\"id\":\"tab1\"},{\"label\":\"Email\",\"id\":\"tab2\"}]", + "shouldShowTabs": false, + "defaultTab": "{{ticketsTable.selectedRow === undefined ? \"Blank\" : \"Email\"}}", + "blueprint": { + "view": [ + { + "type": "CANVAS_WIDGET", + "position": { + "top": 0, + "left": 0 + }, + "size": { + "rows": 6, + "cols": 16 + }, + "props": { + "containerStyle": "none", + "canExtend": false, + "detachFromLayout": true, + "children": [ + "6af2mwjii8" + ], + "tabId": "tab1" + } + }, + { + "type": "CANVAS_WIDGET", + "position": { + "top": 0, + "left": 0 + }, + "size": { + "rows": 6, + "cols": 16 + }, + "props": { + "containerStyle": "none", + "canExtend": false, + "detachFromLayout": true, + "children": [ + "bv27fj7bs5", + "6af2mwjii8" + ], + "tabId": "tab2" + } + } + ] + }, + "type": "TABS_WIDGET", + "isLoading": false, + "parentColumnSpace": 74, + "parentRowSpace": 40, + "leftColumn": 8, + "rightColumn": 16, + "topRow": 0, + "bottomRow": 20, + "parentId": "0", + "widgetId": "28qy9d4q6j", + "children": [ + { + "isVisible": true, + "widgetName": "Canvas2", + "containerStyle": "none", + "canExtend": false, + "detachFromLayout": true, + "children": [ + { + "isVisible": true, + "text": "

šŸ‘ˆ Select a Support Ticket

", + "textStyle": "LABEL", + "textAlign": "LEFT", + "widgetName": "Text2", + "type": "TEXT_WIDGET", + "isLoading": false, + "parentColumnSpace": 34.5, + "parentRowSpace": 40, + "leftColumn": 3, + "rightColumn": 14, + "topRow": 8, + "bottomRow": 9, + "parentId": "ugkkycsm7d", + "widgetId": "66o8bjkz30", + "dynamicBindings": { + "value": true + } + } + ], + "tabId": "tab1", + "minHeight": 280, + "type": "CANVAS_WIDGET", + "isLoading": false, + "parentColumnSpace": 1, + "parentRowSpace": 1, + "leftColumn": 0, + "rightColumn": 592, + "topRow": 0, + "bottomRow": 280, + "parentId": "28qy9d4q6j", + "widgetId": "ugkkycsm7d" + }, + { + "isVisible": true, + "widgetName": "Canvas3", + "containerStyle": "none", + "canExtend": false, + "detachFromLayout": true, + "children": [ + { + "widgetName": "Text1", + "rightColumn": 16, + "textAlign": "LEFT", + "widgetId": "bv27fj7bs5", + "topRow": 2, + "bottomRow": 19, + "parentRowSpace": 40, + "isVisible": true, + "type": "TEXT_WIDGET", + "dynamicBindings": { + "text": true, + "value": true + }, + "shouldScroll": true, + "parentId": "0", + "isLoading": false, + "parentColumnSpace": 74, + "leftColumn": 0, + "text": "{{ticketsTable.selectedRow.description}}", + "textStyle": "LABEL" + }, + { + "widgetName": "Button1", + "rightColumn": 16, + "onClick": "{{navigateTo('Users Page', { email: ticketsTable.selectedRow.email })}}", + "isDefaultClickDisabled": true, + "widgetId": "6af2mwjii8", + "dynamicProperties": { + "onClick": true + }, + "buttonStyle": "PRIMARY_BUTTON", + "topRow": 0, + "bottomRow": 1, + "parentRowSpace": 40, + "isVisible": true, + "type": "BUTTON_WIDGET", + "dynamicBindings": { + + }, + "parentId": "6rczwfuxqd", + "isLoading": false, + "parentColumnSpace": 34.5, + "leftColumn": 13, + "dynamicTriggers": { + "onClick": true + }, + "text": "View User", + "isDisabled": false + }, + { + "isVisible": true, + "text": "

Support Email

", + "textStyle": "LABEL", + "textAlign": "LEFT", + "widgetName": "Text3", + "type": "TEXT_WIDGET", + "isLoading": false, + "parentColumnSpace": 34.5, + "parentRowSpace": 40, + "leftColumn": 0, + "rightColumn": 7, + "topRow": 0, + "bottomRow": 1, + "parentId": "bx74wpc2rn", + "widgetId": "t23uk8t09q", + "dynamicBindings": { + "value": true + } + } + ], + "tabId": "tab2", + "minHeight": 280, + "type": "CANVAS_WIDGET", + "isLoading": false, + "parentColumnSpace": 1, + "parentRowSpace": 1, + "leftColumn": 0, + "rightColumn": 592, + "topRow": 0, + "bottomRow": 280, + "parentId": "28qy9d4q6j", + "widgetId": "bx74wpc2rn" + } + ], + "dynamicBindings": { + "selectedTab": true, + "defaultTab": true + } + }, + { + "isVisible": true, + "backgroundColor": "#FFFFFF", + "widgetName": "Container1", + "containerStyle": "card", + "children": [ + { + "isVisible": true, + "widgetName": "Canvas4", + "containerStyle": "none", + "canExtend": false, + "detachFromLayout": true, + "children": [ + { + "hiddenColumns": [ + "description", + "actions" + ], + "widgetName": "ticketsTable", + "rightColumn": 16, + "widgetId": "472a29heor", + "topRow": 1, + "bottomRow": 19, + "parentRowSpace": 40, + "tableData": "{{getTickets.data.map((ticket) => {\n\treturn {\n\t\tid: ticket.id,\n\t\temail: ticket.requester.email,\n\t\tsubject: ticket.subject,\n\t\tdescription: ticket.description\n\t}\n})}}", + "isVisible": true, + "label": "Data", + "searchKey": "", + "type": "TABLE_WIDGET", + "dynamicBindings": { + "tableData": true, + "selectedRow": true, + "filteredTableData": true + }, + "parentId": "0", + "serverSidePaginationEnabled": true, + "isLoading": false, + "parentColumnSpace": 74, + "leftColumn": 0, + "columnActions": [ ], + "columnSizeMap": { + "subject": 217, + "id": 115, + "email": 217 + } + }, + { + "isVisible": true, + "text": "

Freskdesk Tickets

", + "textStyle": "LABEL", + "textAlign": "LEFT", + "widgetName": "Text4", + "type": "TEXT_WIDGET", + "isLoading": false, + "parentColumnSpace": 74, + "parentRowSpace": 40, + "leftColumn": 0, + "rightColumn": 10, + "topRow": 0, + "bottomRow": 1, + "parentId": "0", + "widgetId": "dqzd7flg31", + "dynamicBindings": { + "value": true + } + } + ], + "minHeight": 400, + "type": "CANVAS_WIDGET", + "isLoading": false, + "parentColumnSpace": 1, + "parentRowSpace": 1, + "leftColumn": 0, + "rightColumn": 592, + "topRow": 0, + "bottomRow": 400, + "parentId": "dkhget3ru7", + "widgetId": "pammdjlrth" + } + ], + "blueprint": { + "view": [ + { + "type": "CANVAS_WIDGET", + "position": { + "top": 0, + "left": 0 + }, + "props": { + "containerStyle": "none", + "canExtend": false, + "detachFromLayout": true, + "children": [ + "472a29heor", + "dqzd7flg31" + ] + } + } + ] + }, + "type": "CONTAINER_WIDGET", + "isLoading": false, + "parentColumnSpace": 74, + "parentRowSpace": 40, + "leftColumn": 0, + "rightColumn": 8, + "topRow": 0, + "bottomRow": 20, + "parentId": "0", + "widgetId": "dkhget3ru7" + } + ] + }, + "layoutOnLoadActions": [ + [ + { + "name": "getTickets", + "pluginType": "API", + "jsonPathKeys": [ ], + "timeoutInMillisecond": 10000 + } + ] + ], + "publishedLayoutOnLoadActions": [ + [ + { + "name": "getTickets", + "pluginType": "API", + "jsonPathKeys": [ ], + "timeoutInMillisecond": 10000 + } + ] + ], + "widgetNames": [ + "Canvas4", + "Button1", + "Canvas2", + "ticketsTable", + "Canvas3", + "Text4", + "Text3", + "Text2", + "Container1", + "Text1", + "Tabs1", + "MainContainer" + ], + "deleted": false, + "policies": [ ] } ], "deleted": false,