@tager/admin-banners 0.3.5 → 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 +5 -10
- package/dist/constants/routes.d.ts +4 -4
- 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 +2 -2
- package/dist/hooks/useFetchBanner.d.ts +7 -8
- package/dist/hooks/useFetchBanners.d.ts +3 -6
- package/dist/hooks/useFetchZoneFields.d.ts +7 -0
- package/dist/hooks/useFetchZones.d.ts +3 -6
- package/dist/index.mjs +993 -0
- package/dist/locales/apply.d.ts +1 -0
- package/dist/locales/en.d.ts +41 -40
- package/dist/locales/ru.d.ts +2 -3
- package/dist/main.d.ts +3 -4
- package/dist/services/requests.d.ts +25 -24
- package/dist/style.css +1 -0
- package/dist/typings/banners.d.ts +47 -40
- package/dist/typings/common.d.ts +1 -1
- package/dist/typings/model.d.ts +104 -104
- package/dist/typings/zones.d.ts +9 -5
- package/dist/utils/common.d.ts +2 -2
- package/dist/utils/paths.d.ts +5 -0
- package/dist/views/Banners/BannerForm/BannerForm.helpers.d.ts +5 -5
- package/dist/views/Banners/BannerForm/BannerForm.vue.d.ts +2694 -81
- package/dist/views/Banners/BannerForm/index.d.ts +1 -1
- package/dist/views/Banners/BannerList/BannerList.helpers.d.ts +6 -6
- package/dist/views/Banners/BannerList/BannerList.vue.d.ts +25 -55
- package/dist/views/Banners/BannerList/hooks/index.d.ts +1 -1
- package/dist/views/Banners/BannerList/hooks/useAdvancedSearch.d.ts +23 -21
- package/dist/views/Banners/BannerList/index.d.ts +1 -1
- package/dist/views/Zones/ZoneList/ZoneList.helpers.d.ts +5 -5
- package/dist/views/Zones/ZoneList/ZoneList.vue.d.ts +11 -28
- package/dist/views/Zones/ZoneList/index.d.ts +1 -1
- package/package.json +51 -49
- package/src/constants/paths.ts +1 -15
- package/src/constants/routes.ts +7 -7
- package/src/dev/App.vue +46 -0
- package/src/dev/config.ts +23 -0
- package/src/dev/env.ts +17 -0
- package/src/dev/main.ts +47 -0
- package/src/hooks/useFetchBanner.ts +3 -6
- package/src/hooks/useFetchBanners.ts +2 -5
- package/src/hooks/useFetchZoneFields.ts +39 -0
- package/src/hooks/useFetchZones.ts +2 -5
- package/src/locales/apply.ts +9 -0
- package/src/locales/en.ts +2 -1
- package/src/locales/ru.ts +40 -41
- package/src/main.ts +3 -8
- package/src/services/requests.ts +7 -1
- package/src/typings/banners.ts +14 -2
- package/src/typings/zones.ts +6 -0
- package/src/utils/paths.ts +15 -0
- package/src/views/Banners/BannerForm/BannerForm.helpers.ts +10 -0
- package/src/views/Banners/BannerForm/BannerForm.vue +168 -83
- package/src/views/Banners/BannerList/BannerList.helpers.ts +11 -4
- package/src/views/Banners/BannerList/BannerList.vue +60 -47
- package/src/views/Banners/BannerList/hooks/useAdvancedSearch.ts +14 -14
- package/src/views/Zones/ZoneList/ZoneList.helpers.ts +1 -1
- package/src/views/Zones/ZoneList/ZoneList.vue +18 -19
- 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 -3621
- package/dist/index.umd.js +0 -3640
- package/dist/router/index.d.ts +0 -4
- package/src/constants/menu.ts +0 -26
- package/src/dev.ts +0 -34
- package/src/router/index.ts +0 -38
- 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/views/App.vue +0 -22
- package/src/views/Home.vue +0 -37
|
@@ -3,7 +3,7 @@ import { TFunction } from 'i18next';
|
|
|
3
3
|
import { ColumnDefinition } from '@tager/admin-ui';
|
|
4
4
|
|
|
5
5
|
import { Zone } from '../../../typings/zones';
|
|
6
|
-
import { getBannersBannerListUrl } from '../../../
|
|
6
|
+
import { getBannersBannerListUrl } from '../../../utils/paths';
|
|
7
7
|
|
|
8
8
|
export function getColumnDefs(t: TFunction): ColumnDefinition<Zone>[] {
|
|
9
9
|
return [
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
3
|
-
<template
|
|
4
|
-
<
|
|
2
|
+
<Page :title="$i18n.t('banners:zones')">
|
|
3
|
+
<template #content>
|
|
4
|
+
<DataTable
|
|
5
5
|
:column-defs="columnDefs"
|
|
6
6
|
:row-data="rowData"
|
|
7
7
|
:loading="isRowDataLoading"
|
|
@@ -11,29 +11,26 @@
|
|
|
11
11
|
:use-pagination="false"
|
|
12
12
|
@change="handleChange"
|
|
13
13
|
>
|
|
14
|
-
<template
|
|
15
|
-
<
|
|
14
|
+
<template #cell(banners-count)="{ row }">
|
|
15
|
+
<CountButton
|
|
16
16
|
:href="getLinkToBannersByZone(row.id)"
|
|
17
17
|
variant="outline-secondary"
|
|
18
18
|
:count="row.bannersCount"
|
|
19
19
|
>
|
|
20
|
-
{{ $t('banners:banners') }}
|
|
21
|
-
</
|
|
20
|
+
{{ $i18n.t('banners:banners') }}
|
|
21
|
+
</CountButton>
|
|
22
22
|
</template>
|
|
23
|
-
</
|
|
23
|
+
</DataTable>
|
|
24
24
|
</template>
|
|
25
|
-
</
|
|
25
|
+
</Page>
|
|
26
26
|
</template>
|
|
27
27
|
|
|
28
28
|
<script lang="ts">
|
|
29
|
-
import {
|
|
30
|
-
computed,
|
|
31
|
-
defineComponent,
|
|
32
|
-
onMounted,
|
|
33
|
-
SetupContext,
|
|
34
|
-
} from '@vue/composition-api';
|
|
29
|
+
import { computed, defineComponent, onMounted, SetupContext } from 'vue';
|
|
35
30
|
|
|
36
|
-
import { useDataTable } from '@tager/admin-ui';
|
|
31
|
+
import { CountButton, useDataTable, DataTable } from '@tager/admin-ui';
|
|
32
|
+
import { Page } from '@tager/admin-layout';
|
|
33
|
+
import { useI18n } from '@tager/admin-services';
|
|
37
34
|
|
|
38
35
|
import { Zone } from '../../../typings/zones';
|
|
39
36
|
import { getZones } from '../../../services/requests';
|
|
@@ -42,7 +39,10 @@ import { getColumnDefs, getLinkToBannersByZone } from './ZoneList.helpers';
|
|
|
42
39
|
|
|
43
40
|
export default defineComponent({
|
|
44
41
|
name: 'ZoneList',
|
|
45
|
-
|
|
42
|
+
components: { CountButton, Page, DataTable },
|
|
43
|
+
setup() {
|
|
44
|
+
const i18n = useI18n();
|
|
45
|
+
|
|
46
46
|
const {
|
|
47
47
|
fetchEntityList: fetchZones,
|
|
48
48
|
isLoading: isZonesLoading,
|
|
@@ -52,7 +52,6 @@ export default defineComponent({
|
|
|
52
52
|
} = useDataTable<Zone>({
|
|
53
53
|
fetchEntityList: getZones,
|
|
54
54
|
initialValue: [],
|
|
55
|
-
context,
|
|
56
55
|
resourceName: 'Banner Zones',
|
|
57
56
|
});
|
|
58
57
|
|
|
@@ -60,7 +59,7 @@ export default defineComponent({
|
|
|
60
59
|
fetchZones();
|
|
61
60
|
});
|
|
62
61
|
|
|
63
|
-
const columnDefs = computed(() => getColumnDefs(
|
|
62
|
+
const columnDefs = computed(() => getColumnDefs(i18n.t));
|
|
64
63
|
|
|
65
64
|
return {
|
|
66
65
|
columnDefs,
|
package/CHANGELOG.md
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
# [0.0.2] (2020-06-06)
|
|
2
|
-
|
|
3
|
-
### Features
|
|
4
|
-
|
|
5
|
-
* **services:** Use VUE_APP_API_ORIGIN env variable as initial api origin value in ApiService
|
|
6
|
-
|
|
7
|
-
# [0.0.3] (2020-06-06)
|
|
8
|
-
|
|
9
|
-
### Bug Fixes
|
|
10
|
-
|
|
11
|
-
* **services:** Use api origin from ApiService to configure url for file upload
|
|
12
|
-
|
|
13
|
-
|
package/dist/constants/menu.d.ts
DELETED
package/dist/dev.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import '@tager/admin-ui/dist/admin-ui.css';
|