akaunting 3.0 (the last dance)
This commit is contained in:
@@ -1,62 +1,73 @@
|
||||
@extends('layouts.admin')
|
||||
<x-layouts.admin>
|
||||
<x-slot name="title">{{ trans('general.title.edit', ['type' => trans_choice('general.companies', 1)]) }}</x-slot>
|
||||
|
||||
@section('title', trans('general.title.edit', ['type' => trans_choice('general.companies', 1)]))
|
||||
<x-slot name="content">
|
||||
<x-form.container>
|
||||
<x-form id="company" method="PATCH" :route="['companies.update', $company->id]" :model="$company">
|
||||
<x-form.section>
|
||||
<x-slot name="head">
|
||||
<x-form.section.head title="{{ trans('general.general') }}" description="{{ trans('companies.form_description.general') }}" />
|
||||
</x-slot>
|
||||
|
||||
@section('content')
|
||||
<div class="card">
|
||||
{!! Form::model($company, [
|
||||
'id' => 'company',
|
||||
'method' => 'PATCH',
|
||||
'route' => ['companies.update', $company->id],
|
||||
'@submit.prevent' => 'onSubmit',
|
||||
'@keydown' => 'form.errors.clear($event.target.name)',
|
||||
'files' => true,
|
||||
'role' => 'form',
|
||||
'class' => 'form-loading-button',
|
||||
'novalidate' => true
|
||||
]) !!}
|
||||
<x-slot name="body">
|
||||
<div class="sm:col-span-3 grid gap-x-8 gap-y-6 grid-rows-3">
|
||||
<x-form.group.text name="name" label="{{ trans('general.name') }}" />
|
||||
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
{{ Form::textGroup('name', trans('general.name'), 'font') }}
|
||||
<x-form.group.email name="email" label="{{ trans('general.email') }}" />
|
||||
|
||||
{{ Form::emailGroup('email', trans('general.email'), 'envelope') }}
|
||||
<x-form.group.text name="phone" label="{{ trans('settings.company.phone') }}" not-required />
|
||||
</div>
|
||||
|
||||
{{ Form::selectGroup('currency', trans_choice('general.currencies', 1), 'exchange-alt', $currencies, $company->currency ?? 'USD') }}
|
||||
<div class="sm:col-span-3">
|
||||
<x-form.group.file name="logo" label="{{ trans('companies.logo') }}" :value="$company->company_logo" not-required />
|
||||
</div>
|
||||
</x-slot>
|
||||
</x-form.section>
|
||||
|
||||
{{ Form::selectGroup('locale', trans_choice('general.languages', 1), 'flag', language()->allowed(), $company->locale ?? config('app.locale', 'en-GB'), []) }}
|
||||
<x-form.section>
|
||||
<x-slot name="head">
|
||||
<x-form.section.head title="{{ trans('items.billing') }}" description="{{ trans('companies.form_description.billing') }}" />
|
||||
</x-slot>
|
||||
|
||||
{{ Form::textGroup('tax_number', trans('general.tax_number'), 'percent', [], $company->tax_number) }}
|
||||
<x-slot name="body">
|
||||
<x-form.group.text name="tax_number" label="{{ trans('general.tax_number') }}" not-required />
|
||||
|
||||
{{ Form::textGroup('phone', trans('settings.company.phone'), 'phone', [], $company->phone) }}
|
||||
<x-form.group.currency name="currency" selected="{{ ! empty($company->currency) ? $company->currency : config('setting.fallback.default.currency') }}" />
|
||||
|
||||
{{ Form::textareaGroup('address', trans('general.address'), '', $company->address, ['rows' => '2', 'v-model' => 'form.address']) }}
|
||||
<x-form.group.locale not-required />
|
||||
</x-slot>
|
||||
</x-form.section>
|
||||
|
||||
{{ Form::textGroup('city', trans_choice('general.cities', 1), 'city', []) }}
|
||||
<x-form.section>
|
||||
<x-slot name="head">
|
||||
<x-form.section.head title="{{ trans('general.address') }}" description="{{ trans('companies.form_description.address') }}" />
|
||||
</x-slot>
|
||||
|
||||
{{ Form::textGroup('zip_code', trans('general.zip_code'), 'mail-bulk', []) }}
|
||||
<x-slot name="body">
|
||||
<x-form.group.textarea name="address" label="{{ trans('general.address') }}" not-required v-model="form.address" />
|
||||
|
||||
{{ Form::textGroup('state', trans('general.state'), 'city', []) }}
|
||||
<x-form.group.text name="city" label="{{ trans_choice('general.cities', 1) }}" not-required />
|
||||
|
||||
{{ Form::selectGroup('country', trans_choice('general.countries', 1), 'globe-americas', trans('countries'), $company->country, ['model' => 'form.country']) }}
|
||||
<x-form.group.text name="zip_code" label="{{ trans('general.zip_code') }}" not-required />
|
||||
|
||||
{{ Form::fileGroup('logo', trans('companies.logo'), '', ['dropzone-class' => 'form-file'], $company->company_logo) }}
|
||||
<x-form.group.text name="state" label="{{ trans('general.state') }}" not-required />
|
||||
|
||||
{{ Form::radioGroup('enabled', trans('general.enabled'), $company->enabled) }}
|
||||
</div>
|
||||
</div>
|
||||
<x-form.group.country />
|
||||
</x-slot>
|
||||
</x-form.section>
|
||||
|
||||
@can('update-common-companies')
|
||||
<div class="card-footer">
|
||||
<div class="row save-buttons">
|
||||
{{ Form::saveButtons('companies.index') }}
|
||||
</div>
|
||||
</div>
|
||||
@endcan
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
@endsection
|
||||
<x-form.group.switch name="enabled" label="{{ trans('general.enabled') }}" />
|
||||
|
||||
@push('scripts_start')
|
||||
<script src="{{ asset('public/js/common/companies.js?v=' . version('short')) }}"></script>
|
||||
@endpush
|
||||
@can('update-common-companies')
|
||||
<x-form.section>
|
||||
<x-slot name="foot">
|
||||
<x-form.buttons cancel-route="companies.index" />
|
||||
</x-slot>
|
||||
</x-form.section>
|
||||
@endcan
|
||||
</x-form>
|
||||
</x-form.container>
|
||||
</x-slot>
|
||||
|
||||
<x-script folder="common" file="companies" />
|
||||
</x-layouts.admin>
|
||||
|
||||
Reference in New Issue
Block a user