mirror of
https://github.com/crater-invoice/crater.git
synced 2025-10-28 04:01:10 -04:00
Compare commits
5 Commits
dependabot
...
fix-logout
| Author | SHA1 | Date | |
|---|---|---|---|
| bdf8fa8b5a | |||
| ba298cdb0a | |||
| 05d5ce26fd | |||
| 393fe20010 | |||
| 57bdbd2897 |
9
.github/workflows/uffizzi-build.yml
vendored
9
.github/workflows/uffizzi-build.yml
vendored
@ -14,8 +14,6 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: Checkout git repo
|
- name: Checkout git repo
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
- name: Set up Docker Buildx
|
|
||||||
uses: docker/setup-buildx-action@v2
|
|
||||||
- name: Generate UUID image name
|
- name: Generate UUID image name
|
||||||
id: uuid
|
id: uuid
|
||||||
run: echo "UUID_TAG_APP=$(uuidgen)" >> $GITHUB_ENV
|
run: echo "UUID_TAG_APP=$(uuidgen)" >> $GITHUB_ENV
|
||||||
@ -33,11 +31,10 @@ jobs:
|
|||||||
tags: ${{ steps.meta.outputs.tags }}
|
tags: ${{ steps.meta.outputs.tags }}
|
||||||
labels: ${{ steps.meta.outputs.labels }}
|
labels: ${{ steps.meta.outputs.labels }}
|
||||||
file: ./uffizzi/Dockerfile
|
file: ./uffizzi/Dockerfile
|
||||||
cache-from: type=gha
|
|
||||||
cache-to: type=gha,mode=max
|
|
||||||
|
|
||||||
|
|
||||||
build-nginx:
|
build-nginx:
|
||||||
|
needs:
|
||||||
|
- build-application
|
||||||
name: Build and Push `nginx`
|
name: Build and Push `nginx`
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
if: ${{ github.event_name != 'pull_request' || github.event.action != 'closed' }}
|
if: ${{ github.event_name != 'pull_request' || github.event.action != 'closed' }}
|
||||||
@ -65,6 +62,8 @@ jobs:
|
|||||||
tags: ${{ steps.meta.outputs.tags }}
|
tags: ${{ steps.meta.outputs.tags }}
|
||||||
labels: ${{ steps.meta.outputs.labels }}
|
labels: ${{ steps.meta.outputs.labels }}
|
||||||
file: ./uffizzi/nginx/Dockerfile
|
file: ./uffizzi/nginx/Dockerfile
|
||||||
|
build-args: |
|
||||||
|
BASE_IMAGE=${{ needs.build-application.outputs.tags }}
|
||||||
cache-from: type=gha
|
cache-from: type=gha
|
||||||
cache-to: type=gha,mode=max
|
cache-to: type=gha,mode=max
|
||||||
|
|
||||||
|
|||||||
1
.gitignore
vendored
1
.gitignore
vendored
@ -17,3 +17,4 @@ Homestead.yaml
|
|||||||
/public/docs
|
/public/docs
|
||||||
/.scribe
|
/.scribe
|
||||||
!storage/fonts/.gitkeep
|
!storage/fonts/.gitkeep
|
||||||
|
.DS_Store
|
||||||
|
|||||||
@ -55,7 +55,7 @@ class CreateTemplateCommand extends Command
|
|||||||
copy(public_path("/build/img/PDF/{$type}1.png"), public_path("/build/img/PDF/{$templateName}.png"));
|
copy(public_path("/build/img/PDF/{$type}1.png"), public_path("/build/img/PDF/{$templateName}.png"));
|
||||||
copy(resource_path("/static/img/PDF/{$type}1.png"), resource_path("/static/img/PDF/{$templateName}.png"));
|
copy(resource_path("/static/img/PDF/{$type}1.png"), resource_path("/static/img/PDF/{$templateName}.png"));
|
||||||
|
|
||||||
$path = resource_path("app/pdf/{$type}/{$templateName}.blade.php");
|
$path = resource_path("views/app/pdf/{$type}/{$templateName}.blade.php");
|
||||||
$type = ucfirst($type);
|
$type = ucfirst($type);
|
||||||
$this->info("{$type} Template created successfully at ".$path);
|
$this->info("{$type} Template created successfully at ".$path);
|
||||||
|
|
||||||
|
|||||||
@ -27,6 +27,7 @@ return [
|
|||||||
'tokenizer',
|
'tokenizer',
|
||||||
'JSON',
|
'JSON',
|
||||||
'cURL',
|
'cURL',
|
||||||
|
'zip',
|
||||||
],
|
],
|
||||||
'apache' => [
|
'apache' => [
|
||||||
'mod_rewrite',
|
'mod_rewrite',
|
||||||
|
|||||||
@ -35,16 +35,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div
|
<div
|
||||||
class="
|
class="grid col-span-12 mt-6 text-center xl:mt-0 sm:grid-cols-4 xl:text-right xl:col-span-3 xl:grid-cols-1 xxl:col-span-2"
|
||||||
grid
|
|
||||||
col-span-12
|
|
||||||
mt-6
|
|
||||||
text-center
|
|
||||||
xl:mt-0
|
|
||||||
sm:grid-cols-4
|
|
||||||
xl:text-right xl:col-span-3 xl:grid-cols-1
|
|
||||||
xxl:col-span-2
|
|
||||||
"
|
|
||||||
>
|
>
|
||||||
<div class="px-6 py-2">
|
<div class="px-6 py-2">
|
||||||
<span class="text-xs leading-5 lg:text-sm">
|
<span class="text-xs leading-5 lg:text-sm">
|
||||||
@ -177,10 +168,12 @@ const getChartInvoices = computed(() => {
|
|||||||
return []
|
return []
|
||||||
})
|
})
|
||||||
|
|
||||||
|
const customerId = computed(() => route.params.id)
|
||||||
|
|
||||||
watch(
|
watch(
|
||||||
route,
|
() => customerId.value,
|
||||||
() => {
|
(id) => {
|
||||||
if (route.params.id) {
|
if (id && route.name === 'customers.view') {
|
||||||
loadCustomer()
|
loadCustomer()
|
||||||
}
|
}
|
||||||
selectedYear.value = 'This year'
|
selectedYear.value = 'This year'
|
||||||
|
|||||||
@ -37,32 +37,10 @@
|
|||||||
|
|
||||||
<!-- Sidebar -->
|
<!-- Sidebar -->
|
||||||
<div
|
<div
|
||||||
class="
|
class="fixed top-0 left-0 hidden h-full pt-16 pb-[6.4rem] ml-56 bg-white xl:ml-64 w-88 xl:block"
|
||||||
fixed
|
|
||||||
top-0
|
|
||||||
left-0
|
|
||||||
hidden
|
|
||||||
h-full
|
|
||||||
pt-16
|
|
||||||
pb-[6.4rem]
|
|
||||||
ml-56
|
|
||||||
bg-white
|
|
||||||
xl:ml-64
|
|
||||||
w-88
|
|
||||||
xl:block
|
|
||||||
"
|
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
class="
|
class="flex items-center justify-between px-4 pt-8 pb-2 border border-gray-200 border-solid height-full"
|
||||||
flex
|
|
||||||
items-center
|
|
||||||
justify-between
|
|
||||||
px-4
|
|
||||||
pt-8
|
|
||||||
pb-2
|
|
||||||
border border-gray-200 border-solid
|
|
||||||
height-full
|
|
||||||
"
|
|
||||||
>
|
>
|
||||||
<div class="mb-6">
|
<div class="mb-6">
|
||||||
<BaseInput
|
<BaseInput
|
||||||
@ -92,14 +70,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<div
|
<div
|
||||||
class="
|
class="px-4 py-1 pb-2 mb-1 mb-2 text-sm border-b border-gray-200 border-solid"
|
||||||
px-4
|
|
||||||
py-1
|
|
||||||
pb-2
|
|
||||||
mb-1 mb-2
|
|
||||||
text-sm
|
|
||||||
border-b border-gray-200 border-solid
|
|
||||||
"
|
|
||||||
>
|
>
|
||||||
{{ $t('general.sort_by') }}
|
{{ $t('general.sort_by') }}
|
||||||
</div>
|
</div>
|
||||||
@ -156,12 +127,7 @@
|
|||||||
|
|
||||||
<div
|
<div
|
||||||
ref="estimateListSection"
|
ref="estimateListSection"
|
||||||
class="
|
class="h-full overflow-y-scroll border-l border-gray-200 border-solid base-scroll"
|
||||||
h-full
|
|
||||||
overflow-y-scroll
|
|
||||||
border-l border-gray-200 border-solid
|
|
||||||
base-scroll
|
|
||||||
"
|
|
||||||
>
|
>
|
||||||
<div v-for="(estimate, index) in estimateList" :key="index">
|
<div v-for="(estimate, index) in estimateList" :key="index">
|
||||||
<router-link
|
<router-link
|
||||||
@ -181,29 +147,11 @@
|
|||||||
<BaseText
|
<BaseText
|
||||||
:text="estimate.customer.name"
|
:text="estimate.customer.name"
|
||||||
:length="30"
|
:length="30"
|
||||||
class="
|
class="pr-2 mb-2 text-sm not-italic font-normal leading-5 text-black capitalize truncate"
|
||||||
pr-2
|
|
||||||
mb-2
|
|
||||||
text-sm
|
|
||||||
not-italic
|
|
||||||
font-normal
|
|
||||||
leading-5
|
|
||||||
text-black
|
|
||||||
capitalize
|
|
||||||
truncate
|
|
||||||
"
|
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<div
|
<div
|
||||||
class="
|
class="mt-1 mb-2 text-xs not-italic font-medium leading-5 text-gray-600"
|
||||||
mt-1
|
|
||||||
mb-2
|
|
||||||
text-xs
|
|
||||||
not-italic
|
|
||||||
font-medium
|
|
||||||
leading-5
|
|
||||||
text-gray-600
|
|
||||||
"
|
|
||||||
>
|
>
|
||||||
{{ estimate.estimate_number }}
|
{{ estimate.estimate_number }}
|
||||||
</div>
|
</div>
|
||||||
@ -220,26 +168,11 @@
|
|||||||
<BaseFormatMoney
|
<BaseFormatMoney
|
||||||
:amount="estimate.total"
|
:amount="estimate.total"
|
||||||
:currency="estimate.customer.currency"
|
:currency="estimate.customer.currency"
|
||||||
class="
|
class="block mb-2 text-xl not-italic font-semibold leading-8 text-right text-gray-900"
|
||||||
block
|
|
||||||
mb-2
|
|
||||||
text-xl
|
|
||||||
not-italic
|
|
||||||
font-semibold
|
|
||||||
leading-8
|
|
||||||
text-right text-gray-900
|
|
||||||
"
|
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<div
|
<div
|
||||||
class="
|
class="text-sm not-italic font-normal leading-5 text-right text-gray-600 est-date"
|
||||||
text-sm
|
|
||||||
not-italic
|
|
||||||
font-normal
|
|
||||||
leading-5
|
|
||||||
text-right text-gray-600
|
|
||||||
est-date
|
|
||||||
"
|
|
||||||
>
|
>
|
||||||
{{ estimate.formatted_estimate_date }}
|
{{ estimate.formatted_estimate_date }}
|
||||||
</div>
|
</div>
|
||||||
@ -264,13 +197,7 @@
|
|||||||
>
|
>
|
||||||
<iframe
|
<iframe
|
||||||
:src="`${shareableLink}`"
|
:src="`${shareableLink}`"
|
||||||
class="
|
class="flex-1 border border-gray-400 border-solid rounded-md bg-white frame-style"
|
||||||
flex-1
|
|
||||||
border border-gray-400 border-solid
|
|
||||||
rounded-md
|
|
||||||
bg-white
|
|
||||||
frame-style
|
|
||||||
"
|
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</BasePage>
|
</BasePage>
|
||||||
@ -345,11 +272,14 @@ const getCurrentEstimateId = computed(() => {
|
|||||||
return null
|
return null
|
||||||
})
|
})
|
||||||
|
|
||||||
watch(route, (to, from) => {
|
const estimateId = computed(() => route.params.id)
|
||||||
if (to.name === 'estimates.view') {
|
|
||||||
loadEstimate()
|
watch(
|
||||||
|
() => estimateId.value,
|
||||||
|
(id) => {
|
||||||
|
if (id && route.name === 'estimates.view') loadEstimate()
|
||||||
}
|
}
|
||||||
})
|
)
|
||||||
|
|
||||||
loadEstimates()
|
loadEstimates()
|
||||||
loadEstimate()
|
loadEstimate()
|
||||||
|
|||||||
@ -65,11 +65,14 @@ const getCurrentInvoiceId = computed(() => {
|
|||||||
return null
|
return null
|
||||||
})
|
})
|
||||||
|
|
||||||
watch(route, (to, from) => {
|
const invoiceId = computed(() => route.params.id)
|
||||||
if (to.name === 'invoices.view') {
|
|
||||||
loadInvoice()
|
watch(
|
||||||
|
() => invoiceId.value,
|
||||||
|
(id) => {
|
||||||
|
if (id && route.name === 'invoices.view') loadInvoice()
|
||||||
}
|
}
|
||||||
})
|
)
|
||||||
|
|
||||||
async function onMarkAsSent() {
|
async function onMarkAsSent() {
|
||||||
dialogStore
|
dialogStore
|
||||||
@ -286,32 +289,10 @@ onSearched = debounce(onSearched, 500)
|
|||||||
|
|
||||||
<!-- sidebar -->
|
<!-- sidebar -->
|
||||||
<div
|
<div
|
||||||
class="
|
class="fixed top-0 left-0 hidden h-full pt-16 pb-[6.4rem] ml-56 bg-white xl:ml-64 w-88 xl:block"
|
||||||
fixed
|
|
||||||
top-0
|
|
||||||
left-0
|
|
||||||
hidden
|
|
||||||
h-full
|
|
||||||
pt-16
|
|
||||||
pb-[6.4rem]
|
|
||||||
ml-56
|
|
||||||
bg-white
|
|
||||||
xl:ml-64
|
|
||||||
w-88
|
|
||||||
xl:block
|
|
||||||
"
|
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
class="
|
class="flex items-center justify-between px-4 pt-8 pb-2 border border-gray-200 border-solid height-full"
|
||||||
flex
|
|
||||||
items-center
|
|
||||||
justify-between
|
|
||||||
px-4
|
|
||||||
pt-8
|
|
||||||
pb-2
|
|
||||||
border border-gray-200 border-solid
|
|
||||||
height-full
|
|
||||||
"
|
|
||||||
>
|
>
|
||||||
<div class="mb-6">
|
<div class="mb-6">
|
||||||
<BaseInput
|
<BaseInput
|
||||||
@ -335,14 +316,7 @@ onSearched = debounce(onSearched, 500)
|
|||||||
</BaseButton>
|
</BaseButton>
|
||||||
</template>
|
</template>
|
||||||
<div
|
<div
|
||||||
class="
|
class="px-2 py-1 pb-2 mb-1 mb-2 text-sm border-b border-gray-200 border-solid"
|
||||||
px-2
|
|
||||||
py-1
|
|
||||||
pb-2
|
|
||||||
mb-1 mb-2
|
|
||||||
text-sm
|
|
||||||
border-b border-gray-200 border-solid
|
|
||||||
"
|
|
||||||
>
|
>
|
||||||
{{ $t('general.sort_by') }}
|
{{ $t('general.sort_by') }}
|
||||||
</div>
|
</div>
|
||||||
@ -399,12 +373,7 @@ onSearched = debounce(onSearched, 500)
|
|||||||
|
|
||||||
<div
|
<div
|
||||||
ref="invoiceListSection"
|
ref="invoiceListSection"
|
||||||
class="
|
class="h-full overflow-y-scroll border-l border-gray-200 border-solid base-scroll"
|
||||||
h-full
|
|
||||||
overflow-y-scroll
|
|
||||||
border-l border-gray-200 border-solid
|
|
||||||
base-scroll
|
|
||||||
"
|
|
||||||
>
|
>
|
||||||
<div v-for="(invoice, index) in invoiceList" :key="index">
|
<div v-for="(invoice, index) in invoiceList" :key="index">
|
||||||
<router-link
|
<router-link
|
||||||
@ -424,29 +393,11 @@ onSearched = debounce(onSearched, 500)
|
|||||||
<BaseText
|
<BaseText
|
||||||
:text="invoice.customer.name"
|
:text="invoice.customer.name"
|
||||||
:length="30"
|
:length="30"
|
||||||
class="
|
class="pr-2 mb-2 text-sm not-italic font-normal leading-5 text-black capitalize truncate"
|
||||||
pr-2
|
|
||||||
mb-2
|
|
||||||
text-sm
|
|
||||||
not-italic
|
|
||||||
font-normal
|
|
||||||
leading-5
|
|
||||||
text-black
|
|
||||||
capitalize
|
|
||||||
truncate
|
|
||||||
"
|
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<div
|
<div
|
||||||
class="
|
class="mt-1 mb-2 text-xs not-italic font-medium leading-5 text-gray-600"
|
||||||
mt-1
|
|
||||||
mb-2
|
|
||||||
text-xs
|
|
||||||
not-italic
|
|
||||||
font-medium
|
|
||||||
leading-5
|
|
||||||
text-gray-600
|
|
||||||
"
|
|
||||||
>
|
>
|
||||||
{{ invoice.invoice_number }}
|
{{ invoice.invoice_number }}
|
||||||
</div>
|
</div>
|
||||||
@ -460,27 +411,12 @@ onSearched = debounce(onSearched, 500)
|
|||||||
|
|
||||||
<div class="flex-1 whitespace-nowrap right">
|
<div class="flex-1 whitespace-nowrap right">
|
||||||
<BaseFormatMoney
|
<BaseFormatMoney
|
||||||
class="
|
class="mb-2 text-xl not-italic font-semibold leading-8 text-right text-gray-900 block"
|
||||||
mb-2
|
|
||||||
text-xl
|
|
||||||
not-italic
|
|
||||||
font-semibold
|
|
||||||
leading-8
|
|
||||||
text-right text-gray-900
|
|
||||||
block
|
|
||||||
"
|
|
||||||
:amount="invoice.total"
|
:amount="invoice.total"
|
||||||
:currency="invoice.customer.currency"
|
:currency="invoice.customer.currency"
|
||||||
/>
|
/>
|
||||||
<div
|
<div
|
||||||
class="
|
class="text-sm not-italic font-normal leading-5 text-right text-gray-600 est-date"
|
||||||
text-sm
|
|
||||||
not-italic
|
|
||||||
font-normal
|
|
||||||
leading-5
|
|
||||||
text-right text-gray-600
|
|
||||||
est-date
|
|
||||||
"
|
|
||||||
>
|
>
|
||||||
{{ invoice.formatted_invoice_date }}
|
{{ invoice.formatted_invoice_date }}
|
||||||
</div>
|
</div>
|
||||||
@ -505,13 +441,7 @@ onSearched = debounce(onSearched, 500)
|
|||||||
>
|
>
|
||||||
<iframe
|
<iframe
|
||||||
:src="`${shareableLink}`"
|
:src="`${shareableLink}`"
|
||||||
class="
|
class="flex-1 border border-gray-400 border-solid bg-white rounded-md frame-style"
|
||||||
flex-1
|
|
||||||
border border-gray-400 border-solid
|
|
||||||
bg-white
|
|
||||||
rounded-md
|
|
||||||
frame-style
|
|
||||||
"
|
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</BasePage>
|
</BasePage>
|
||||||
|
|||||||
@ -22,31 +22,10 @@
|
|||||||
|
|
||||||
<!-- Sidebar -->
|
<!-- Sidebar -->
|
||||||
<div
|
<div
|
||||||
class="
|
class="fixed top-0 left-0 hidden h-full pt-16 pb-[6rem] ml-56 bg-white xl:ml-64 w-88 xl:block"
|
||||||
fixed
|
|
||||||
top-0
|
|
||||||
left-0
|
|
||||||
hidden
|
|
||||||
h-full
|
|
||||||
pt-16
|
|
||||||
pb-[6rem]
|
|
||||||
ml-56
|
|
||||||
bg-white
|
|
||||||
xl:ml-64
|
|
||||||
w-88
|
|
||||||
xl:block
|
|
||||||
"
|
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
class="
|
class="flex items-center justify-between px-4 pt-8 pb-6 border border-gray-200 border-solid"
|
||||||
flex
|
|
||||||
items-center
|
|
||||||
justify-between
|
|
||||||
px-4
|
|
||||||
pt-8
|
|
||||||
pb-6
|
|
||||||
border border-gray-200 border-solid
|
|
||||||
"
|
|
||||||
>
|
>
|
||||||
<BaseInput
|
<BaseInput
|
||||||
v-model="searchData.searchText"
|
v-model="searchData.searchText"
|
||||||
@ -70,14 +49,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<div
|
<div
|
||||||
class="
|
class="px-4 py-1 pb-2 mb-2 text-sm border-b border-gray-200 border-solid"
|
||||||
px-4
|
|
||||||
py-1
|
|
||||||
pb-2
|
|
||||||
mb-2
|
|
||||||
text-sm
|
|
||||||
border-b border-gray-200 border-solid
|
|
||||||
"
|
|
||||||
>
|
>
|
||||||
{{ $t('general.sort_by') }}
|
{{ $t('general.sort_by') }}
|
||||||
</div>
|
</div>
|
||||||
@ -159,43 +131,17 @@
|
|||||||
<BaseText
|
<BaseText
|
||||||
:text="payment?.customer?.name"
|
:text="payment?.customer?.name"
|
||||||
:length="30"
|
:length="30"
|
||||||
class="
|
class="pr-2 mb-2 text-sm not-italic font-normal leading-5 text-black capitalize truncate"
|
||||||
pr-2
|
|
||||||
mb-2
|
|
||||||
text-sm
|
|
||||||
not-italic
|
|
||||||
font-normal
|
|
||||||
leading-5
|
|
||||||
text-black
|
|
||||||
capitalize
|
|
||||||
truncate
|
|
||||||
"
|
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<div
|
<div
|
||||||
class="
|
class="mb-1 text-xs not-italic font-medium leading-5 text-gray-500 capitalize"
|
||||||
mb-1
|
|
||||||
text-xs
|
|
||||||
not-italic
|
|
||||||
font-medium
|
|
||||||
leading-5
|
|
||||||
text-gray-500
|
|
||||||
capitalize
|
|
||||||
"
|
|
||||||
>
|
>
|
||||||
{{ payment?.payment_number }}
|
{{ payment?.payment_number }}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div
|
<div
|
||||||
class="
|
class="mb-1 text-xs not-italic font-medium leading-5 text-gray-500 capitalize"
|
||||||
mb-1
|
|
||||||
text-xs
|
|
||||||
not-italic
|
|
||||||
font-medium
|
|
||||||
leading-5
|
|
||||||
text-gray-500
|
|
||||||
capitalize
|
|
||||||
"
|
|
||||||
>
|
>
|
||||||
{{ payment?.invoice_number }}
|
{{ payment?.invoice_number }}
|
||||||
</div>
|
</div>
|
||||||
@ -203,15 +149,7 @@
|
|||||||
|
|
||||||
<div class="flex-1 whitespace-nowrap right">
|
<div class="flex-1 whitespace-nowrap right">
|
||||||
<BaseFormatMoney
|
<BaseFormatMoney
|
||||||
class="
|
class="block mb-2 text-xl not-italic font-semibold leading-8 text-right text-gray-900"
|
||||||
block
|
|
||||||
mb-2
|
|
||||||
text-xl
|
|
||||||
not-italic
|
|
||||||
font-semibold
|
|
||||||
leading-8
|
|
||||||
text-right text-gray-900
|
|
||||||
"
|
|
||||||
:amount="payment?.amount"
|
:amount="payment?.amount"
|
||||||
:currency="payment.customer?.currency"
|
:currency="payment.customer?.currency"
|
||||||
/>
|
/>
|
||||||
@ -313,9 +251,14 @@ const paymentDate = computed(() => {
|
|||||||
)
|
)
|
||||||
})
|
})
|
||||||
|
|
||||||
watch(route, () => {
|
const paymentId = computed(() => route.params.id)
|
||||||
loadPayment()
|
|
||||||
})
|
watch(
|
||||||
|
() => paymentId.value,
|
||||||
|
(id) => {
|
||||||
|
if (id && route.name === 'payments.view') loadPayment()
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
loadPayments()
|
loadPayments()
|
||||||
loadPayment()
|
loadPayment()
|
||||||
|
|||||||
@ -78,10 +78,12 @@ let isLoading = computed(() => {
|
|||||||
return recurringInvoiceStore.isFetchingViewData
|
return recurringInvoiceStore.isFetchingViewData
|
||||||
})
|
})
|
||||||
|
|
||||||
|
const invoiceId = computed(() => route.params.id)
|
||||||
|
|
||||||
watch(
|
watch(
|
||||||
route,
|
() => invoiceId.value,
|
||||||
() => {
|
(id) => {
|
||||||
if (route.params.id && route.name === 'recurring-invoices.view') {
|
if (id && route.name === 'recurring-invoices.view') {
|
||||||
loadRecurringInvoice()
|
loadRecurringInvoice()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@ -11,7 +11,8 @@ RUN apt-get update && apt-get install -y \
|
|||||||
unzip \
|
unzip \
|
||||||
libzip-dev \
|
libzip-dev \
|
||||||
libmagickwand-dev \
|
libmagickwand-dev \
|
||||||
mariadb-client
|
mariadb-client \
|
||||||
|
npm
|
||||||
|
|
||||||
# Clear cache
|
# Clear cache
|
||||||
RUN apt-get clean && rm -rf /var/lib/apt/lists/*
|
RUN apt-get clean && rm -rf /var/lib/apt/lists/*
|
||||||
@ -45,4 +46,19 @@ RUN chmod -R 775 composer.json composer.lock \
|
|||||||
RUN chown -R $(whoami):$(whoami) /var/log/
|
RUN chown -R $(whoami):$(whoami) /var/log/
|
||||||
RUN chmod -R 775 /var/log
|
RUN chmod -R 775 /var/log
|
||||||
|
|
||||||
|
# Cleanup manually generated build files
|
||||||
|
RUN rm -rf /var/www/public/build
|
||||||
|
RUN npm config set user 0
|
||||||
|
RUN npm config set unsafe-perm true
|
||||||
|
# Frontend bulding
|
||||||
|
RUN sed -i 's/DB_CONNECTION=mysql/DB_CONNECTION=sqlite/g' /var/www/.env
|
||||||
|
RUN sed -i 's/DB_DATABASE=crater/DB_DATABASE=\/tmp\/crater.sqlite/g' /var/www/.env
|
||||||
|
RUN touch /tmp/crater.sqlite
|
||||||
|
RUN composer install --no-interaction --prefer-dist
|
||||||
|
RUN npm i -f
|
||||||
|
RUN npm install --save-dev sass
|
||||||
|
RUN export NODE_OPTIONS="--max-old-space-size=4096" && /usr/bin/npx vite build --target=es2020
|
||||||
|
RUN sed -i 's/DB_CONNECTION=sqlite/DB_CONNECTION=mysql/g' /var/www/.env
|
||||||
|
RUN sed -i 's/DB_DATABASE=\/tmp\/crater.sqlite/DB_DATABASE=crater/g' /var/www/.env
|
||||||
|
|
||||||
USER crater-user
|
USER crater-user
|
||||||
|
|||||||
@ -1,7 +1,9 @@
|
|||||||
|
ARG BASE_IMAGE
|
||||||
|
|
||||||
|
FROM $BASE_IMAGE as build
|
||||||
FROM nginx:1.17-alpine
|
FROM nginx:1.17-alpine
|
||||||
|
|
||||||
RUN rm /etc/nginx/conf.d/default.conf
|
RUN rm /etc/nginx/conf.d/default.conf
|
||||||
|
|
||||||
COPY ./ /var/www
|
COPY --from=build /var/www /var/www
|
||||||
COPY ./uffizzi/nginx/nginx /etc/nginx/conf.d/
|
COPY ./uffizzi/nginx/nginx /etc/nginx/conf.d/
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user