-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1173 from slntopp/dev-pl
Dev pl
- Loading branch information
Showing
24 changed files
with
198 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
<template> | ||
<div> | ||
<v-row> | ||
<v-col> | ||
<v-text-field | ||
readonly | ||
label="price model" | ||
:value="template.billingPlan.title" | ||
@click:append="priceModelDialog = true" | ||
append-icon="mdi-pencil" | ||
/> | ||
</v-col> | ||
<v-col> | ||
<v-text-field | ||
readonly | ||
label="Product name" | ||
:value=" | ||
template.billingPlan.products[template.product]?.title || | ||
template.product | ||
" | ||
append-icon="mdi-pencil" | ||
@click:append="changeTariffDialog = true" | ||
/> | ||
</v-col> | ||
<v-col> | ||
<v-text-field | ||
readonly | ||
label="Date (create)" | ||
:value="template.data.creation" | ||
/> | ||
</v-col> | ||
|
||
<v-col | ||
v-if=" | ||
template.billingPlan.title.toLowerCase() !== 'payg' || | ||
isMonitoringEmpty | ||
" | ||
> | ||
<v-text-field | ||
readonly | ||
label="Due to date/next payment" | ||
:value="date" | ||
:append-icon="!isMonitoringEmpty ? 'mdi-pencil' : null" | ||
@click:append="changeDatesDialog = true" | ||
/> | ||
</v-col> | ||
</v-row> | ||
</div> | ||
</template> | ||
|
||
<script setup> | ||
import { defineProps, toRefs, computed } from "vue"; | ||
import { formatSecondsToDate } from "@/functions"; | ||
const props = defineProps(["template", "plans", "service", "sp"]); | ||
const { template } = toRefs(props); | ||
const date = computed(() => | ||
formatSecondsToDate(+template.value?.data?.next_payment_date) | ||
); | ||
const isMonitoringEmpty = computed(() => date.value === "-"); | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
<template> | ||
<billing-label | ||
:account="account" | ||
:template="template" | ||
:addons-price="0" | ||
:tariff-price="tariffPrice" | ||
:due-date="dueDate" | ||
@update="emit('update', $event)" | ||
/> | ||
</template> | ||
|
||
<script setup> | ||
import { computed, ref, toRefs } from "vue"; | ||
import { formatSecondsToDate } from "@/functions"; | ||
import { useStore } from "@/store"; | ||
import billingLabel from "@/components/ui/billingLabel.vue"; | ||
const props = defineProps(["template"]); | ||
const emit = defineEmits(["update"]); | ||
const store = useStore(); | ||
const { template } = toRefs(props); | ||
const account = computed(() => { | ||
const namespace = store.getters["namespaces/all"]?.find( | ||
(n) => n.uuid === template.value.access.namespace | ||
); | ||
const account = store.getters["accounts/all"].find( | ||
(a) => a.uuid === namespace.access.namespace | ||
); | ||
return account; | ||
}); | ||
const tariffPrice = ref( | ||
template.value.billingPlan.products[template.value.product]?.price ?? 0 | ||
); | ||
const dueDate = computed(() => { | ||
return formatSecondsToDate(+template.value?.data?.next_payment_date); | ||
}); | ||
</script> | ||
<style scoped></style> |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions
4
...ents/modules/virtual/serviceProviders.vue → ...onents/modules/empty/serviceProviders.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.