adata-ui 0.1.13 → 0.1.14
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/adata-ui.common.js +1880 -23
- package/dist/adata-ui.common.js.map +1 -1
- package/dist/adata-ui.umd.js +1880 -23
- package/dist/adata-ui.umd.js.map +1 -1
- package/dist/adata-ui.umd.min.js +1 -1
- package/dist/adata-ui.umd.min.js.map +1 -1
- package/package.json +1 -1
- package/src/components/Header/Header.stories.js +2 -1
- package/src/components/Header/Header.vue +6 -4
- package/src/components/Header/Profile.vue +23 -6
package/package.json
CHANGED
|
@@ -22,6 +22,7 @@ const Template = (args, { argTypes }) => ({
|
|
|
22
22
|
},
|
|
23
23
|
showBalance(val) {
|
|
24
24
|
console.log(val);
|
|
25
|
+
console.log(val);
|
|
25
26
|
},
|
|
26
27
|
showModal(val) {
|
|
27
28
|
console.log(val);
|
|
@@ -50,6 +51,6 @@ headerAuthenticated.args = {
|
|
|
50
51
|
daysRemaining: "остаток дней: 29",
|
|
51
52
|
email: "sboranbayeva@gmail.com",
|
|
52
53
|
loginUrl: "https://id.adtdev.kz/auth/signin?url=https://pk.adata.kz/auth",
|
|
53
|
-
activeTabKey: '
|
|
54
|
+
activeTabKey: 'tender',
|
|
54
55
|
balance: 1954900
|
|
55
56
|
}
|
|
@@ -9,14 +9,14 @@
|
|
|
9
9
|
</svg>
|
|
10
10
|
</a>
|
|
11
11
|
<div class="menu" v-if="subheaderItems.length > 0">
|
|
12
|
-
<
|
|
12
|
+
<a v-for="(item, index) in subheaderItems"
|
|
13
13
|
:key="index"
|
|
14
14
|
class="menu__wrapper menu__items"
|
|
15
15
|
:class="{active: locationUrl.includes(toAdtdev(item.url))}"
|
|
16
|
-
|
|
16
|
+
:href="item.url"
|
|
17
17
|
>
|
|
18
18
|
{{ item.name }}
|
|
19
|
-
</
|
|
19
|
+
</a>
|
|
20
20
|
</div>
|
|
21
21
|
</div>
|
|
22
22
|
<div class="a-header__right">
|
|
@@ -29,6 +29,7 @@
|
|
|
29
29
|
:daysRemaining="daysRemaining"
|
|
30
30
|
:email="email"
|
|
31
31
|
:loginUrl="loginUrl"
|
|
32
|
+
:activeTabKey="activeTabKey"
|
|
32
33
|
@showBalanceModal="(val) => { $emit('showBalanceModal', val) }"
|
|
33
34
|
@setShowModal="(val) => { $emit('setShowModal', val) }"
|
|
34
35
|
@logout="$emit('logout')"
|
|
@@ -119,7 +120,8 @@ export default {
|
|
|
119
120
|
},
|
|
120
121
|
activeTabKey: {
|
|
121
122
|
type: String,
|
|
122
|
-
default:
|
|
123
|
+
default: "",
|
|
124
|
+
required: true
|
|
123
125
|
},
|
|
124
126
|
balance: {
|
|
125
127
|
type: Number,
|
|
@@ -51,13 +51,13 @@
|
|
|
51
51
|
<div :class="elem.link ? 'profile-menu__balance-link': 'profile-menu__links'"
|
|
52
52
|
class="gray-text"
|
|
53
53
|
v-if="elem.url"
|
|
54
|
-
|
|
54
|
+
>
|
|
55
55
|
<div>
|
|
56
56
|
{{ elem.name }}
|
|
57
57
|
</div>
|
|
58
58
|
<span
|
|
59
59
|
v-if="elem.link"
|
|
60
|
-
@click="
|
|
60
|
+
@click="handleClick(elem.url, elem.name)"
|
|
61
61
|
class="profile-menu__balance"
|
|
62
62
|
>
|
|
63
63
|
{{ elem.link }}
|
|
@@ -268,6 +268,11 @@ export default {
|
|
|
268
268
|
type: String,
|
|
269
269
|
default: "",
|
|
270
270
|
required: true
|
|
271
|
+
},
|
|
272
|
+
activeTabKey: {
|
|
273
|
+
type: String,
|
|
274
|
+
default: "",
|
|
275
|
+
required: true
|
|
271
276
|
}
|
|
272
277
|
},
|
|
273
278
|
components: {
|
|
@@ -287,6 +292,14 @@ export default {
|
|
|
287
292
|
if (this.profileDropDown && this.profileDropDown.length > 0) {
|
|
288
293
|
this.listDropDown = [...this.profileDropDown]
|
|
289
294
|
}
|
|
295
|
+
if(this.activeTabKey === 'counterparty') {
|
|
296
|
+
this.chosenElem = this.listDropDown.find(el => el.name === 'Контрагенты');
|
|
297
|
+
} else if (this.activeTabKey === 'tender') {
|
|
298
|
+
this.chosenElem = this.listDropDown.find(el => el.name === 'Тендеры');
|
|
299
|
+
} else if (this.activeTabKey === 'work') {
|
|
300
|
+
this.chosenElem = this.listDropDown.find(el => el.name === 'Работа');
|
|
301
|
+
}
|
|
302
|
+
this.chosenElem.opened = true;
|
|
290
303
|
},
|
|
291
304
|
computed: {
|
|
292
305
|
someMobileOpened() {
|
|
@@ -300,12 +313,16 @@ export default {
|
|
|
300
313
|
logout() {
|
|
301
314
|
this.$emit("logout");
|
|
302
315
|
},
|
|
303
|
-
handleClick(url, name) {
|
|
316
|
+
async handleClick(url, name) {
|
|
304
317
|
if (name.includes('Текущий')) {
|
|
305
|
-
window.
|
|
306
|
-
|
|
318
|
+
if(window.location.href.includes(this.toAdtdev(url))) {
|
|
319
|
+
this.$emit("setIsReplenishModal", true);
|
|
320
|
+
this.setShowModal(true);
|
|
321
|
+
} else {
|
|
322
|
+
await window.open(this.toAdtdev(url) + "&modal=show", "_blank")
|
|
323
|
+
}
|
|
307
324
|
} else {
|
|
308
|
-
window.open(this.toAdtdev(url), "_self");
|
|
325
|
+
await window.open(this.toAdtdev(url), "_self");
|
|
309
326
|
}
|
|
310
327
|
this.active = false;
|
|
311
328
|
if (this.chosenElem) this.chosenElem.opened = false;
|