diff --git a/apps/vue/src/views/saas/editions/components/EditionTable.vue b/apps/vue/src/views/saas/editions/components/EditionTable.vue index a618ac927..7c7788df6 100644 --- a/apps/vue/src/views/saas/editions/components/EditionTable.vue +++ b/apps/vue/src/views/saas/editions/components/EditionTable.vue @@ -62,7 +62,7 @@ const { registerModal: registerFeatureModal, handleManageFeature } = useFeatureModal(); const [registerTable, { reload }] = useTable({ rowKey: 'id', - title: L('Tenants'), + title: L('Editions'), columns: getDataColumns(), api: getList, beforeFetch: formatPagedRequest, diff --git a/apps/vue/src/views/saas/tenant/datas/ModalData.ts b/apps/vue/src/views/saas/tenant/datas/ModalData.ts index a44336188..370f591f2 100644 --- a/apps/vue/src/views/saas/tenant/datas/ModalData.ts +++ b/apps/vue/src/views/saas/tenant/datas/ModalData.ts @@ -1,5 +1,6 @@ import { useLocalization } from '/@/hooks/abp/useLocalization'; import { FormProps, FormSchema } from '/@/components/Form'; +import { getList as getEditions } from '/@/api/saas/editions'; const { L } = useLocalization('AbpSaas'); @@ -48,6 +49,22 @@ export function getModalFormSchemas(): FormSchema[] { colProps: { span: 24 }, required: true, }, + { + field: 'editionId', + component: 'ApiSelect', + label: L('DisplayName:EditionName'), + colProps: { span: 24 }, + componentProps: { + api: getEditions, + params: { + skipCount: 0, + maxResultCount: 100, + }, + resultField: 'items', + labelField: 'displayName', + valueField: 'id', + }, + }, { field: 'enableTime', component: 'DatePicker', diff --git a/aspnet-core/modules/saas/LINGYUN.Abp.Saas.Application/LINGYUN/Abp/Saas/Tenants/TenantAppService.cs b/aspnet-core/modules/saas/LINGYUN.Abp.Saas.Application/LINGYUN/Abp/Saas/Tenants/TenantAppService.cs index 452d10b86..8527ab6c3 100644 --- a/aspnet-core/modules/saas/LINGYUN.Abp.Saas.Application/LINGYUN/Abp/Saas/Tenants/TenantAppService.cs +++ b/aspnet-core/modules/saas/LINGYUN.Abp.Saas.Application/LINGYUN/Abp/Saas/Tenants/TenantAppService.cs @@ -99,6 +99,8 @@ public class TenantAppService : AbpSaasAppServiceBase, ITenantAppService await EventBus.PublishAsync(createEventData); }); + await CurrentUnitOfWork.SaveChangesAsync(); + return ObjectMapper.Map(tenant); } @@ -120,6 +122,8 @@ public class TenantAppService : AbpSaasAppServiceBase, ITenantAppService input.MapExtraPropertiesTo(tenant); await TenantRepository.UpdateAsync(tenant); + await CurrentUnitOfWork.SaveChangesAsync(); + return ObjectMapper.Map(tenant); } @@ -132,6 +136,8 @@ public class TenantAppService : AbpSaasAppServiceBase, ITenantAppService return; } await TenantRepository.DeleteAsync(tenant); + + await CurrentUnitOfWork.SaveChangesAsync(); } [Authorize(AbpSaasPermissions.Tenants.ManageConnectionStrings)] @@ -177,6 +183,10 @@ public class TenantAppService : AbpSaasAppServiceBase, ITenantAppService } tenant.SetConnectionString(input.Name, input.Value); + await TenantRepository.UpdateAsync(tenant); + + await CurrentUnitOfWork.SaveChangesAsync(); + return new TenantConnectionStringDto { Name = input.Name, @@ -204,5 +214,7 @@ public class TenantAppService : AbpSaasAppServiceBase, ITenantAppService }); await TenantRepository.UpdateAsync(tenant); + + await CurrentUnitOfWork.SaveChangesAsync(); } }