Skip to content

Commit 14e8379

Browse files
authored
Merge pull request #787 from colinin/rel-7.0.2
upgrade: upgrade abp framework to 7.0.2
2 parents 0f2d9a4 + 646845c commit 14e8379

116 files changed

Lines changed: 3851 additions & 752 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: "Tagged Release"
22

33
on:
44
push:
5-
branches: [ master ]
5+
branches: [ rel-7.0.2 ]
66

77
jobs:
88
tagged-release:
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
import { defAbpHttp } from '/@/utils/http/abp';
2+
import {
3+
TextTemplateContentDto,
4+
TextTemplateContentGetInput,
5+
TextTemplateRestoreInput,
6+
TextTemplateContentUpdateDto
7+
} from './model';
8+
9+
const remoteServiceName = 'AbpTextTemplating';
10+
const controllerName = 'TextTemplate';
11+
12+
export const GetAsyncByInput = (input: TextTemplateContentGetInput) => {
13+
return defAbpHttp.request<TextTemplateContentDto>({
14+
service: remoteServiceName,
15+
controller: controllerName,
16+
action: 'GetAsync',
17+
uniqueName: 'GetAsyncByInput',
18+
params: input,
19+
});
20+
};
21+
22+
export const RestoreToDefaultAsyncByNameAndInput = (name: string, input: TextTemplateRestoreInput) => {
23+
return defAbpHttp.request<void>({
24+
service: remoteServiceName,
25+
controller: controllerName,
26+
action: 'RestoreToDefaultAsync',
27+
uniqueName: 'RestoreToDefaultAsyncByNameAndInput',
28+
params: {
29+
name: name,
30+
},
31+
data: input,
32+
});
33+
};
34+
35+
export const UpdateAsyncByNameAndInput = (name: string, input: TextTemplateContentUpdateDto) => {
36+
return defAbpHttp.request<TextTemplateContentDto>({
37+
service: remoteServiceName,
38+
controller: controllerName,
39+
action: 'UpdateAsync',
40+
uniqueName: 'UpdateAsyncByNameAndInput',
41+
params: {
42+
name: name,
43+
},
44+
data: input,
45+
});
46+
};
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
export interface TextTemplateContentDto {
2+
name: string;
3+
content?: string;
4+
culture?: string;
5+
}
6+
7+
export interface TextTemplateContentGetInput {
8+
name: string;
9+
culture?: string;
10+
}
11+
12+
export interface TextTemplateRestoreInput {
13+
culture?: string;
14+
}
15+
16+
export interface TextTemplateContentUpdateDto {
17+
culture?: string;
18+
content: string;
19+
}
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
import { defAbpHttp } from '/@/utils/http/abp';
2+
import {
3+
TextTemplateDefinitionDto,
4+
TextTemplateDefinitionCreateDto,
5+
TextTemplateDefinitionUpdateDto,
6+
TextTemplateDefinitionGetListInput
7+
} from './model';
8+
9+
const remoteServiceName = 'AbpTextTemplating';
10+
const controllerName = 'TextTemplateDefinition';
11+
12+
export const CreateAsyncByInput = (input: TextTemplateDefinitionCreateDto) => {
13+
return defAbpHttp.request<TextTemplateDefinitionDto>({
14+
service: remoteServiceName,
15+
controller: controllerName,
16+
action: 'CreateAsync',
17+
uniqueName: 'CreateAsyncByInput',
18+
params: input,
19+
});
20+
};
21+
22+
export const DeleteAsyncByName = (name: string) => {
23+
return defAbpHttp.request<void>({
24+
service: remoteServiceName,
25+
controller: controllerName,
26+
action: 'DeleteAsync',
27+
uniqueName: 'DeleteAsyncByName',
28+
params: {
29+
name: name,
30+
},
31+
});
32+
};
33+
34+
export const GetByNameAsyncByName = (name: string) => {
35+
return defAbpHttp.request<TextTemplateDefinitionDto>({
36+
service: remoteServiceName,
37+
controller: controllerName,
38+
action: 'GetByNameAsync',
39+
uniqueName: 'GetByNameAsyncByName',
40+
params: {
41+
name: name,
42+
},
43+
});
44+
};
45+
46+
export const GetListAsyncByInput = (input: TextTemplateDefinitionGetListInput) => {
47+
return defAbpHttp.request<PagedResultDto<TextTemplateDefinitionDto>>({
48+
service: remoteServiceName,
49+
controller: controllerName,
50+
action: 'GetListAsync',
51+
uniqueName: 'GetListAsyncByInput',
52+
params: input,
53+
});
54+
};
55+
56+
export const UpdateAsyncByNameAndInput = (name: string, input: TextTemplateDefinitionUpdateDto) => {
57+
return defAbpHttp.request<TextTemplateDefinitionDto>({
58+
service: remoteServiceName,
59+
controller: controllerName,
60+
action: 'UpdateAsync',
61+
uniqueName: 'UpdateAsyncByNameAndInput',
62+
params: {
63+
name: name,
64+
},
65+
data: input,
66+
});
67+
};
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
export interface TextTemplateDefinitionDto {
2+
name: string;
3+
displayName: string;
4+
defaultCultureName?: string;
5+
isInlineLocalized: boolean;
6+
isLayout: boolean;
7+
layout: string;
8+
isStatic: boolean;
9+
renderEngine?: string;
10+
}
11+
12+
interface TextTemplateDefinitionCreateOrUpdateDto {
13+
displayName: string;
14+
defaultCultureName?: string;
15+
isInlineLocalized: boolean;
16+
isLayout: boolean;
17+
layout: string;
18+
isStatic: boolean;
19+
renderEngine?: string;
20+
}
21+
22+
export interface TextTemplateDefinitionCreateDto extends TextTemplateDefinitionCreateOrUpdateDto {
23+
name: string;
24+
}
25+
26+
export interface TextTemplateDefinitionUpdateDto extends TextTemplateDefinitionCreateOrUpdateDto, IHasConcurrencyStamp { }
27+
28+
export interface TextTemplateDefinitionGetListInput extends PagedAndSortedResultRequestDto {
29+
filter?: string;
30+
}

apps/vue/src/api/text-templating/templates/index.ts

Lines changed: 0 additions & 63 deletions
This file was deleted.

apps/vue/src/api/text-templating/templates/model/index.ts

Lines changed: 0 additions & 34 deletions
This file was deleted.

apps/vue/src/views/text-templating/templates/components/TemplateContentCultureModal.vue

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,15 @@
2323
import { BasicModal, useModalInner } from '/@/components/Modal';
2424
import { useMessage } from '/@/hooks/web/useMessage';
2525
import { useLocalization } from '/@/hooks/abp/useLocalization';
26-
import { TextTemplateDefinition } from '/@/api/text-templating/templates/model';
27-
import { getContent, restoreToDefault, update } from '/@/api/text-templating/templates';
26+
import { TextTemplateDefinitionDto } from '/@/api/text-templating/definitions/model';
27+
import { GetAsyncByInput, RestoreToDefaultAsyncByNameAndInput, UpdateAsyncByNameAndInput } from '/@/api/text-templating/contents';
2828
import { useAbpStoreWithOut } from '/@/store/modules/abp';
2929
3030
const abpStore = useAbpStoreWithOut();
3131
const { L } = useLocalization('AbpTextTemplating');
3232
const { createConfirm, createMessage } = useMessage();
3333
const { localization } = abpStore.getApplication;
34-
const textTemplateRef = ref<TextTemplateDefinition>();
34+
const textTemplateRef = ref<TextTemplateDefinitionDto>();
3535
const buttonEnabled = computed(() => {
3636
const textTemplate = unref(textTemplateRef);
3737
if (textTemplate && textTemplate.name) {
@@ -118,7 +118,7 @@
118118
});
119119
120120
function fetchDefaultContent(name: string) {
121-
getContent({
121+
GetAsyncByInput({
122122
name: name,
123123
culture: localization.currentCulture.name,
124124
}).then((res) => {
@@ -130,7 +130,7 @@
130130
}
131131
132132
function handleCultureChange(setField: string, selectedValue: string) {
133-
getContent({
133+
GetAsyncByInput({
134134
name: textTemplateRef.value!.name,
135135
culture: selectedValue,
136136
}).then((res) => {
@@ -150,8 +150,7 @@
150150
onOk: () => {
151151
return new Promise((resolve, reject) => {
152152
const textTemplate = unref(textTemplateRef);
153-
restoreToDefault({
154-
name: textTemplate!.name,
153+
RestoreToDefaultAsyncByNameAndInput(textTemplate!.name, {
155154
culture: input.baseCultureName,
156155
}).then(() => {
157156
createMessage.success(L('TemplateContentRestoredToDefault'));
@@ -170,8 +169,7 @@
170169
validateFields(['targetCultureName', 'targetContent']).then((input) => {
171170
changeOkLoading(true);
172171
const textTemplate = unref(textTemplateRef);
173-
update({
174-
name: textTemplate!.name,
172+
UpdateAsyncByNameAndInput(textTemplate!.name, {
175173
culture: input.targetCultureName,
176174
content: input.targetContent,
177175
}).then(() => {

apps/vue/src/views/text-templating/templates/components/TemplateContentModal.vue

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,13 @@
3333
import { BasicModal, useModal, useModalInner } from '/@/components/Modal';
3434
import { useMessage } from '/@/hooks/web/useMessage';
3535
import { useLocalization } from '/@/hooks/abp/useLocalization';
36-
import { TextTemplateDefinition } from '/@/api/text-templating/templates/model';
37-
import { getContent, restoreToDefault, update } from '/@/api/text-templating/templates';
36+
import { TextTemplateDefinitionDto } from '/@/api/text-templating/definitions/model';
37+
import { GetAsyncByInput, RestoreToDefaultAsyncByNameAndInput, UpdateAsyncByNameAndInput } from '/@/api/text-templating/contents';
3838
import TemplateContentCultureModal from './TemplateContentCultureModal.vue';
3939
4040
const { L } = useLocalization('AbpTextTemplating');
4141
const { createConfirm, createMessage } = useMessage();
42-
const textTemplateRef = ref<TextTemplateDefinition>();
42+
const textTemplateRef = ref<TextTemplateDefinitionDto>();
4343
const buttonEnabled = computed(() => {
4444
const textTemplate = unref(textTemplateRef);
4545
if (textTemplate && textTemplate.name) {
@@ -85,7 +85,7 @@
8585
const [registerCultureModal, { openModal: openCultureModal }] = useModal();
8686
8787
function fetchContent(name: string) {
88-
getContent({
88+
GetAsyncByInput({
8989
name: name,
9090
}).then((res) => {
9191
setFieldsValue(res);
@@ -104,7 +104,7 @@
104104
onOk: () => {
105105
return new Promise((resolve, reject) => {
106106
const textTemplate = unref(textTemplateRef);
107-
restoreToDefault({ name: textTemplate!.name }).then(() => {
107+
RestoreToDefaultAsyncByNameAndInput(textTemplate!.name, { }).then(() => {
108108
createMessage.success(L('TemplateContentRestoredToDefault'));
109109
fetchContent(textTemplate!.name);
110110
return resolve(textTemplate!.name);
@@ -120,8 +120,7 @@
120120
validate().then((input) => {
121121
changeOkLoading(true);
122122
const textTemplate = unref(textTemplateRef);
123-
update({
124-
name: textTemplate!.name,
123+
UpdateAsyncByNameAndInput(textTemplate!.name, {
125124
content: input.content,
126125
}).then(() => {
127126
createMessage.success(L('TemplateContentUpdated'));

0 commit comments

Comments
 (0)