mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Working on portal
This commit is contained in:
parent
d1f5b8dd32
commit
1de93e0f03
@ -962,4 +962,19 @@ class ClientPortalController extends BaseController
|
|||||||
|
|
||||||
return Redirect::to('client/invoices/recurring');
|
return Redirect::to('client/invoices/recurring');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function showDetails()
|
||||||
|
{
|
||||||
|
if (! $contact = $this->getContact()) {
|
||||||
|
return $this->returnError();
|
||||||
|
}
|
||||||
|
|
||||||
|
$data = [
|
||||||
|
'contact' => $contact,
|
||||||
|
'client' => $contact->client,
|
||||||
|
'account' => $contact->account,
|
||||||
|
];
|
||||||
|
|
||||||
|
return view('invited.details', $data);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -23,6 +23,7 @@ class ComposerServiceProvider extends ServiceProvider
|
|||||||
'expenses.edit',
|
'expenses.edit',
|
||||||
'accounts.localization',
|
'accounts.localization',
|
||||||
'payments.credit_card',
|
'payments.credit_card',
|
||||||
|
'invited.details',
|
||||||
],
|
],
|
||||||
'App\Http\ViewComposers\TranslationComposer'
|
'App\Http\ViewComposers\TranslationComposer'
|
||||||
);
|
);
|
||||||
|
2
public/css/built.public.css
vendored
2
public/css/built.public.css
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
2
resources/assets/css/public.style.css
vendored
2
resources/assets/css/public.style.css
vendored
@ -1,7 +1,7 @@
|
|||||||
body {
|
body {
|
||||||
font-family: 'Roboto', sans-serif;
|
font-family: 'Roboto', sans-serif;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
background-color: #f0f0f0;
|
background-color: #f8f8f8;
|
||||||
}
|
}
|
||||||
html {
|
html {
|
||||||
overflow-y: scroll;
|
overflow-y: scroll;
|
||||||
|
@ -2651,7 +2651,8 @@ $LANG = array(
|
|||||||
'return_to_login' => 'Return to Login',
|
'return_to_login' => 'Return to Login',
|
||||||
'convert_products_tip' => 'Note: add a custom field named ":name" to see the exchange rate.',
|
'convert_products_tip' => 'Note: add a custom field named ":name" to see the exchange rate.',
|
||||||
'amount_greater_than_balance' => 'The amount is greater than the invoice balance, a credit will be created with the remaining amount.',
|
'amount_greater_than_balance' => 'The amount is greater than the invoice balance, a credit will be created with the remaining amount.',
|
||||||
'custom_fields_tip' => 'Use <code>Label|Option1,Option2</code> to show a select box.'
|
'custom_fields_tip' => 'Use <code>Label|Option1,Option2</code> to show a select box.',
|
||||||
|
'client_information' => 'Client Information',
|
||||||
|
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -350,7 +350,8 @@
|
|||||||
@endif
|
@endif
|
||||||
@if ($client->hasRecurringInvoices())
|
@if ($client->hasRecurringInvoices())
|
||||||
<div class="pull-right">
|
<div class="pull-right">
|
||||||
{!! Button::primary(trans("texts.recurring_invoices"))->asLinkTo(URL::to('/client/invoices/recurring')) !!}
|
{!! Button::primary(strtoupper(trans("texts.recurring")))->asLinkTo(URL::to('/client/invoices/recurring')) !!}
|
||||||
|
{!! Button::success(strtoupper(trans("texts.edit_details")))->asLinkTo(URL::to('/client/details')) !!}
|
||||||
</div>
|
</div>
|
||||||
@endif
|
@endif
|
||||||
</div>
|
</div>
|
||||||
|
176
resources/views/invited/details.blade.php
Normal file
176
resources/views/invited/details.blade.php
Normal file
@ -0,0 +1,176 @@
|
|||||||
|
@extends('public.header')
|
||||||
|
|
||||||
|
@section('content')
|
||||||
|
|
||||||
|
@include('payments.payment_css')
|
||||||
|
|
||||||
|
<div class="container">
|
||||||
|
<p> </p>
|
||||||
|
|
||||||
|
<div class="panel panel-default">
|
||||||
|
<div class="panel-body">
|
||||||
|
|
||||||
|
<p> </p>
|
||||||
|
<p> </p>
|
||||||
|
|
||||||
|
{!! Former::vertical_open()
|
||||||
|
->autocomplete('on')
|
||||||
|
->addClass('payment-form')
|
||||||
|
->id('payment-form')
|
||||||
|
->rules(array(
|
||||||
|
'first_name' => 'required',
|
||||||
|
'last_name' => 'required',
|
||||||
|
'address1' => 'required',
|
||||||
|
'city' => 'required',
|
||||||
|
'state' => 'required',
|
||||||
|
'postal_code' => 'required',
|
||||||
|
'country_id' => 'required',
|
||||||
|
'phone' => 'required',
|
||||||
|
'email' => 'required|email',
|
||||||
|
)) !!}
|
||||||
|
|
||||||
|
|
||||||
|
@if ($client)
|
||||||
|
{{ Former::populate($client) }}
|
||||||
|
{{ Former::populateField('first_name', $contact->first_name) }}
|
||||||
|
{{ Former::populateField('last_name', $contact->last_name) }}
|
||||||
|
{{ Former::populateField('email', $contact->email) }}
|
||||||
|
@if (!$client->country_id && $client->account->country_id)
|
||||||
|
{{ Former::populateField('country_id', $client->account->country_id) }}
|
||||||
|
{{ Former::populateField('shipping_country_id', $client->account->country_id) }}
|
||||||
|
@endif
|
||||||
|
@if (!$client->currency_id && $client->account->currency_id)
|
||||||
|
{{ Former::populateField('currency_id', $client->account->currency_id) }}
|
||||||
|
{{ Former::populateField('currency', $client->account->currency->code) }}
|
||||||
|
@endif
|
||||||
|
@endif
|
||||||
|
|
||||||
|
<h3>{{ trans('texts.client_information') }}</h3>
|
||||||
|
<hr class="form-legend"/>
|
||||||
|
|
||||||
|
<div style="padding-bottom: 22px;">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-6">
|
||||||
|
{!! Former::text('name')
|
||||||
|
->placeholder(trans('texts.name'))
|
||||||
|
->label('') !!}
|
||||||
|
</div>
|
||||||
|
@if ($account->vat_number)
|
||||||
|
<div class="col-md-6">
|
||||||
|
{!! Former::text('vat_number')
|
||||||
|
->placeholder(trans('texts.vat_number'))
|
||||||
|
->label('') !!}
|
||||||
|
</div>
|
||||||
|
@endif
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<h3>{{ trans('texts.contact_information') }}</h3>
|
||||||
|
<hr class="form-legend"/>
|
||||||
|
|
||||||
|
<div style="padding-bottom: 22px;">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-6">
|
||||||
|
{!! Former::text('first_name')
|
||||||
|
->placeholder(trans('texts.first_name'))
|
||||||
|
->label('') !!}
|
||||||
|
</div>
|
||||||
|
<div class="col-md-6">
|
||||||
|
{!! Former::text('last_name')
|
||||||
|
->placeholder(trans('texts.last_name'))
|
||||||
|
->autocomplete('family-name')
|
||||||
|
->label('') !!}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row" style="display:{{ isset($paymentTitle) || empty($contact->email) ? 'block' : 'none' }}">
|
||||||
|
<div class="col-md-12">
|
||||||
|
{!! Former::text('email')
|
||||||
|
->placeholder(trans('texts.email'))
|
||||||
|
->autocomplete('email')
|
||||||
|
->label('') !!}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<h3>{{ trans('texts.billing_address') }}</h3>
|
||||||
|
<hr class="form-legend"/>
|
||||||
|
|
||||||
|
<div style="padding-bottom: 22px;" class="billing-address">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-6">
|
||||||
|
{!! Former::text('address1')
|
||||||
|
->autocomplete('address-line1')
|
||||||
|
->placeholder(trans('texts.address1'))
|
||||||
|
->label('') !!}
|
||||||
|
</div>
|
||||||
|
<div class="col-md-6">
|
||||||
|
{!! Former::text('address2')
|
||||||
|
->autocomplete('address-line2')
|
||||||
|
->placeholder(trans('texts.address2'))
|
||||||
|
->label('') !!}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-6">
|
||||||
|
{!! Former::text('city')
|
||||||
|
->autocomplete('address-level2')
|
||||||
|
->placeholder(trans('texts.city'))
|
||||||
|
->label('') !!}
|
||||||
|
</div>
|
||||||
|
<div class="col-md-6">
|
||||||
|
{!! Former::text('state')
|
||||||
|
->autocomplete('address-level1')
|
||||||
|
->placeholder(trans('texts.state'))
|
||||||
|
->label('') !!}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-6">
|
||||||
|
{!! Former::text('postal_code')
|
||||||
|
->autocomplete('postal-code')
|
||||||
|
->placeholder(trans('texts.postal_code'))
|
||||||
|
->label('') !!}
|
||||||
|
</div>
|
||||||
|
<div class="col-md-6">
|
||||||
|
{!! Former::select('country_id')
|
||||||
|
->placeholder(trans('texts.country_id'))
|
||||||
|
->fromQuery($countries, 'name', 'id')
|
||||||
|
->addGroupClass('country-select')
|
||||||
|
->label('') !!}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<p> </p>
|
||||||
|
|
||||||
|
<center>
|
||||||
|
{!! Button::normal(strtoupper(trans('texts.cancel') ))->asLinkTo('/client/dashboard')->large() !!}
|
||||||
|
{!! Button::success(strtoupper(trans('texts.save') ))->submit()->large() !!}
|
||||||
|
</center>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{!! Former::close() !!}
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
|
||||||
|
$(function() {
|
||||||
|
$('#country_id, #shipping_country_id').combobox();
|
||||||
|
$('#first_name').focus();
|
||||||
|
});
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
@stop
|
@ -29,6 +29,8 @@ Route::group(['middleware' => ['lookup:contact', 'auth:client']], function () {
|
|||||||
Route::post('client/payment_methods/verify', 'ClientPortalController@verifyPaymentMethod');
|
Route::post('client/payment_methods/verify', 'ClientPortalController@verifyPaymentMethod');
|
||||||
Route::post('client/payment_methods/default', 'ClientPortalController@setDefaultPaymentMethod');
|
Route::post('client/payment_methods/default', 'ClientPortalController@setDefaultPaymentMethod');
|
||||||
Route::post('client/payment_methods/{source_id}/remove', 'ClientPortalController@removePaymentMethod');
|
Route::post('client/payment_methods/{source_id}/remove', 'ClientPortalController@removePaymentMethod');
|
||||||
|
Route::get('client/details', 'ClientPortalController@showDetails');
|
||||||
|
Route::post('client/details', 'ClientPortalController@updateDetails');
|
||||||
Route::get('client/quotes', 'ClientPortalController@quoteIndex');
|
Route::get('client/quotes', 'ClientPortalController@quoteIndex');
|
||||||
Route::get('client/credits', 'ClientPortalController@creditIndex');
|
Route::get('client/credits', 'ClientPortalController@creditIndex');
|
||||||
Route::get('client/invoices', 'ClientPortalController@invoiceIndex');
|
Route::get('client/invoices', 'ClientPortalController@invoiceIndex');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user