Skip to content

Commit

Permalink
- Fixed some bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
639852 committed Jun 28, 2023
1 parent ef19878 commit 3e8ffda
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 8 deletions.
10 changes: 7 additions & 3 deletions src/components/appMain/appHeader.vue
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ export default {
icon: "reload",
onClickFuncion: () => {
const params = {
account: this.user.uuid,
account: this.userdata.uuid,
page: this.$store.getters["nocloud/transactions/page"],
limit: this.$store.getters["nocloud/transactions/size"],
field: "proc",
Expand Down Expand Up @@ -496,7 +496,8 @@ export default {
return conditions.some((el) => !!el);
},
isNeedBalance() {
if (this.headers[this.active])
if (this.user.paid_stop) return false;
else if (this.headers[this.active])
return this.headers[this.active].needBalance;
else if (this.$route.meta.isNeedBalance)
return this.$route.meta.isNeedBalance;
Expand All @@ -522,9 +523,12 @@ export default {
isLogged() {
return this.$store.getters['nocloud/auth/isLoggedIn'];
},
user() {
userdata() {
return this.$store.getters['nocloud/auth/userdata'];
},
user() {
return this.$store.getters['nocloud/auth/billingData'];
}
},
watch: {
active() {
Expand Down
5 changes: 3 additions & 2 deletions src/components/appMain/cloud/cloudItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -179,9 +179,10 @@ export default {
getModuleProductBtn() {
const serviceType = this.$config.getServiceType(this.instance.groupname)?.toLowerCase();
const isActive = ['active', 'running'].includes(this.instance.domainstatus?.toLowerCase());
const sp = this.getSP.find(({ uuid }) => uuid === this.instance.sp);
const key = this.instance.product ?? this.instance.config?.product;
const { meta } = this.instance.billingPlan?.products[key] ?? {};
if (sp?.meta.renew === false) return;
if (meta?.renew === false) return;
if (serviceType === undefined) return;
if (this.instance.date === 0) return;
if (!isActive && ['virtual', 'iaas'].includes(serviceType)) return;
Expand Down
3 changes: 2 additions & 1 deletion src/components/appMain/newPaaS.vue
Original file line number Diff line number Diff line change
Expand Up @@ -1614,11 +1614,12 @@ export default {
if (group.config.ssh) this.options.isSSHExist = true;
else this.options.isSSHExist = false;
},
locationId() {
itemSP() {
if (!this.dataLocalStorage.config) {
this.options.os = { id: -1, name: "" };
}
if (!this.itemSP?.uuid) return;
this.$store.dispatch("nocloud/plans/fetch", {
sp_uuid: this.itemSP.uuid,
anonymously: !this.isLoggedIn
Expand Down
2 changes: 1 addition & 1 deletion src/locales/ru.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"service": "услуга",
"services": "услуги",
"invoiceDate": "Дата счёта",
"dueDate": "Срок оплаты",
"dueDate": "Дата оплаты",
"Choice payment": "Способ оплаты",
"Information": "Информация",
"It’s empty...": "Тут пока ничего нет...",
Expand Down
24 changes: 23 additions & 1 deletion src/routes/userService.vue
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
</div>
</div>

<div class="service-page__info" v-if="!service.clientid">
<div class="service-page__info" v-if="isActionsActive">
<div class="service-page__info-title">
{{ $t('Actions') }}:
<div style="display: inline-flex; gap: 8px">
Expand Down Expand Up @@ -143,6 +143,16 @@
</div>
</a-col>
</a-row>

<div class="service-page__info" v-if="description">
<div class="service-page__info-title">
{{ $t("description") | capitalize }}:
</div>
<div class="service-page__info-value">
<div v-html="description"></div>
</div>
</div>

<component :is="getModuleButtons" :service="service" />
</template>

Expand Down Expand Up @@ -427,6 +437,18 @@ export default {
if (!(status === 'Active' || state?.state === 'RUNNING')) return;
return () => import(`@/components/services/${serviceType}/draw`);
},
isActionsActive() {
const key = this.service.product ?? this.service.config?.product;
const { meta } = this.service.billingPlan?.products[key] ?? {};
return !this.service.clientid && meta?.renew !== false;
},
description() {
const key = this.service.product ?? this.service.config.product;
const { meta } = this.service.billingPlan?.products[key] ?? {};
return meta?.description;
}
},
};
</script>
Expand Down

0 comments on commit 3e8ffda

Please sign in to comment.