mirror of
https://github.com/sky-systems/sky_phone.git
synced 2026-09-04 17:23:25 +00:00
ENH - merge dev into Companies feature
This commit is contained in:
@@ -288,6 +288,7 @@ onBeforeUnmount(() => {
|
||||
</div>
|
||||
<template v-else-if="billing.detail">
|
||||
<kGlass
|
||||
:highlight="false"
|
||||
class="billing-detail__hero"
|
||||
:class="{
|
||||
'billing-detail__hero--paid': billing.detail.status === 'paid',
|
||||
@@ -441,17 +442,26 @@ onBeforeUnmount(() => {
|
||||
|
||||
<template v-else-if="tab === 'overview' && billing.overview">
|
||||
<div class="billing-summary">
|
||||
<kGlass class="billing-summary__item billing-summary__item--open">
|
||||
<kGlass
|
||||
:highlight="false"
|
||||
class="billing-summary__item billing-summary__item--open"
|
||||
>
|
||||
<ReceiptText :size="19" />
|
||||
<span>{{ t('summary.open') }}</span>
|
||||
<strong>{{ billing.overview.openCount }}</strong>
|
||||
</kGlass>
|
||||
<kGlass class="billing-summary__item billing-summary__item--due">
|
||||
<kGlass
|
||||
:highlight="false"
|
||||
class="billing-summary__item billing-summary__item--due"
|
||||
>
|
||||
<CalendarDays :size="19" />
|
||||
<span>{{ t('summary.due') }}</span>
|
||||
<strong>{{ formatMoney(billing.overview.openTotal) }}</strong>
|
||||
</kGlass>
|
||||
<kGlass class="billing-summary__item billing-summary__item--overdue">
|
||||
<kGlass
|
||||
:highlight="false"
|
||||
class="billing-summary__item billing-summary__item--overdue"
|
||||
>
|
||||
<AlertTriangle :size="19" />
|
||||
<span>{{ t('summary.overdue') }}</span>
|
||||
<strong>{{ billing.overview.overdueCount }}</strong>
|
||||
@@ -743,7 +753,7 @@ onBeforeUnmount(() => {
|
||||
/></span>
|
||||
<h2>{{ t('payment.title') }}</h2>
|
||||
<p>{{ t('payment.body', { issuer: billing.detail.issuerLabel }) }}</p>
|
||||
<kGlass class="billing-payment-total">
|
||||
<kGlass :highlight="false" class="billing-payment-total">
|
||||
<span>{{ billing.detail.title }}</span>
|
||||
<strong>{{
|
||||
formatMoney(billing.detail.amount, billing.detail.currency)
|
||||
|
||||
@@ -118,14 +118,24 @@ function queueCapture(id: string, mediaType: MediaType): void {
|
||||
captures.value = captures.value.slice(0, 6)
|
||||
}
|
||||
|
||||
function devMedia(id: string, mediaType: MediaType): PhoneMedia {
|
||||
const svg = `<svg xmlns="http://www.w3.org/2000/svg" width="900" height="1600"><defs><linearGradient id="g" x1="0" y1="0" x2="1" y2="1"><stop stop-color="#19354f"/><stop offset="1" stop-color="#d78357"/></linearGradient></defs><rect width="900" height="1600" fill="url(#g)"/><circle cx="680" cy="380" r="210" fill="#ffffff22"/><path d="M0 1200 260 840l180 220 170-170 290 310v400H0z" fill="#102331aa"/></svg>`
|
||||
return {
|
||||
createdAt: Date.now(),
|
||||
id: Number(Date.now()),
|
||||
mediaType,
|
||||
url: `data:image/svg+xml,${encodeURIComponent(svg)}#${id}`,
|
||||
}
|
||||
async function completeDevelopmentCapture(
|
||||
correlationId: string,
|
||||
mediaType: MediaType,
|
||||
): Promise<void> {
|
||||
const response = await nuiCall<PhoneMedia>('media:devCapture', { mediaType })
|
||||
window.dispatchEvent(
|
||||
new MessageEvent('message', {
|
||||
data: {
|
||||
data: {
|
||||
correlationId,
|
||||
error: response.error,
|
||||
media: response.data,
|
||||
success: response.success,
|
||||
},
|
||||
type: 'media:uploadResult',
|
||||
},
|
||||
}),
|
||||
)
|
||||
}
|
||||
|
||||
async function requestPhoto(): Promise<void> {
|
||||
@@ -138,20 +148,7 @@ async function requestPhoto(): Promise<void> {
|
||||
shutterActive.value = false
|
||||
}, 280)
|
||||
if (isDevelopment) {
|
||||
window.setTimeout(() => {
|
||||
window.dispatchEvent(
|
||||
new MessageEvent('message', {
|
||||
data: {
|
||||
data: {
|
||||
correlationId: id,
|
||||
media: devMedia(id, 'photo'),
|
||||
success: true,
|
||||
},
|
||||
type: 'media:uploadResult',
|
||||
},
|
||||
}),
|
||||
)
|
||||
}, 700)
|
||||
window.setTimeout(() => void completeDevelopmentCapture(id, 'photo'), 700)
|
||||
return
|
||||
}
|
||||
await nuiCall('media:requestUpload', {
|
||||
@@ -196,20 +193,7 @@ function stopRecording(): void {
|
||||
savingVideo.value = true
|
||||
if (recordingTimer !== undefined) window.clearInterval(recordingTimer)
|
||||
recordingTimer = undefined
|
||||
window.setTimeout(() => {
|
||||
window.dispatchEvent(
|
||||
new MessageEvent('message', {
|
||||
data: {
|
||||
data: {
|
||||
correlationId: id,
|
||||
media: devMedia(id, 'video'),
|
||||
success: true,
|
||||
},
|
||||
type: 'media:uploadResult',
|
||||
},
|
||||
}),
|
||||
)
|
||||
}, 900)
|
||||
window.setTimeout(() => void completeDevelopmentCapture(id, 'video'), 900)
|
||||
return
|
||||
}
|
||||
window.postMessage(
|
||||
|
||||
@@ -407,6 +407,8 @@ async function saveContactDetails(): Promise<void> {
|
||||
const response = await calls.saveContact({
|
||||
id: activeContact.value?.id,
|
||||
name: contactNameDraft.value.trim(),
|
||||
notes: activeContact.value?.notes ?? '',
|
||||
organization: activeContact.value?.organization ?? '',
|
||||
phoneNumber: contactNumberDraft.value,
|
||||
})
|
||||
if (!response.success) {
|
||||
|
||||
+3648
-231
File diff suppressed because it is too large
Load Diff
@@ -1337,7 +1337,7 @@ onBeforeUnmount(() => {
|
||||
"
|
||||
/>
|
||||
<k-list-item
|
||||
v-if="phone.device?.sim"
|
||||
v-if="phone.device?.sim?.removable"
|
||||
:title="phone.t('Apps.settings.simType')"
|
||||
:after="
|
||||
phone.t(
|
||||
@@ -1348,7 +1348,7 @@ onBeforeUnmount(() => {
|
||||
"
|
||||
/>
|
||||
<k-list-button
|
||||
v-if="phone.device?.sim"
|
||||
v-if="phone.device?.sim?.removable"
|
||||
@click="simEjectOpened = true"
|
||||
>
|
||||
{{ phone.t('Apps.settings.ejectSim') }}
|
||||
@@ -1610,7 +1610,11 @@ onBeforeUnmount(() => {
|
||||
</template>
|
||||
</k-dialog>
|
||||
|
||||
<k-dialog :opened="simEjectOpened" @backdropclick="simEjectOpened = false">
|
||||
<k-dialog
|
||||
v-if="phone.device?.sim?.removable"
|
||||
:opened="simEjectOpened"
|
||||
@backdropclick="simEjectOpened = false"
|
||||
>
|
||||
<template #title>{{ phone.t('Apps.settings.ejectSim') }}</template>
|
||||
<p>{{ phone.t('Apps.settings.ejectSimBody') }}</p>
|
||||
<template #buttons>
|
||||
|
||||
Reference in New Issue
Block a user