diff --git a/datasources/xTuple_Sandbox.json b/datasources/xTuple_Sandbox.json new file mode 100644 index 0000000..c97bd20 --- /dev/null +++ b/datasources/xTuple_Sandbox.json @@ -0,0 +1,6 @@ +{ + "gitSyncId": "630fb8035cd949195181bb2c_65bd1b8d610ad3019f1819d1", + "isAutoGenerated": false, + "name": "xTuple_Sandbox", + "pluginId": "postgres-plugin" +} \ No newline at end of file diff --git a/pages/Page1/Page1.json b/pages/Page1/Page1.json index 7225f36..6acb771 100644 --- a/pages/Page1/Page1.json +++ b/pages/Page1/Page1.json @@ -5,7 +5,7 @@ { "dsl": { "backgroundColor": "none", - "bottomRow": 380, + "bottomRow": 520, "canExtend": true, "containerStyle": "none", "detachFromLayout": true, diff --git a/pages/Page1/queries/Insert_mpe_isocountry1/Insert_mpe_isocountry1.txt b/pages/Page1/queries/Insert_mpe_isocountry1/Insert_mpe_isocountry1.txt new file mode 100644 index 0000000..63fc77c --- /dev/null +++ b/pages/Page1/queries/Insert_mpe_isocountry1/Insert_mpe_isocountry1.txt @@ -0,0 +1 @@ +INSERT INTO mpe.isocountry ("countryname","continent") VALUES ('{{(Table1.newRow || {}).countryname}}','{{(Table1.newRow || {}).continent}}') \ No newline at end of file diff --git a/pages/Page1/queries/Insert_mpe_isocountry1/metadata.json b/pages/Page1/queries/Insert_mpe_isocountry1/metadata.json new file mode 100644 index 0000000..191b75d --- /dev/null +++ b/pages/Page1/queries/Insert_mpe_isocountry1/metadata.json @@ -0,0 +1,35 @@ +{ + "gitSyncId": "6968b6e8271e5e0befde3194_08fc7608-7641-46f3-a322-0265f2bbbc04", + "id": "Page1_Insert_mpe_isocountry1", + "pluginId": "postgres-plugin", + "pluginType": "DB", + "unpublishedAction": { + "actionConfiguration": { + "body": "INSERT INTO mpe.isocountry (\"countryname\",\"continent\") VALUES ('{{(Table1.newRow || {}).countryname}}','{{(Table1.newRow || {}).continent}}')", + "encodeParamsToggle": true, + "paginationType": "NONE", + "pluginSpecifiedTemplates": [ + { + "value": false + } + ], + "timeoutInMillisecond": 10000 + }, + "confirmBeforeExecute": false, + "datasource": { + "id": "xTuple_Sandbox", + "isAutoGenerated": false, + "name": "xTuple_Sandbox", + "pluginId": "postgres-plugin" + }, + "dynamicBindingPathList": [ + { + "key": "body" + } + ], + "name": "Insert_mpe_isocountry1", + "pageId": "Page1", + "runBehaviour": "MANUAL", + "userSetOnLoad": false + } +} \ No newline at end of file diff --git a/pages/Page1/queries/Select_mpe_isocountry1/Select_mpe_isocountry1.txt b/pages/Page1/queries/Select_mpe_isocountry1/Select_mpe_isocountry1.txt new file mode 100644 index 0000000..a124831 --- /dev/null +++ b/pages/Page1/queries/Select_mpe_isocountry1/Select_mpe_isocountry1.txt @@ -0,0 +1,12 @@ +SELECT + * +FROM + mpe.isocountry +WHERE + "iso_id" ilike '%{{Table1.searchText}}%' +ORDER BY + "{{Table1.sortOrder.column || 'iso_id'}}" {{Table1.sortOrder.order !== "desc" ? "" : "DESC"}} +LIMIT + {{Table1.pageSize}} +OFFSET + {{Table1.pageOffset}} \ No newline at end of file diff --git a/pages/Page1/queries/Select_mpe_isocountry1/metadata.json b/pages/Page1/queries/Select_mpe_isocountry1/metadata.json new file mode 100644 index 0000000..465d19d --- /dev/null +++ b/pages/Page1/queries/Select_mpe_isocountry1/metadata.json @@ -0,0 +1,35 @@ +{ + "gitSyncId": "6968b6e8271e5e0befde3194_6ab47e10-a6f8-4be9-9f46-2e01804dfaf8", + "id": "Page1_Select_mpe_isocountry1", + "pluginId": "postgres-plugin", + "pluginType": "DB", + "unpublishedAction": { + "actionConfiguration": { + "body": "SELECT\n *\nFROM\n mpe.isocountry\nWHERE\n \"iso_id\" ilike '%{{Table1.searchText}}%'\nORDER BY\n \"{{Table1.sortOrder.column || 'iso_id'}}\" {{Table1.sortOrder.order !== \"desc\" ? \"\" : \"DESC\"}}\nLIMIT\n {{Table1.pageSize}}\nOFFSET\n {{Table1.pageOffset}}", + "encodeParamsToggle": true, + "paginationType": "NONE", + "pluginSpecifiedTemplates": [ + { + "value": false + } + ], + "timeoutInMillisecond": 10000 + }, + "confirmBeforeExecute": false, + "datasource": { + "id": "xTuple_Sandbox", + "isAutoGenerated": false, + "name": "xTuple_Sandbox", + "pluginId": "postgres-plugin" + }, + "dynamicBindingPathList": [ + { + "key": "body" + } + ], + "name": "Select_mpe_isocountry1", + "pageId": "Page1", + "runBehaviour": "AUTOMATIC", + "userSetOnLoad": false + } +} \ No newline at end of file diff --git a/pages/Page1/queries/Total_record_mpe_isocountry1/Total_record_mpe_isocountry1.txt b/pages/Page1/queries/Total_record_mpe_isocountry1/Total_record_mpe_isocountry1.txt new file mode 100644 index 0000000..4795dce --- /dev/null +++ b/pages/Page1/queries/Total_record_mpe_isocountry1/Total_record_mpe_isocountry1.txt @@ -0,0 +1 @@ +SELECT COUNT(*) from mpe.isocountry where iso_id ilike '%{{Table1.searchText}}%'; \ No newline at end of file diff --git a/pages/Page1/queries/Total_record_mpe_isocountry1/metadata.json b/pages/Page1/queries/Total_record_mpe_isocountry1/metadata.json new file mode 100644 index 0000000..9d2da2c --- /dev/null +++ b/pages/Page1/queries/Total_record_mpe_isocountry1/metadata.json @@ -0,0 +1,35 @@ +{ + "gitSyncId": "6968b6e8271e5e0befde3194_1daa0af7-bfec-48c0-8a6f-00b33b06722c", + "id": "Page1_Total_record_mpe_isocountry1", + "pluginId": "postgres-plugin", + "pluginType": "DB", + "unpublishedAction": { + "actionConfiguration": { + "body": "SELECT COUNT(*) from mpe.isocountry where iso_id ilike '%{{Table1.searchText}}%';", + "encodeParamsToggle": true, + "paginationType": "NONE", + "pluginSpecifiedTemplates": [ + { + "value": false + } + ], + "timeoutInMillisecond": 10000 + }, + "confirmBeforeExecute": false, + "datasource": { + "id": "xTuple_Sandbox", + "isAutoGenerated": false, + "name": "xTuple_Sandbox", + "pluginId": "postgres-plugin" + }, + "dynamicBindingPathList": [ + { + "key": "body" + } + ], + "name": "Total_record_mpe_isocountry1", + "pageId": "Page1", + "runBehaviour": "AUTOMATIC", + "userSetOnLoad": false + } +} \ No newline at end of file diff --git a/pages/Page1/queries/Update_mpe_isocountry1/Update_mpe_isocountry1.txt b/pages/Page1/queries/Update_mpe_isocountry1/Update_mpe_isocountry1.txt new file mode 100644 index 0000000..edf112a --- /dev/null +++ b/pages/Page1/queries/Update_mpe_isocountry1/Update_mpe_isocountry1.txt @@ -0,0 +1 @@ +UPDATE mpe.isocountry SET "countryname"= '{{Table1.updatedRow.countryname}}', "continent"= '{{Table1.updatedRow.continent}}' WHERE "iso_id"= {{Table1.updatedRow.iso_id}}; \ No newline at end of file diff --git a/pages/Page1/queries/Update_mpe_isocountry1/metadata.json b/pages/Page1/queries/Update_mpe_isocountry1/metadata.json new file mode 100644 index 0000000..d7d469f --- /dev/null +++ b/pages/Page1/queries/Update_mpe_isocountry1/metadata.json @@ -0,0 +1,35 @@ +{ + "gitSyncId": "6968b6e8271e5e0befde3194_966f24b4-0187-44b9-ae1b-91384ed62a26", + "id": "Page1_Update_mpe_isocountry1", + "pluginId": "postgres-plugin", + "pluginType": "DB", + "unpublishedAction": { + "actionConfiguration": { + "body": "UPDATE mpe.isocountry SET \"countryname\"= '{{Table1.updatedRow.countryname}}', \"continent\"= '{{Table1.updatedRow.continent}}' WHERE \"iso_id\"= {{Table1.updatedRow.iso_id}};", + "encodeParamsToggle": true, + "paginationType": "NONE", + "pluginSpecifiedTemplates": [ + { + "value": false + } + ], + "timeoutInMillisecond": 10000 + }, + "confirmBeforeExecute": false, + "datasource": { + "id": "xTuple_Sandbox", + "isAutoGenerated": false, + "name": "xTuple_Sandbox", + "pluginId": "postgres-plugin" + }, + "dynamicBindingPathList": [ + { + "key": "body" + } + ], + "name": "Update_mpe_isocountry1", + "pageId": "Page1", + "runBehaviour": "MANUAL", + "userSetOnLoad": false + } +} \ No newline at end of file diff --git a/pages/Page1/widgets/Table1.json b/pages/Page1/widgets/Table1.json new file mode 100644 index 0000000..fb005b6 --- /dev/null +++ b/pages/Page1/widgets/Table1.json @@ -0,0 +1,303 @@ +{ + "accentColor": "{{appsmith.theme.colors.primaryColor}}", + "allowAddNewRow": true, + "animateLoading": true, + "borderColor": "#E0DEDE", + "borderRadius": "{{appsmith.theme.borderRadius.appBorderRadius}}", + "borderWidth": "1", + "bottomRow": 52, + "boxShadow": "{{appsmith.theme.boxShadow.appBoxShadow}}", + "cachedTableData": {}, + "canFreezeColumn": true, + "childStylesheet": { + "button": { + "borderRadius": "{{appsmith.theme.borderRadius.appBorderRadius}}", + "boxShadow": "none", + "buttonColor": "{{appsmith.theme.colors.primaryColor}}" + }, + "editActions": { + "discardBorderRadius": "{{appsmith.theme.borderRadius.appBorderRadius}}", + "discardButtonColor": "{{appsmith.theme.colors.primaryColor}}", + "saveBorderRadius": "{{appsmith.theme.borderRadius.appBorderRadius}}", + "saveButtonColor": "{{appsmith.theme.colors.primaryColor}}" + }, + "iconButton": { + "borderRadius": "{{appsmith.theme.borderRadius.appBorderRadius}}", + "boxShadow": "none", + "buttonColor": "{{appsmith.theme.colors.primaryColor}}" + }, + "menuButton": { + "borderRadius": "{{appsmith.theme.borderRadius.appBorderRadius}}", + "boxShadow": "none", + "menuColor": "{{appsmith.theme.colors.primaryColor}}" + } + }, + "columnOrder": [ + "iso_id", + "countryname", + "continent", + "EditActions1" + ], + "columnUpdatedAt": 1768470523594, + "columnWidthMap": {}, + "customIsLoading": false, + "customIsLoadingValue": "", + "defaultPageSize": 0, + "defaultSelectedRowIndex": 0, + "defaultSelectedRowIndices": [ + 0 + ], + "delimiter": ",", + "dynamicBindingPathList": [ + { + "key": "accentColor" + }, + { + "key": "borderRadius" + }, + { + "key": "boxShadow" + }, + { + "key": "tableData" + }, + { + "key": "totalRecordsCount" + }, + { + "key": "primaryColumns.iso_id.computedValue" + }, + { + "key": "primaryColumns.countryname.computedValue" + }, + { + "key": "primaryColumns.continent.computedValue" + }, + { + "key": "primaryColumns.EditActions1.saveButtonColor" + }, + { + "key": "primaryColumns.EditActions1.saveBorderRadius" + }, + { + "key": "primaryColumns.EditActions1.discardBorderRadius" + }, + { + "key": "primaryColumns.EditActions1.isSaveDisabled" + }, + { + "key": "primaryColumns.EditActions1.isDiscardDisabled" + } + ], + "dynamicPropertyPathList": [ + { + "key": "tableData" + }, + { + "key": "primaryColumns.EditActions1.isSaveDisabled" + }, + { + "key": "primaryColumns.EditActions1.isDiscardDisabled" + } + ], + "dynamicTriggerPathList": [ + { + "key": "onPageChange" + }, + { + "key": "onSearchTextChanged" + }, + { + "key": "onSort" + }, + { + "key": "onAddNewRowSave" + }, + { + "key": "primaryColumns.EditActions1.onSave" + } + ], + "enableClientSideSearch": false, + "endOfData": false, + "flexVerticalAlignment": "start", + "horizontalAlignment": "LEFT", + "inlineEditingSaveOption": "ROW_LEVEL", + "isLoading": false, + "isSortable": true, + "isVisible": true, + "isVisibleDownload": false, + "isVisibleFilters": false, + "isVisiblePagination": true, + "isVisibleSearch": true, + "key": "0c6xqzrpky", + "label": "Data", + "leftColumn": 2, + "minWidth": 450, + "mobileBottomRow": 36, + "mobileLeftColumn": 2, + "mobileRightColumn": 36, + "mobileTopRow": 8, + "needsErrorInfo": false, + "onAddNewRowSave": "{{Insert_mpe_isocountry1.run(() => {\n showAlert(\"Successfully created!\");\n Select_mpe_isocountry1.run()\n }, () => {\n showAlert(\"Unable to create!\");\n })}}", + "onPageChange": "{{\n Select_mpe_isocountry1.run();\n Total_record_mpe_isocountry1.run()\n }}", + "onSearchTextChanged": "{{\n Select_mpe_isocountry1.run();\n Total_record_mpe_isocountry1.run()\n }}", + "onSort": "{{\n Select_mpe_isocountry1.run();\n Total_record_mpe_isocountry1.run()\n }}", + "parentColumnSpace": 25.484375, + "parentId": "0", + "parentRowSpace": 10, + "primaryColumnId": "iso_id", + "primaryColumns": { + "EditActions1": { + "alias": "EditActions1", + "allowCellWrapping": false, + "allowSameOptionsInNewRow": true, + "buttonStyle": "rgb(3, 179, 101)", + "columnType": "editActions", + "computedValue": "", + "currencyCode": "USD", + "decimals": 0, + "discardActionLabel": "Discard", + "discardBorderRadius": "{{Table1.processedTableData.map((currentRow, currentIndex) => ( (appsmith.theme.borderRadius.appBorderRadius)))}}", + "discardButtonColor": "#F22B2B", + "discardButtonVariant": "TERTIARY", + "discardIconAlign": "left", + "enableFilter": true, + "enableSort": true, + "horizontalAlignment": "LEFT", + "id": "EditActions1", + "index": 3, + "isCellEditable": false, + "isCellVisible": true, + "isDerived": true, + "isDisabled": false, + "isDiscardDisabled": "{{Table1.processedTableData.map((currentRow, currentIndex) => ( !Table1.updatedRowIndices.includes(currentIndex)))}}", + "isDiscardVisible": true, + "isEditable": false, + "isSaveDisabled": "{{Table1.processedTableData.map((currentRow, currentIndex) => ( !Table1.updatedRowIndices.includes(currentIndex)))}}", + "isSaveVisible": true, + "isVisible": true, + "label": "Save / Discard", + "notation": "standard", + "onSave": "{{Update_mpe_isocountry1.run(() => {\n showAlert(\"Successfully saved!\");\n Select_mpe_isocountry1.run()\n }, () => {\n showAlert(\"Unable to save!\");\n })}}", + "originalId": "EditActions1", + "saveActionLabel": "Save", + "saveBorderRadius": "{{Table1.processedTableData.map((currentRow, currentIndex) => ( (appsmith.theme.borderRadius.appBorderRadius)))}}", + "saveButtonColor": "{{Table1.processedTableData.map((currentRow, currentIndex) => ( (appsmith.theme.colors.primaryColor)))}}", + "saveIconAlign": "left", + "sticky": "right", + "textSize": "0.875rem", + "thousandSeparator": true, + "validation": {}, + "verticalAlignment": "CENTER", + "width": 150 + }, + "continent": { + "alias": "continent", + "allowCellWrapping": false, + "allowSameOptionsInNewRow": true, + "columnType": "text", + "computedValue": "{{(() => { const tableData = Table1.processedTableData || []; return tableData.length > 0 ? tableData.map((currentRow, currentIndex) => (currentRow[\"continent\"])) : continent })()}}", + "currencyCode": "USD", + "decimals": 0, + "enableFilter": true, + "enableSort": true, + "horizontalAlignment": "LEFT", + "id": "continent", + "index": 2, + "isCellEditable": true, + "isCellVisible": true, + "isDerived": false, + "isDisabled": false, + "isDiscardVisible": true, + "isEditable": true, + "isSaveVisible": true, + "isVisible": true, + "label": "continent", + "notation": "standard", + "originalId": "continent", + "sticky": "", + "textSize": "0.875rem", + "thousandSeparator": true, + "validation": {}, + "verticalAlignment": "CENTER", + "width": 150 + }, + "countryname": { + "alias": "countryname", + "allowCellWrapping": false, + "allowSameOptionsInNewRow": true, + "columnType": "text", + "computedValue": "{{(() => { const tableData = Table1.processedTableData || []; return tableData.length > 0 ? tableData.map((currentRow, currentIndex) => (currentRow[\"countryname\"])) : countryname })()}}", + "currencyCode": "USD", + "decimals": 0, + "enableFilter": true, + "enableSort": true, + "horizontalAlignment": "LEFT", + "id": "countryname", + "index": 1, + "isCellEditable": true, + "isCellVisible": true, + "isDerived": false, + "isDisabled": false, + "isDiscardVisible": true, + "isEditable": true, + "isSaveVisible": true, + "isVisible": true, + "label": "countryname", + "notation": "standard", + "originalId": "countryname", + "sticky": "", + "textSize": "0.875rem", + "thousandSeparator": true, + "validation": {}, + "verticalAlignment": "CENTER", + "width": 150 + }, + "iso_id": { + "alias": "iso_id", + "allowCellWrapping": false, + "allowSameOptionsInNewRow": true, + "columnType": "text", + "computedValue": "{{(() => { const tableData = Table1.processedTableData || []; return tableData.length > 0 ? tableData.map((currentRow, currentIndex) => (currentRow[\"iso_id\"])) : iso_id })()}}", + "currencyCode": "USD", + "decimals": 0, + "enableFilter": true, + "enableSort": true, + "horizontalAlignment": "LEFT", + "id": "iso_id", + "index": 0, + "isCellEditable": false, + "isCellVisible": true, + "isDerived": false, + "isDisabled": false, + "isDiscardVisible": true, + "isEditable": false, + "isSaveVisible": true, + "isVisible": true, + "label": "iso_id", + "notation": "standard", + "originalId": "iso_id", + "sticky": "", + "textSize": "0.875rem", + "thousandSeparator": true, + "validation": {}, + "verticalAlignment": "CENTER", + "width": 150 + } + }, + "renderMode": "CANVAS", + "responsiveBehavior": "fill", + "rightColumn": 63, + "searchKey": "", + "serverSidePaginationEnabled": true, + "showInlineEditingOptionDropdown": true, + "tableData": "{{Select_mpe_isocountry1.data}}", + "textSize": "0.875rem", + "topRow": 8, + "totalRecordsCount": "{{Total_record_mpe_isocountry1.data[0].count}}", + "type": "TABLE_WIDGET_V2", + "version": 2, + "verticalAlignment": "CENTER", + "widgetId": "tjhvizl6e1", + "widgetName": "Table1" +} \ No newline at end of file