2020-03-23 18:10:42 +01:00
|
|
|
@extends('portal.ninja2020.layout.app')
|
2021-01-14 03:57:05 +01:00
|
|
|
@section('meta_title', ctrans('texts.entity_number_placeholder', ['entity' => ctrans('texts.quote'), 'entity_number' => $quote->number]))
|
2020-03-23 18:10:42 +01:00
|
|
|
|
2020-04-03 22:12:12 +02:00
|
|
|
@push('head')
|
2021-05-16 01:41:12 +02:00
|
|
|
<meta name="pdf-url" content="{{ asset($quote->pdf_file_path(null, 'url', true)) }}">
|
2020-04-03 22:12:12 +02:00
|
|
|
<script src="{{ asset('js/vendor/pdf.js/pdf.min.js') }}"></script>
|
2021-05-10 13:17:46 +02:00
|
|
|
|
|
|
|
<meta name="show-quote-terms" content="{{ $settings->show_accept_quote_terms ? true : false }}">
|
|
|
|
<meta name="require-quote-signature" content="{{ $client->company->account->hasFeature(\App\Models\Account::FEATURE_INVOICE_SETTINGS) && $settings->require_quote_signature }}">
|
|
|
|
|
2021-08-30 15:49:16 +02:00
|
|
|
@include('portal.ninja2020.components.no-cache')
|
|
|
|
|
2021-10-11 15:06:21 +02:00
|
|
|
<script src="{{ asset('vendor/signature_pad@2.3.2/signature_pad.min.js') }}"></script>
|
2020-04-03 22:12:12 +02:00
|
|
|
@endpush
|
|
|
|
|
2020-03-23 18:10:42 +01:00
|
|
|
@section('body')
|
|
|
|
|
2022-03-19 11:28:11 +01:00
|
|
|
@if(!$quote->isApproved() && $client->getSetting('custom_message_unapproved_quote'))
|
2020-04-13 03:48:23 +02:00
|
|
|
@component('portal.ninja2020.components.message')
|
2022-03-19 11:28:11 +01:00
|
|
|
{{ $client->getSetting('custom_message_unapproved_quote') }}
|
2020-04-13 03:48:23 +02:00
|
|
|
@endcomponent
|
|
|
|
@endif
|
|
|
|
|
2022-02-08 11:18:41 +01:00
|
|
|
@if(in_array($quote->status_id, [\App\Models\Quote::STATUS_SENT, \App\Models\Quote::STATUS_DRAFT]))
|
2021-01-14 13:29:46 +01:00
|
|
|
<div class="mb-4">
|
|
|
|
@include('portal.ninja2020.quotes.includes.actions', ['quote' => $quote])
|
|
|
|
</div>
|
2022-02-10 01:36:44 +01:00
|
|
|
@elseif($quote->status_id === \App\Models\Quote::STATUS_CONVERTED)
|
|
|
|
|
|
|
|
<div class="bg-white shadow sm:rounded-lg mb-4">
|
|
|
|
<div class="px-4 py-5 sm:p-6">
|
|
|
|
<div class="sm:flex sm:items-start sm:justify-between">
|
|
|
|
<div>
|
|
|
|
<h3 class="text-lg leading-6 font-medium text-gray-900">
|
|
|
|
{{ ctrans('texts.approved') }}
|
|
|
|
</h3>
|
|
|
|
|
2022-02-16 00:47:54 +01:00
|
|
|
@if($key)
|
|
|
|
<div class="btn hidden md:block" data-clipboard-text="{{url("client/quote/{$key}")}}" aria-label="Copied!">
|
2022-02-10 01:36:44 +01:00
|
|
|
<div class="flex text-sm leading-6 font-medium text-gray-500">
|
|
|
|
<p class="mr-2">{{url("client/quote/{$key}")}}</p>
|
|
|
|
<p><img class="h-5 w-5" src="{{ asset('assets/clippy.svg') }}" alt="Copy to clipboard"></p>
|
|
|
|
</div>
|
|
|
|
</div>
|
2022-02-16 00:47:54 +01:00
|
|
|
@endif
|
|
|
|
|
2022-02-10 01:36:44 +01:00
|
|
|
</div>
|
2022-04-06 04:22:13 +02:00
|
|
|
|
2022-05-05 02:21:00 +02:00
|
|
|
@if($quote->invoice()->exists())
|
2022-04-06 04:22:13 +02:00
|
|
|
<div class="mt-5 sm:mt-0 sm:ml-6 flex justify-end">
|
|
|
|
<div class="inline-flex rounded-md shadow-sm">
|
|
|
|
<a class="button button-primary bg-primary" href="/client/invoices/{{ $quote->invoice->hashed_id }}">{{ ctrans('texts.view_invoice') }}</a>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
@endif
|
2022-02-10 01:36:44 +01:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2021-12-11 11:29:32 +01:00
|
|
|
@elseif($quote->status_id === \App\Models\Quote::STATUS_APPROVED)
|
2022-02-10 01:36:44 +01:00
|
|
|
|
|
|
|
<div class="bg-white shadow sm:rounded-lg mb-4">
|
|
|
|
<div class="px-4 py-5 sm:p-6">
|
|
|
|
<div class="sm:flex sm:items-start sm:justify-between">
|
|
|
|
<div>
|
|
|
|
<h3 class="text-lg leading-6 font-medium text-gray-900">
|
|
|
|
{{ ctrans('texts.approved') }}
|
|
|
|
</h3>
|
|
|
|
|
2022-02-16 00:47:54 +01:00
|
|
|
@if($key)
|
|
|
|
<div class="btn hidden md:block" data-clipboard-text="{{url("client/quote/{$key}")}}" aria-label="Copied!">
|
2022-02-10 01:36:44 +01:00
|
|
|
<div class="flex text-sm leading-6 font-medium text-gray-500">
|
|
|
|
<p class="mr-2">{{url("client/quote/{$key}")}}</p>
|
|
|
|
<p><img class="h-5 w-5" src="{{ asset('assets/clippy.svg') }}" alt="Copy to clipboard"></p>
|
|
|
|
</div>
|
|
|
|
</div>
|
2022-02-16 00:47:54 +01:00
|
|
|
@endif
|
2022-02-10 01:36:44 +01:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2022-04-06 04:22:13 +02:00
|
|
|
|
2022-02-10 01:36:44 +01:00
|
|
|
@else
|
|
|
|
|
|
|
|
<div class="bg-white shadow sm:rounded-lg mb-4">
|
|
|
|
<div class="px-4 py-5 sm:p-6">
|
|
|
|
<div class="sm:flex sm:items-start sm:justify-between">
|
|
|
|
<div>
|
|
|
|
<h3 class="text-lg leading-6 font-medium text-gray-900">
|
|
|
|
{{ ctrans('texts.expired') }}
|
|
|
|
</h3>
|
|
|
|
|
2022-02-16 00:47:54 +01:00
|
|
|
@if($key)
|
|
|
|
<div class="btn hidden md:block" data-clipboard-text="{{url("client/quote/{$key}")}}" aria-label="Copied!">
|
2022-02-10 01:36:44 +01:00
|
|
|
<div class="flex text-sm leading-6 font-medium text-gray-500">
|
|
|
|
<p class="mr-2">{{url("client/quote/{$key}")}}</p>
|
|
|
|
<p><img class="h-5 w-5" src="{{ asset('assets/clippy.svg') }}" alt="Copy to clipboard"></p>
|
|
|
|
</div>
|
|
|
|
</div>
|
2022-02-16 00:47:54 +01:00
|
|
|
@endif
|
2022-02-10 01:36:44 +01:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2020-03-23 18:10:42 +01:00
|
|
|
@endif
|
|
|
|
|
2021-06-30 20:41:06 +02:00
|
|
|
@include('portal.ninja2020.components.entity-documents', ['entity' => $quote])
|
2021-07-21 13:01:53 +02:00
|
|
|
@include('portal.ninja2020.components.pdf-viewer', ['entity' => $quote])
|
2021-05-10 13:17:46 +02:00
|
|
|
@include('portal.ninja2020.invoices.includes.terms', ['entities' => [$quote], 'entity_type' => ctrans('texts.quote')])
|
|
|
|
@include('portal.ninja2020.invoices.includes.signature')
|
2020-04-03 22:12:12 +02:00
|
|
|
@endsection
|
2020-03-23 18:10:42 +01:00
|
|
|
|
2020-04-03 22:12:12 +02:00
|
|
|
@section('footer')
|
2021-05-10 13:17:46 +02:00
|
|
|
<script src="{{ asset('js/clients/quotes/approve.js') }}"></script>
|
2022-02-10 01:36:44 +01:00
|
|
|
<script src="{{ asset('vendor/clipboard.min.js') }}"></script>
|
|
|
|
|
|
|
|
<script type="text/javascript">
|
|
|
|
|
|
|
|
var clipboard = new ClipboardJS('.btn');
|
|
|
|
|
|
|
|
// clipboard.on('success', function(e) {
|
|
|
|
// console.info('Action:', e.action);
|
|
|
|
// console.info('Text:', e.text);
|
|
|
|
// console.info('Trigger:', e.trigger);
|
|
|
|
|
|
|
|
// e.clearSelection();
|
|
|
|
// });
|
|
|
|
|
|
|
|
// clipboard.on('error', function(e) {
|
|
|
|
// console.error('Action:', e.action);
|
|
|
|
// console.error('Trigger:', e.trigger);
|
|
|
|
// });
|
|
|
|
|
|
|
|
</script>
|
2020-03-23 18:10:42 +01:00
|
|
|
@endsection
|