adata-ui 2.0.45 → 2.0.47

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.
@@ -1,136 +1,136 @@
1
- <script setup lang="ts">
2
- import PaymentTopUpSidePanel from '#adata-ui/components/features/payment/process/PaymentTopUpSidePanel.vue'
3
- import PaymentMethodSidePanel from '#adata-ui/components/features/payment/process/PaymentMethodSidePanel.vue'
4
- import PaymentKaspiQrSidePanel from '#adata-ui/components/features/payment/process/PaymentKaspiQrSidePanel.vue'
5
- import PaymentKaspiRedirectSidePanel from '#adata-ui/components/features/payment/process/PaymentKaspiRedirectSidePanel.vue'
6
- import { removeTrailingSlash } from '#adata-ui/components/utils/removeTrailingSlash'
7
-
8
- const { $toast } = useNuxtApp()
9
- const { locale } = useI18n()
10
- const { commonAuth } = useAppConfig()
11
- const accessToken = useCookie('accessToken')
12
-
13
- const {
14
- topUpSidePanel,
15
- methodSidePanel,
16
- kaspiQRSidePanel,
17
- kaspiRedirectSidePanel,
18
- payByCard
19
- } = usePayment()
20
-
21
- const userApiURL = commonAuth.userApiURL
22
-
23
- const paymentSum = ref(0)
24
- const requestUrl = ref('')
25
- const requestId = ref<number | null>(null)
26
-
27
- function actionPayment(num: number) {
28
- paymentSum.value = num
29
- topUpSidePanel.value = false
30
- methodSidePanel.value = true
31
- }
32
-
33
- function toggleKaspiSidePanel(state: boolean) {
34
- if (window.innerWidth >= 1024) {
35
- kaspiQRSidePanel.value = state
36
- }
37
- else {
38
- kaspiRedirectSidePanel.value = state
39
- }
40
- }
41
-
42
- function onBack(type: 'method' | 'kaspi') {
43
- if (type === 'method') {
44
- topUpSidePanel.value = true
45
- methodSidePanel.value = false
46
- }
47
- else if (type === 'kaspi') {
48
- toggleKaspiSidePanel(false)
49
- methodSidePanel.value = true
50
- }
51
- }
52
-
53
- async function directionsBanks(bank: 'kaspi' | 'other', sum: number) {
54
- methodSidePanel.value = false
55
- if (bank === 'kaspi') {
56
- try {
57
- const { data } = await $fetch(`${removeTrailingSlash(userApiURL)}/user/kaspi-balance/request`, {
58
- method: 'POST',
59
- credentials: 'include',
60
- headers: {
61
- Authorization: `Bearer ${accessToken.value}`,
62
- lang: locale.value,
63
- },
64
- params: {
65
- amount: sum,
66
- initial: 1,
67
- },
68
- })
69
- requestId.value = data.request_id
70
- requestUrl.value = `https://kaspi.kz/pay/adata?service_id=5964&9507=${data.request_id}`
71
- toggleKaspiSidePanel(true)
72
- }
73
- catch (error) {
74
- console.error(error)
75
- $toast.error(error.data.message)
76
- }
77
- }
78
- else if (bank === 'other') {
79
- await payByCard(sum)
80
- }
81
- }
82
-
83
- async function updateUserRate() {
84
- try {
85
- await $fetch(`${removeTrailingSlash(userApiURL)}/user/rate`, {
86
- method: 'PUT',
87
- credentials: 'include',
88
- headers: {
89
- Authorization: `Bearer ${accessToken.value}`,
90
- lang: locale.value,
91
- },
92
- body: {
93
- rate_code: 'basic_plus',
94
- },
95
- })
96
- window.location.reload()
97
- }
98
- catch (error) {
99
- $toast.error(error.data.message)
100
- toggleKaspiSidePanel(false)
101
- }
102
- }
103
- </script>
104
-
105
- <template>
106
- <payment-top-up-side-panel
107
- v-model="topUpSidePanel"
108
- @next="actionPayment"
109
- />
110
-
111
- <payment-method-side-panel
112
- v-model="methodSidePanel"
113
- @back="onBack"
114
- :sum="paymentSum"
115
- @next-bank="directionsBanks"
116
- />
117
-
118
- <payment-kaspi-qr-side-panel
119
- v-model="kaspiQRSidePanel"
120
- @back="onBack"
121
- :request-url="requestUrl"
122
- :request-id="requestId as number"
123
- @update-user-rate="updateUserRate"
124
- />
125
-
126
- <payment-kaspi-redirect-side-panel
127
- v-model="kaspiRedirectSidePanel"
128
- @back="onBack"
129
- :request-id="requestId as number"
130
- @update-user-rate="updateUserRate"
131
- />
132
- </template>
133
-
134
- <style scoped>
135
-
136
- </style>
1
+ <script setup lang="ts">
2
+ import PaymentTopUpSidePanel from '#adata-ui/components/features/payment/process/PaymentTopUpSidePanel.vue'
3
+ import PaymentMethodSidePanel from '#adata-ui/components/features/payment/process/PaymentMethodSidePanel.vue'
4
+ import PaymentKaspiQrSidePanel from '#adata-ui/components/features/payment/process/PaymentKaspiQrSidePanel.vue'
5
+ import PaymentKaspiRedirectSidePanel from '#adata-ui/components/features/payment/process/PaymentKaspiRedirectSidePanel.vue'
6
+ import { removeTrailingSlash } from '#adata-ui/components/utils/removeTrailingSlash'
7
+
8
+ const { $toast } = useNuxtApp()
9
+ const { locale } = useI18n()
10
+ const { commonAuth } = useAppConfig()
11
+ const accessToken = useCookie('accessToken')
12
+
13
+ const {
14
+ topUpSidePanel,
15
+ methodSidePanel,
16
+ kaspiQRSidePanel,
17
+ kaspiRedirectSidePanel,
18
+ payByCard
19
+ } = usePayment()
20
+
21
+ const userApiURL = commonAuth.userApiURL
22
+
23
+ const paymentSum = ref(0)
24
+ const requestUrl = ref('')
25
+ const requestId = ref<number | null>(null)
26
+
27
+ function actionPayment(num: number) {
28
+ paymentSum.value = num
29
+ topUpSidePanel.value = false
30
+ methodSidePanel.value = true
31
+ }
32
+
33
+ function toggleKaspiSidePanel(state: boolean) {
34
+ if (window.innerWidth >= 1024) {
35
+ kaspiQRSidePanel.value = state
36
+ }
37
+ else {
38
+ kaspiRedirectSidePanel.value = state
39
+ }
40
+ }
41
+
42
+ function onBack(type: 'method' | 'kaspi') {
43
+ if (type === 'method') {
44
+ topUpSidePanel.value = true
45
+ methodSidePanel.value = false
46
+ }
47
+ else if (type === 'kaspi') {
48
+ toggleKaspiSidePanel(false)
49
+ methodSidePanel.value = true
50
+ }
51
+ }
52
+
53
+ async function directionsBanks(bank: 'kaspi' | 'other', sum: number) {
54
+ methodSidePanel.value = false
55
+ if (bank === 'kaspi') {
56
+ try {
57
+ const { data } = await $fetch(`${removeTrailingSlash(userApiURL)}/user/kaspi-balance/request`, {
58
+ method: 'POST',
59
+ credentials: 'include',
60
+ headers: {
61
+ Authorization: `Bearer ${accessToken.value}`,
62
+ lang: locale.value,
63
+ },
64
+ params: {
65
+ amount: sum,
66
+ initial: 1,
67
+ },
68
+ })
69
+ requestId.value = data.request_id
70
+ requestUrl.value = `https://kaspi.kz/pay/adata?service_id=5964&9507=${data.request_id}`
71
+ toggleKaspiSidePanel(true)
72
+ }
73
+ catch (error) {
74
+ console.error(error)
75
+ $toast.error(error.data.message)
76
+ }
77
+ }
78
+ else if (bank === 'other') {
79
+ await payByCard(sum)
80
+ }
81
+ }
82
+
83
+ async function updateUserRate() {
84
+ try {
85
+ await $fetch(`${removeTrailingSlash(userApiURL)}/user/rate`, {
86
+ method: 'PUT',
87
+ credentials: 'include',
88
+ headers: {
89
+ Authorization: `Bearer ${accessToken.value}`,
90
+ lang: locale.value,
91
+ },
92
+ body: {
93
+ rate_code: 'basic_plus',
94
+ },
95
+ })
96
+ window.location.reload()
97
+ }
98
+ catch (error) {
99
+ $toast.error(error.data.message)
100
+ toggleKaspiSidePanel(false)
101
+ }
102
+ }
103
+ </script>
104
+
105
+ <template>
106
+ <payment-top-up-side-panel
107
+ v-model="topUpSidePanel"
108
+ @next="actionPayment"
109
+ />
110
+
111
+ <payment-method-side-panel
112
+ v-model="methodSidePanel"
113
+ @back="onBack"
114
+ :sum="paymentSum"
115
+ @next-bank="directionsBanks"
116
+ />
117
+
118
+ <payment-kaspi-qr-side-panel
119
+ v-model="kaspiQRSidePanel"
120
+ @back="onBack"
121
+ :request-url="requestUrl"
122
+ :request-id="requestId as number"
123
+ @update-user-rate="updateUserRate"
124
+ />
125
+
126
+ <payment-kaspi-redirect-side-panel
127
+ v-model="kaspiRedirectSidePanel"
128
+ @back="onBack"
129
+ :request-id="requestId as number"
130
+ @update-user-rate="updateUserRate"
131
+ />
132
+ </template>
133
+
134
+ <style scoped>
135
+
136
+ </style>
@@ -1,113 +1,113 @@
1
- <script setup lang="ts">
2
- const emit = defineEmits<{
3
- (e: 'next', sum: number): void
4
- }>()
5
-
6
- const isOpen = defineModel({ default: false })
7
-
8
- const { t } = useI18n()
9
-
10
- const money = ref(0)
11
- const sumArr = ref([
12
- {
13
- id: 1,
14
- value: 1000,
15
- label: '1 000 ₸',
16
- },
17
- {
18
- id: 2,
19
- value: 5000,
20
- label: '5 000 ₸',
21
- },
22
- {
23
- id: 3,
24
- value: 10000,
25
- label: '10 000 ₸',
26
- },
27
- {
28
- id: 4,
29
- value: 20000,
30
- label: '20 000 ₸',
31
- },
32
- ])
33
-
34
- const filterMoney = computed(() => {
35
- return money.value > 0
36
- })
37
-
38
- function onSelectAmount(value: number) {
39
- money.value = value
40
- }
41
-
42
- function onClose() {
43
- isOpen.value = false
44
- }
45
-
46
- function handlePayment() {
47
- emit('next', money.value)
48
- }
49
- </script>
50
-
51
- <template>
52
- <a-side-panel v-model="isOpen" width="484px">
53
- <template #header>
54
- <div class="text-xl font-semibold">
55
- {{ t('payment.topUp.title') }}
56
- </div>
57
- </template>
58
-
59
- <div class="flex flex-col gap-6">
60
- <div class="flex flex-col items-center gap-4 ">
61
- <a-ill-bill class="size-[120px]" />
62
- <p class="text-center text-sm font-semibold">
63
- {{ t('payment.topUp.info') }}
64
- </p>
65
- </div>
66
-
67
- <div class="flex flex-col gap-4">
68
- <a-input-standard
69
- v-model="money"
70
- :label="`${t('payment.topUp.enterAmount')}`"
71
- type="number"
72
- pattern="[0-9]*"
73
- clearable
74
- />
75
- <div class="flex gap-4">
76
- <a-chips
77
- v-for="item in sumArr"
78
- :key="item.id"
79
- view="standard"
80
- size="lg"
81
- :class="[
82
- money === item.value
83
- ? 'bg-blue-700 text-white hover:bg-blue-700 dark:border-blue-500 dark:bg-transparent dark:text-blue-500 dark:hover:bg-transparent'
84
- : '',
85
- ]"
86
- @click.stop="onSelectAmount(item.value)"
87
- >
88
- <span>{{ item.label }}</span>
89
- </a-chips>
90
- </div>
91
- </div>
92
-
93
- <div class="flex flex-col gap-2">
94
- <a-button
95
- :disabled="!filterMoney"
96
- @click="handlePayment"
97
- >
98
- {{ t('actions.topUp') }}
99
- </a-button>
100
- <a-button
101
- view="outline"
102
- @click="onClose"
103
- >
104
- {{ t('actions.back') }}
105
- </a-button>
106
- </div>
107
- </div>
108
- </a-side-panel>
109
- </template>
110
-
111
- <style scoped>
112
-
113
- </style>
1
+ <script setup lang="ts">
2
+ const emit = defineEmits<{
3
+ (e: 'next', sum: number): void
4
+ }>()
5
+
6
+ const isOpen = defineModel({ default: false })
7
+
8
+ const { t } = useI18n()
9
+
10
+ const money = ref(0)
11
+ const sumArr = ref([
12
+ {
13
+ id: 1,
14
+ value: 1000,
15
+ label: '1 000 ₸',
16
+ },
17
+ {
18
+ id: 2,
19
+ value: 5000,
20
+ label: '5 000 ₸',
21
+ },
22
+ {
23
+ id: 3,
24
+ value: 10000,
25
+ label: '10 000 ₸',
26
+ },
27
+ {
28
+ id: 4,
29
+ value: 20000,
30
+ label: '20 000 ₸',
31
+ },
32
+ ])
33
+
34
+ const filterMoney = computed(() => {
35
+ return money.value > 0
36
+ })
37
+
38
+ function onSelectAmount(value: number) {
39
+ money.value = value
40
+ }
41
+
42
+ function onClose() {
43
+ isOpen.value = false
44
+ }
45
+
46
+ function handlePayment() {
47
+ emit('next', money.value)
48
+ }
49
+ </script>
50
+
51
+ <template>
52
+ <a-side-panel v-model="isOpen" width="484px">
53
+ <template #header>
54
+ <div class="text-xl font-semibold">
55
+ {{ t('payment.topUp.title') }}
56
+ </div>
57
+ </template>
58
+
59
+ <div class="flex flex-col gap-6">
60
+ <div class="flex flex-col items-center gap-4 ">
61
+ <a-ill-bill class="size-[120px]" />
62
+ <p class="text-center text-sm font-semibold">
63
+ {{ t('payment.topUp.info') }}
64
+ </p>
65
+ </div>
66
+
67
+ <div class="flex flex-col gap-4">
68
+ <a-input-standard
69
+ v-model="money"
70
+ :label="`${t('payment.topUp.enterAmount')}`"
71
+ type="number"
72
+ pattern="[0-9]*"
73
+ clearable
74
+ />
75
+ <div class="flex gap-4">
76
+ <a-chips
77
+ v-for="item in sumArr"
78
+ :key="item.id"
79
+ view="standard"
80
+ size="lg"
81
+ :class="[
82
+ money === item.value
83
+ ? 'bg-blue-700 text-white hover:bg-blue-700 dark:border-blue-500 dark:bg-transparent dark:text-blue-500 dark:hover:bg-transparent'
84
+ : '',
85
+ ]"
86
+ @click.stop="onSelectAmount(item.value)"
87
+ >
88
+ <span>{{ item.label }}</span>
89
+ </a-chips>
90
+ </div>
91
+ </div>
92
+
93
+ <div class="flex flex-col gap-2">
94
+ <a-button
95
+ :disabled="!filterMoney"
96
+ @click="handlePayment"
97
+ >
98
+ {{ t('actions.topUp') }}
99
+ </a-button>
100
+ <a-button
101
+ view="outline"
102
+ @click="onClose"
103
+ >
104
+ {{ t('actions.back') }}
105
+ </a-button>
106
+ </div>
107
+ </div>
108
+ </a-side-panel>
109
+ </template>
110
+
111
+ <style scoped>
112
+
113
+ </style>
@@ -1 +1 @@
1
- # inputs
1
+ # inputs
@@ -27,6 +27,8 @@ import IconCalc from '#adata-ui/icons/calculator.vue'
27
27
  import { buildLocalizedUrl } from '#adata-ui/utils/localizedNavigation'
28
28
  import { AIconFiles } from '#components'
29
29
  import MapPinRect from '#adata-ui/icons/map/map-pin-rect.vue'
30
+ import ChartBar from '#adata-ui/icons/chart-bar.vue'
31
+ import Bank from '#adata-ui/icons/bank.vue'
30
32
  type Emits = {
31
33
  (e: 'pushMain'): void
32
34
  }
@@ -35,7 +37,7 @@ const tab = ref(useCurrentModule().value)
35
37
  const { myLayer }: any = useAppConfig()
36
38
  const { t } = useI18n()
37
39
  const emits = defineEmits<Emits>()
38
-
40
+ const mode = myLayer.mode
39
41
 
40
42
  const tabOptions = [
41
43
  {
@@ -47,8 +49,8 @@ const tabOptions = [
47
49
  key: 'pk',
48
50
  },
49
51
  {
50
- name: 'header.products.jobs.label',
51
- key: 'work',
52
+ name: 'header.products.compliance.label',
53
+ key: 'compliance',
52
54
  },
53
55
  {
54
56
  name: 'header.products.tenders.label',
@@ -58,17 +60,17 @@ const tabOptions = [
58
60
  name: 'header.products.analytics.label',
59
61
  key: 'analytics',
60
62
  },
61
- {
62
- name: 'header.products.fines.label',
63
- key: 'fines',
64
- },
65
63
  {
66
64
  name: 'header.products.fea.label',
67
65
  key: 'fea',
68
66
  },
69
67
  {
70
- name: 'header.products.compliance.label',
71
- key: 'compliance',
68
+ name: 'header.products.fines.label',
69
+ key: 'fines',
70
+ },
71
+ {
72
+ name: 'header.products.jobs.label',
73
+ key: 'work',
72
74
  },
73
75
  ]
74
76
  const sideLinks = <any>{
@@ -139,6 +141,16 @@ const sideLinks = <any>{
139
141
  },
140
142
  ],
141
143
  tenders: [
144
+ {
145
+ icon: ChartBar,
146
+ label: t('header.products.tenders.items.monitoring.title'),
147
+ link: `https://zakupki.${mode}.kz` + PAGES.tender.monitoring,
148
+ },
149
+ {
150
+ icon: Bank,
151
+ label: t('header.products.tenders.items.akimat.title'),
152
+ link: `https://zakupki.${mode}.kz` + PAGES.tender.akimat,
153
+ },
142
154
  {
143
155
  icon: IconSearch,
144
156
  label: 'header.products.tenders.items.tenders.title',