mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Proposals
This commit is contained in:
parent
1f813c47ca
commit
8f2ef38cc1
@ -23,7 +23,6 @@ class CreateProposalRequest extends ProposalRequest
|
||||
{
|
||||
return [
|
||||
'quote_id' => 'required',
|
||||
'proposal_template_id' => 'required',
|
||||
];
|
||||
}
|
||||
}
|
||||
|
@ -27,7 +27,6 @@ class UpdateProposalRequest extends ProposalRequest
|
||||
|
||||
return [
|
||||
'quote_id' => 'required',
|
||||
'proposal_template_id' => 'required',
|
||||
];
|
||||
}
|
||||
}
|
||||
|
@ -90,7 +90,7 @@ class AddSubscriptionFormat extends Migration
|
||||
$table->boolean('is_deleted')->default(false);
|
||||
|
||||
$table->unsignedInteger('quote_id')->index();
|
||||
$table->unsignedInteger('proposal_template_id')->index();
|
||||
$table->unsignedInteger('proposal_template_id')->nullable()->index();
|
||||
$table->text('private_notes');
|
||||
$table->mediumText('html');
|
||||
$table->mediumText('css');
|
||||
|
@ -3,17 +3,8 @@
|
||||
@section('head')
|
||||
@parent
|
||||
|
||||
<script src="{{ asset('js/grapesjs.min.js') }}?no_cache={{ NINJA_VERSION }}" type="text/javascript"></script>
|
||||
<link href="{{ asset('css/grapesjs.css') }}?no_cache={{ NINJA_VERSION }}" rel="stylesheet" type="text/css"/>
|
||||
|
||||
<style>
|
||||
.gjs-four-color {
|
||||
color: white !important;
|
||||
}
|
||||
.gjs-block.fa {
|
||||
font-size: 4em !important;
|
||||
}
|
||||
</style>
|
||||
@include('money_script')
|
||||
@include('proposals.grapesjs_header')
|
||||
|
||||
@stop
|
||||
|
||||
@ -24,7 +15,6 @@
|
||||
->id('mainForm')
|
||||
->rules([
|
||||
'quote_id' => 'required',
|
||||
'proposal_template_id' => 'required',
|
||||
]) !!}
|
||||
|
||||
@if ($proposal)
|
||||
@ -122,11 +112,22 @@
|
||||
|
||||
if (field == 'quote_number') {
|
||||
field = 'invoice_number';
|
||||
} else if (field == 'valid_until') {
|
||||
field = 'due_date';
|
||||
} else if (field == 'quote_date') {
|
||||
field = 'invoice_date';
|
||||
}
|
||||
|
||||
var value = getDescendantProp(quote, field) || ' ';
|
||||
value = doubleDollarSign(value) + '';
|
||||
value = value.replace(/\n/g, "\\n").replace(/\r/g, "\\r");
|
||||
|
||||
if (field == 'amount' || field == 'partial') {
|
||||
value = formatMoneyInvoice(value, quote);
|
||||
} else if (['invoice_date', 'due_date'].indexOf(field) >= 0) {
|
||||
value = moment.utc(value).format('{{ $account->getMomentDateFormat() }}');
|
||||
}
|
||||
|
||||
html = html.replace(match, value);
|
||||
}
|
||||
}
|
||||
|
15
resources/views/proposals/grapesjs_header.blade.php
Normal file
15
resources/views/proposals/grapesjs_header.blade.php
Normal file
@ -0,0 +1,15 @@
|
||||
<script src="{{ asset('js/grapesjs.min.js') }}?no_cache={{ NINJA_VERSION }}" type="text/javascript"></script>
|
||||
<link href="{{ asset('css/grapesjs.css') }}?no_cache={{ NINJA_VERSION }}" rel="stylesheet" type="text/css"/>
|
||||
|
||||
<style>
|
||||
.gjs-four-color {
|
||||
color: white !important;
|
||||
}
|
||||
.gjs-block-label,
|
||||
.gjs-block-categories {
|
||||
font-size: 12px !important;
|
||||
}
|
||||
.gjs-toolbar-item {
|
||||
font-size: 2em !important;
|
||||
}
|
||||
</style>
|
@ -3,20 +3,7 @@
|
||||
@section('head')
|
||||
@parent
|
||||
|
||||
<script src="{{ asset('js/grapesjs.min.js') }}?no_cache={{ NINJA_VERSION }}" type="text/javascript"></script>
|
||||
<link href="{{ asset('css/grapesjs.css') }}?no_cache={{ NINJA_VERSION }}" rel="stylesheet" type="text/css"/>
|
||||
|
||||
<style>
|
||||
.gjs-four-color {
|
||||
color: white !important;
|
||||
}
|
||||
.gjs-block.fa {
|
||||
font-size: 4em !important;
|
||||
}
|
||||
.icon-select {
|
||||
font-family: sans-serif, 'FontAwesome';
|
||||
}
|
||||
</style>
|
||||
@include('proposals.grapesjs_header')
|
||||
|
||||
@stop
|
||||
|
||||
|
@ -3,17 +3,7 @@
|
||||
@section('head')
|
||||
@parent
|
||||
|
||||
<script src="{{ asset('js/grapesjs.min.js') }}?no_cache={{ NINJA_VERSION }}" type="text/javascript"></script>
|
||||
<link href="{{ asset('css/grapesjs.css') }}?no_cache={{ NINJA_VERSION }}" rel="stylesheet" type="text/css"/>
|
||||
|
||||
<style>
|
||||
.gjs-four-color {
|
||||
color: white !important;
|
||||
}
|
||||
.gjs-block.fa {
|
||||
font-size: 4em !important;
|
||||
}
|
||||
</style>
|
||||
@include('proposals.grapesjs_header')
|
||||
|
||||
@stop
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user