@tager/admin-blog 0.3.41 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/constants/paths.d.ts +6 -14
- package/dist/constants/routes.d.ts +5 -5
- package/dist/dev/App.vue.d.ts +5 -0
- package/dist/dev/config.d.ts +2 -0
- package/dist/dev/env.d.ts +1 -0
- package/dist/dev/main.d.ts +3 -0
- package/dist/hooks/index.d.ts +4 -4
- package/dist/hooks/useFetchCategories.d.ts +3 -6
- package/dist/hooks/useFetchCategory.d.ts +7 -8
- package/dist/hooks/useFetchModuleConfig.d.ts +3 -6
- package/dist/hooks/useFetchPosts.d.ts +3 -6
- package/dist/index.mjs +2363 -0
- package/dist/locales/apply.d.ts +1 -0
- package/dist/locales/en.d.ts +87 -80
- package/dist/locales/ru.d.ts +3 -3
- package/dist/main.d.ts +3 -4
- package/dist/services/requests.d.ts +59 -57
- package/dist/style.css +1 -0
- package/dist/typings/common.d.ts +1 -1
- package/dist/typings/model.d.ts +106 -104
- package/dist/utils/common.d.ts +2 -2
- package/dist/utils/paths.d.ts +8 -0
- package/dist/views/Categories/CategoryForm/CategoryForm.helpers.d.ts +7 -7
- package/dist/views/Categories/CategoryForm/CategoryForm.vue.d.ts +53 -116
- package/dist/views/Categories/CategoryForm/index.d.ts +1 -1
- package/dist/views/Categories/CategoryList/CategoryList.helpers.d.ts +7 -7
- package/dist/views/Categories/CategoryList/CategoryList.vue.d.ts +26 -57
- package/dist/views/Categories/CategoryList/hooks/index.d.ts +1 -1
- package/dist/views/Categories/CategoryList/hooks/useAdvancedSearch.d.ts +19 -16
- package/dist/views/Categories/CategoryList/index.d.ts +1 -1
- package/dist/views/Posts/PostForm/PostForm.helpers.d.ts +32 -30
- package/dist/views/Posts/PostForm/PostForm.vue.d.ts +2768 -9394
- package/dist/views/Posts/PostForm/components/TabList/TabList.types.d.ts +5 -5
- package/dist/views/Posts/PostForm/components/TabList/TabList.vue.d.ts +23 -0
- package/dist/views/Posts/PostForm/components/TabList/index.d.ts +2 -2
- package/dist/views/Posts/PostForm/index.d.ts +1 -1
- package/dist/views/Posts/PostList/PostList.helpers.d.ts +7 -7
- package/dist/views/Posts/PostList/PostList.vue.d.ts +38 -71
- package/dist/views/Posts/PostList/hooks/index.d.ts +1 -1
- package/dist/views/Posts/PostList/hooks/useAdvancedSearch.d.ts +27 -24
- package/dist/views/Posts/PostList/index.d.ts +1 -1
- package/package.json +51 -49
- package/src/constants/paths.ts +0 -22
- package/src/constants/routes.ts +9 -9
- package/src/dev/App.vue +56 -0
- package/src/dev/config.ts +23 -0
- package/src/dev/env.ts +17 -0
- package/src/dev/main.ts +49 -0
- package/src/hooks/useFetchCategories.ts +2 -7
- package/src/hooks/useFetchCategory.ts +3 -6
- package/src/hooks/useFetchModuleConfig.ts +2 -7
- package/src/hooks/useFetchPosts.ts +2 -5
- package/src/locales/apply.ts +9 -0
- package/src/locales/en.ts +10 -3
- package/src/locales/ru.ts +11 -2
- package/src/main.ts +3 -8
- package/src/services/requests.ts +2 -0
- package/src/typings/model.ts +2 -0
- package/src/utils/paths.ts +23 -0
- package/src/views/Categories/CategoryForm/CategoryForm.vue +81 -61
- package/src/views/Categories/CategoryList/CategoryList.helpers.ts +1 -1
- package/src/views/Categories/CategoryList/CategoryList.vue +86 -58
- package/src/views/Categories/CategoryList/hooks/useAdvancedSearch.ts +9 -12
- package/src/views/Posts/PostForm/PostForm.helpers.ts +15 -7
- package/src/views/Posts/PostForm/PostForm.vue +191 -112
- package/src/views/Posts/PostForm/components/TabList/TabList.vue +2 -2
- package/src/views/Posts/PostList/PostList.helpers.ts +9 -10
- package/src/views/Posts/PostList/PostList.vue +138 -105
- package/src/views/Posts/PostList/hooks/useAdvancedSearch.ts +22 -30
- package/CHANGELOG.md +0 -13
- package/dist/constants/menu.d.ts +0 -5
- package/dist/dev.d.ts +0 -1
- package/dist/index.esm.js +0 -5144
- package/dist/index.umd.js +0 -5171
- package/dist/router/index.d.ts +0 -4
- package/src/constants/menu.ts +0 -31
- package/src/dev.ts +0 -34
- package/src/router/index.ts +0 -40
- package/src/typings/sfc.d.ts +0 -12
- package/src/typings/shims-tsx.d.ts +0 -13
- package/src/typings/shims-vue.d.ts +0 -11
- package/src/typings/translate.d.ts +0 -10
- package/src/views/App.vue +0 -22
- package/src/views/Home.vue +0 -31
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
3
|
-
:title="$t('blog:blogCategories')"
|
|
2
|
+
<Page
|
|
3
|
+
:title="$i18n.t('blog:blogCategories')"
|
|
4
4
|
:header-buttons="[
|
|
5
5
|
{
|
|
6
|
-
text: $t('blog:newCategory'),
|
|
6
|
+
text: $i18n.t('blog:newCategory'),
|
|
7
7
|
href: getBlogCategoryFormUrl({ categoryId: 'create' }),
|
|
8
8
|
},
|
|
9
9
|
]"
|
|
10
10
|
>
|
|
11
|
-
<template
|
|
12
|
-
<
|
|
11
|
+
<template #content>
|
|
12
|
+
<DataTable
|
|
13
13
|
:column-defs="columnDefs"
|
|
14
14
|
:row-data="rowData"
|
|
15
15
|
:loading="isRowDataLoading"
|
|
@@ -24,88 +24,102 @@
|
|
|
24
24
|
data-table="blog-category"
|
|
25
25
|
@change="handleChange"
|
|
26
26
|
>
|
|
27
|
-
<template v-if="isLangSpecific"
|
|
28
|
-
<
|
|
27
|
+
<template v-if="isLangSpecific" #filters>
|
|
28
|
+
<AdvancedSearch :tags="tags" @click:tag="tagRemovalHandler">
|
|
29
29
|
<div class="filters">
|
|
30
|
-
<
|
|
31
|
-
v-model="languageFilter"
|
|
30
|
+
<FormFieldMultiSelect
|
|
31
|
+
v-model:values="languageFilter"
|
|
32
32
|
:options="languageOptionList"
|
|
33
33
|
name="languageFilter"
|
|
34
34
|
:searchable="true"
|
|
35
|
-
:label="$t('blog:language')"
|
|
35
|
+
:label="$i18n.t('blog:language')"
|
|
36
36
|
class="filter"
|
|
37
37
|
/>
|
|
38
38
|
</div>
|
|
39
|
-
</
|
|
39
|
+
</AdvancedSearch>
|
|
40
40
|
</template>
|
|
41
41
|
|
|
42
|
-
<template
|
|
43
|
-
<
|
|
42
|
+
<template #cell(link-to-posts)="{ row }">
|
|
43
|
+
<CountButton
|
|
44
44
|
:href="getLinkToPostsByCategory(row.id)"
|
|
45
45
|
variant="outline-secondary"
|
|
46
46
|
:count="row.postsCount"
|
|
47
47
|
>
|
|
48
|
-
{{ $t('blog:posts') }}
|
|
49
|
-
</
|
|
48
|
+
{{ $i18n.t('blog:posts') }}
|
|
49
|
+
</CountButton>
|
|
50
50
|
</template>
|
|
51
51
|
|
|
52
|
-
<template
|
|
53
|
-
<
|
|
52
|
+
<template #cell(actions)="{ row, rowIndex }">
|
|
53
|
+
<BaseButton
|
|
54
54
|
variant="icon"
|
|
55
|
-
:title="$t('blog:edit')"
|
|
55
|
+
:title="$i18n.t('blog:edit')"
|
|
56
56
|
:disabled="isDeleting(row.id)"
|
|
57
57
|
:href="getBlogCategoryFormUrl({ categoryId: row.id })"
|
|
58
58
|
>
|
|
59
|
-
<
|
|
60
|
-
</
|
|
59
|
+
<EditIcon />
|
|
60
|
+
</BaseButton>
|
|
61
61
|
|
|
62
|
-
<
|
|
62
|
+
<BaseButton
|
|
63
63
|
variant="icon"
|
|
64
|
-
:title="$t('blog:moveUp')"
|
|
64
|
+
:title="$i18n.t('blog:moveUp')"
|
|
65
65
|
:disabled="rowIndex === 0 || isCategoryMoving"
|
|
66
66
|
@click="startMoveCategory(row.id, 'up')"
|
|
67
67
|
>
|
|
68
|
-
<
|
|
69
|
-
</
|
|
68
|
+
<NorthIcon />
|
|
69
|
+
</BaseButton>
|
|
70
70
|
|
|
71
|
-
<
|
|
71
|
+
<BaseButton
|
|
72
72
|
variant="icon"
|
|
73
|
-
:title="$t('blog:moveDown')"
|
|
73
|
+
:title="$i18n.t('blog:moveDown')"
|
|
74
74
|
:disabled="rowIndex === rowData.length - 1 || isCategoryMoving"
|
|
75
75
|
@click="startMoveCategory(row.id, 'down')"
|
|
76
76
|
>
|
|
77
|
-
<
|
|
78
|
-
</
|
|
77
|
+
<SouthIcon />
|
|
78
|
+
</BaseButton>
|
|
79
79
|
|
|
80
|
-
<
|
|
80
|
+
<BaseButton
|
|
81
81
|
variant="icon"
|
|
82
|
-
:title="$t('blog:remove')"
|
|
82
|
+
:title="$i18n.t('blog:remove')"
|
|
83
83
|
:disabled="isDeleting(row.id) || row.postsCount > 0"
|
|
84
84
|
@click="handleCategoryDelete(row.id)"
|
|
85
85
|
>
|
|
86
|
-
<
|
|
87
|
-
</
|
|
86
|
+
<DeleteIcon />
|
|
87
|
+
</BaseButton>
|
|
88
88
|
</template>
|
|
89
|
-
</
|
|
89
|
+
</DataTable>
|
|
90
90
|
</template>
|
|
91
|
-
</
|
|
91
|
+
</Page>
|
|
92
92
|
</template>
|
|
93
93
|
|
|
94
94
|
<script lang="ts">
|
|
95
|
-
import { computed, ref, defineComponent, watch } from '
|
|
95
|
+
import { computed, ref, defineComponent, watch } from 'vue';
|
|
96
96
|
import isEqual from 'lodash.isequal';
|
|
97
|
+
import { useRoute, useRouter } from 'vue-router';
|
|
97
98
|
|
|
98
|
-
import { useResourceDelete } from '@tager/admin-services';
|
|
99
|
-
import {
|
|
99
|
+
import { useI18n, useResourceDelete } from '@tager/admin-services';
|
|
100
|
+
import {
|
|
101
|
+
AdvancedSearch,
|
|
102
|
+
BaseButton,
|
|
103
|
+
CountButton,
|
|
104
|
+
DeleteIcon,
|
|
105
|
+
EditIcon,
|
|
106
|
+
FormFieldMultiSelect,
|
|
107
|
+
NorthIcon,
|
|
108
|
+
SouthIcon,
|
|
109
|
+
useDataTable,
|
|
110
|
+
DataTable,
|
|
111
|
+
} from '@tager/admin-ui';
|
|
112
|
+
import { Page } from '@tager/admin-layout';
|
|
100
113
|
|
|
101
114
|
import { useFetchModuleConfig } from '../../../hooks';
|
|
102
|
-
import { getBlogCategoryFormUrl } from '../../../
|
|
115
|
+
import { getBlogCategoryFormUrl } from '../../../utils/paths';
|
|
103
116
|
import {
|
|
104
117
|
deleteCategory,
|
|
105
118
|
getCategories,
|
|
106
119
|
moveCategory,
|
|
107
120
|
} from '../../../services/requests';
|
|
108
121
|
import { Category, Language } from '../../../typings/model';
|
|
122
|
+
import { BLOG_ROUTE_PATHS } from '../../../constants/paths';
|
|
109
123
|
|
|
110
124
|
import {
|
|
111
125
|
convertCategoryList,
|
|
@@ -116,13 +130,27 @@ import { useAdvancedSearch } from './hooks';
|
|
|
116
130
|
|
|
117
131
|
export default defineComponent({
|
|
118
132
|
name: 'BlogCategoryList',
|
|
119
|
-
|
|
133
|
+
components: {
|
|
134
|
+
DeleteIcon,
|
|
135
|
+
SouthIcon,
|
|
136
|
+
NorthIcon,
|
|
137
|
+
EditIcon,
|
|
138
|
+
BaseButton,
|
|
139
|
+
CountButton,
|
|
140
|
+
FormFieldMultiSelect,
|
|
141
|
+
AdvancedSearch,
|
|
142
|
+
Page,
|
|
143
|
+
DataTable,
|
|
144
|
+
},
|
|
145
|
+
setup() {
|
|
146
|
+
const { t } = useI18n();
|
|
147
|
+
const route = useRoute();
|
|
148
|
+
const router = useRouter();
|
|
149
|
+
|
|
120
150
|
/** Fetch module config **/
|
|
121
151
|
|
|
122
|
-
const {
|
|
123
|
-
|
|
124
|
-
loading: isModuleConfigLoading,
|
|
125
|
-
} = useFetchModuleConfig({ context });
|
|
152
|
+
const { data: moduleConfig, loading: isModuleConfigLoading } =
|
|
153
|
+
useFetchModuleConfig();
|
|
126
154
|
|
|
127
155
|
const languageList = computed<Language[]>(
|
|
128
156
|
() => moduleConfig.value?.languages ?? []
|
|
@@ -136,7 +164,7 @@ export default defineComponent({
|
|
|
136
164
|
filterParams,
|
|
137
165
|
tags,
|
|
138
166
|
tagRemovalHandler,
|
|
139
|
-
} = useAdvancedSearch({
|
|
167
|
+
} = useAdvancedSearch({ languageList, route, t });
|
|
140
168
|
|
|
141
169
|
const isLangSpecific = computed<boolean>(
|
|
142
170
|
() => languageOptionList.value.length > 1
|
|
@@ -163,7 +191,6 @@ export default defineComponent({
|
|
|
163
191
|
...filterParams.value,
|
|
164
192
|
}),
|
|
165
193
|
initialValue: [],
|
|
166
|
-
context,
|
|
167
194
|
resourceName: 'Blog categories',
|
|
168
195
|
pageSize: 100,
|
|
169
196
|
});
|
|
@@ -173,26 +200,27 @@ export default defineComponent({
|
|
|
173
200
|
return;
|
|
174
201
|
}
|
|
175
202
|
|
|
203
|
+
if (route.path !== BLOG_ROUTE_PATHS.CATEGORY_LIST) {
|
|
204
|
+
return;
|
|
205
|
+
}
|
|
206
|
+
|
|
176
207
|
const newQuery = {
|
|
177
208
|
...filterParams.value,
|
|
178
|
-
query: (
|
|
209
|
+
query: (route.query.query ?? '') as string,
|
|
179
210
|
};
|
|
180
211
|
|
|
181
|
-
if (!isEqual(
|
|
182
|
-
|
|
212
|
+
if (!isEqual(route.query, newQuery)) {
|
|
213
|
+
router.replace({ query: newQuery });
|
|
183
214
|
fetchCategoryList();
|
|
184
215
|
}
|
|
185
216
|
});
|
|
186
217
|
|
|
187
|
-
const {
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
onSuccess: fetchCategoryList,
|
|
194
|
-
context,
|
|
195
|
-
});
|
|
218
|
+
const { isDeleting, handleResourceDelete: handleCategoryDelete } =
|
|
219
|
+
useResourceDelete({
|
|
220
|
+
deleteResource: deleteCategory,
|
|
221
|
+
resourceName: 'Post',
|
|
222
|
+
onSuccess: fetchCategoryList,
|
|
223
|
+
});
|
|
196
224
|
|
|
197
225
|
const isCategoryMoving = ref<boolean>(false);
|
|
198
226
|
|
|
@@ -222,7 +250,7 @@ export default defineComponent({
|
|
|
222
250
|
);
|
|
223
251
|
|
|
224
252
|
const columnDefs = computed(() =>
|
|
225
|
-
getCategoryTableColumnDefs(moduleConfig.value,
|
|
253
|
+
getCategoryTableColumnDefs(moduleConfig.value, t)
|
|
226
254
|
);
|
|
227
255
|
|
|
228
256
|
return {
|
|
@@ -1,11 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
Ref,
|
|
5
|
-
ref,
|
|
6
|
-
SetupContext,
|
|
7
|
-
watch,
|
|
8
|
-
} from '@vue/composition-api';
|
|
1
|
+
import { computed, ComputedRef, Ref, ref, SetupContext, watch } from 'vue';
|
|
2
|
+
import { RouteLocationNormalizedLoaded } from 'vue-router';
|
|
3
|
+
import { TFunction } from 'i18next';
|
|
9
4
|
|
|
10
5
|
import {
|
|
11
6
|
FilterTagType,
|
|
@@ -17,8 +12,9 @@ import {
|
|
|
17
12
|
import { Language } from '../../../../typings/model';
|
|
18
13
|
|
|
19
14
|
interface Params {
|
|
20
|
-
|
|
15
|
+
t: TFunction;
|
|
21
16
|
languageList: ComputedRef<Language[]>;
|
|
17
|
+
route: RouteLocationNormalizedLoaded;
|
|
22
18
|
}
|
|
23
19
|
|
|
24
20
|
interface State {
|
|
@@ -26,6 +22,7 @@ interface State {
|
|
|
26
22
|
languageOptionList: ComputedRef<OptionType[]>;
|
|
27
23
|
filterParams: ComputedRef<Record<string, string | string[]>>;
|
|
28
24
|
tags: ComputedRef<FilterTagType[]>;
|
|
25
|
+
|
|
29
26
|
tagRemovalHandler(event: FilterTagType): void;
|
|
30
27
|
}
|
|
31
28
|
|
|
@@ -33,7 +30,7 @@ enum FilterTypes {
|
|
|
33
30
|
LANGUAGE = 'language',
|
|
34
31
|
}
|
|
35
32
|
|
|
36
|
-
export function useAdvancedSearch({
|
|
33
|
+
export function useAdvancedSearch({ languageList, route, t }: Params): State {
|
|
37
34
|
/** Language **/
|
|
38
35
|
|
|
39
36
|
const languageOptionList = computed<OptionType[]>(() =>
|
|
@@ -42,7 +39,7 @@ export function useAdvancedSearch({ context, languageList }: Params): State {
|
|
|
42
39
|
|
|
43
40
|
const initialLanguageFilter = computed<OptionType[]>(() => {
|
|
44
41
|
const queryValue = getFilterParamAsStringArray(
|
|
45
|
-
|
|
42
|
+
route.query,
|
|
46
43
|
FilterTypes.LANGUAGE
|
|
47
44
|
);
|
|
48
45
|
return languageOptionList.value.filter(({ value }) =>
|
|
@@ -81,7 +78,7 @@ export function useAdvancedSearch({ context, languageList }: Params): State {
|
|
|
81
78
|
value,
|
|
82
79
|
label,
|
|
83
80
|
name: FilterTypes.LANGUAGE,
|
|
84
|
-
title:
|
|
81
|
+
title: t('blog:language'),
|
|
85
82
|
})),
|
|
86
83
|
]);
|
|
87
84
|
|
|
@@ -5,12 +5,12 @@ import { OptionType, SingleFileInputValueType } from '@tager/admin-ui';
|
|
|
5
5
|
import {
|
|
6
6
|
FieldConfigUnion,
|
|
7
7
|
FieldUnion,
|
|
8
|
-
universalFieldUtils
|
|
8
|
+
universalFieldUtils
|
|
9
9
|
} from '@tager/admin-dynamic-field';
|
|
10
10
|
|
|
11
11
|
import {
|
|
12
12
|
PostCreationPayload,
|
|
13
|
-
PostUpdatePayload
|
|
13
|
+
PostUpdatePayload
|
|
14
14
|
} from '../../../services/requests';
|
|
15
15
|
import { getNameWithDepth } from '../../../utils/common';
|
|
16
16
|
import { Category, PostFull } from '../../../typings/model';
|
|
@@ -18,7 +18,7 @@ import { Category, PostFull } from '../../../typings/model';
|
|
|
18
18
|
export const getStatusOptions = (t: TFunction): OptionType[] => [
|
|
19
19
|
{ label: t('blog:statusPublished'), value: 'PUBLISHED' },
|
|
20
20
|
{ label: t('blog:statusDraft'), value: 'DRAFT' },
|
|
21
|
-
{ label: t('blog:statusArchived'), value: 'ARCHIVED' }
|
|
21
|
+
{ label: t('blog:statusArchived'), value: 'ARCHIVED' }
|
|
22
22
|
];
|
|
23
23
|
|
|
24
24
|
export interface FormValues {
|
|
@@ -39,6 +39,8 @@ export interface FormValues {
|
|
|
39
39
|
tags: string;
|
|
40
40
|
additionalFields: FieldUnion[];
|
|
41
41
|
status: OptionType;
|
|
42
|
+
statusDateEnabled: boolean;
|
|
43
|
+
statusDate: Nullable<string>;
|
|
42
44
|
}
|
|
43
45
|
|
|
44
46
|
export function convertPostToFormValues(
|
|
@@ -69,6 +71,8 @@ export function convertPostToFormValues(
|
|
|
69
71
|
universalFieldUtils.createFormField(fieldConfig, null)
|
|
70
72
|
),
|
|
71
73
|
status: statusOptions[0],
|
|
74
|
+
statusDateEnabled: false,
|
|
75
|
+
statusDate: null
|
|
72
76
|
};
|
|
73
77
|
}
|
|
74
78
|
|
|
@@ -104,7 +108,7 @@ export function convertPostToFormValues(
|
|
|
104
108
|
urlAlias: post.urlAlias,
|
|
105
109
|
categories: post.categories.map((category) => ({
|
|
106
110
|
value: category.id,
|
|
107
|
-
label: category.name
|
|
111
|
+
label: category.name
|
|
108
112
|
})),
|
|
109
113
|
language: currentLangOption ?? null,
|
|
110
114
|
relatedPosts: selectedPostOptionList,
|
|
@@ -119,6 +123,8 @@ export function convertPostToFormValues(
|
|
|
119
123
|
);
|
|
120
124
|
}),
|
|
121
125
|
status: foundStatus,
|
|
126
|
+
statusDateEnabled: post.status === 'PUBLISHED' ? !!post.archiveAt : (post.status === 'DRAFT' ? !!post.publishAt : false),
|
|
127
|
+
statusDate: post.status === 'PUBLISHED' && post.archiveAt ? post.archiveAt.substr(0, 10) : (post.status === 'DRAFT' && post.publishAt ? post.publishAt.substr(0, 10) : null)
|
|
122
128
|
};
|
|
123
129
|
}
|
|
124
130
|
|
|
@@ -145,9 +151,11 @@ export function convertFormValuesToCreationPayload(
|
|
|
145
151
|
tags: values.tags.split(',').filter((tag) => tag.trim().length > 0),
|
|
146
152
|
additionalFields: values.additionalFields.map((field) => ({
|
|
147
153
|
name: field.config.name,
|
|
148
|
-
value: universalFieldUtils.getOutgoingValue(field)
|
|
154
|
+
value: universalFieldUtils.getOutgoingValue(field)
|
|
149
155
|
})),
|
|
150
156
|
status: values.status.value,
|
|
157
|
+
archiveAt: values.status.value === 'PUBLISHED' && values.statusDateEnabled && values.statusDate ? values.statusDate : null,
|
|
158
|
+
publishAt: values.status.value === 'DRAFT' && values.statusDateEnabled && values.statusDate ? values.statusDate : null
|
|
151
159
|
};
|
|
152
160
|
}
|
|
153
161
|
|
|
@@ -156,7 +164,7 @@ export function convertFormValuesToUpdatePayload(
|
|
|
156
164
|
): PostUpdatePayload {
|
|
157
165
|
return {
|
|
158
166
|
...convertFormValuesToCreationPayload(values),
|
|
159
|
-
urlAlias: values.urlAlias
|
|
167
|
+
urlAlias: values.urlAlias
|
|
160
168
|
};
|
|
161
169
|
}
|
|
162
170
|
|
|
@@ -168,6 +176,6 @@ export function convertCategoryListToOptions(
|
|
|
168
176
|
.filter(({ language }) => (languageId ? language === languageId : true))
|
|
169
177
|
.map(({ id, name, depth }) => ({
|
|
170
178
|
value: id,
|
|
171
|
-
label: getNameWithDepth(name, depth)
|
|
179
|
+
label: getNameWithDepth(name, depth)
|
|
172
180
|
}));
|
|
173
181
|
}
|