diff --git a/apps/vue/src/components/Abp/LocalizableInput/LocalizableInput.vue b/apps/vue/src/components/Abp/LocalizableInput/LocalizableInput.vue
index 64798b8cd..2761ad6d0 100644
--- a/apps/vue/src/components/Abp/LocalizableInput/LocalizableInput.vue
+++ b/apps/vue/src/components/Abp/LocalizableInput/LocalizableInput.vue
@@ -2,7 +2,7 @@
-
+
@@ -73,10 +79,18 @@
import { GetListAsyncByInput as getGroupDefinitions } from '/@/api/webhooks/definitions/groups';
import { WebhookGroupDefinitionDto } from '/@/api/webhooks/definitions/groups/model';
import { GetListAsyncByInput, DeleteAsyncByName } from '/@/api/webhooks/definitions/webhooks';
+ import { WebhookDefinitionDto } from '/@/api/webhooks/definitions/webhooks/model';
import { getSearchFormSchemas } from '../datas/ModalData';
+ import { groupBy } from '/@/utils/array';
+ import { sorter } from '/@/utils/table';
import WebhookDefinitionModal from './WebhookDefinitionModal.vue';
const FormItem = Form.Item;
+ interface WebhookGroup {
+ name: string;
+ displayName: string;
+ webhooks: WebhookDefinitionDto[];
+ }
interface State {
groups: WebhookGroupDefinitionDto[],
}
@@ -88,7 +102,16 @@
const [registerTable, { setLoading, getForm, setTableData }] = useTable({
rowKey: 'name',
title: L('WebhookDefinitions'),
- columns: getDataColumns(),
+ columns: [
+ {
+ title: L('DisplayName:DisplayName'),
+ dataIndex: 'displayName',
+ align: 'left',
+ width: 180,
+ resizable: true,
+ sorter: (a, b) => sorter(a, b, 'displayName'),
+ },
+ ],
pagination: true,
striped: false,
useSearchForm: true,
@@ -105,8 +128,18 @@
bordered: true,
canResize: true,
immediate: false,
+ });
+ const [registerSubTable] = useTable({
+ rowKey: 'name',
+ columns: getDataColumns(),
+ pagination: false,
+ striped: false,
+ useSearchForm: false,
+ showIndexColumn: true,
+ immediate: false,
+ scroll: { x: 2000, y: 900 },
actionColumn: {
- width: 120,
+ width: 150,
title: L('Actions'),
dataIndex: 'action',
},
@@ -151,7 +184,18 @@
setTableData([]);
var input = form.getFieldsValue();
GetListAsyncByInput(input).then((res) => {
- setTableData(res.items);
+ const webhookGroup = groupBy(res.items, 'groupName');
+ const webhookGroupData: WebhookGroup[] = [];
+ Object.keys(webhookGroup).forEach((gk) => {
+ const groupData: WebhookGroup = {
+ name: gk,
+ displayName: gk,
+ webhooks: [],
+ };
+ groupData.webhooks.push(...webhookGroup[gk]);
+ webhookGroupData.push(groupData);
+ });
+ setTableData(webhookGroupData);
}).finally(() => {
setLoading(false);
});
diff --git a/apps/vue/src/views/webhooks/definitions/webhooks/datas/ModalData.ts b/apps/vue/src/views/webhooks/definitions/webhooks/datas/ModalData.ts
index f069872fb..562a4301e 100644
--- a/apps/vue/src/views/webhooks/definitions/webhooks/datas/ModalData.ts
+++ b/apps/vue/src/views/webhooks/definitions/webhooks/datas/ModalData.ts
@@ -8,7 +8,7 @@ export function getSearchFormSchemas():FormSchema[] {
{
field: 'groupName',
component: 'ApiSelect',
- label: L('DisplayName:Providers'),
+ label: L('DisplayName:GroupName'),
colProps: { span: 6 },
slot: 'groupName',
},
diff --git a/apps/vue/src/views/webhooks/definitions/webhooks/datas/TableData.ts b/apps/vue/src/views/webhooks/definitions/webhooks/datas/TableData.ts
index 583eb623f..5007ef38c 100644
--- a/apps/vue/src/views/webhooks/definitions/webhooks/datas/TableData.ts
+++ b/apps/vue/src/views/webhooks/definitions/webhooks/datas/TableData.ts
@@ -14,14 +14,6 @@ export function getDataColumns(): BasicColumn[] {
resizable: true,
sorter: (a, b) => sorter(a, b, 'isEnabled'),
},
- {
- title: L('DisplayName:GroupName'),
- dataIndex: 'groupName',
- align: 'left',
- width: 150,
- resizable: true,
- sorter: (a, b) => sorter(a, b, 'groupName'),
- },
{
title: L('DisplayName:Name'),
dataIndex: 'name',