WIP Work on new Quotes
This commit is contained in:
parent
9ae273fda0
commit
d3a9f183ca
@ -124,7 +124,7 @@ public static function table(Table $table): Table
|
||||
|
||||
public static function canAccess(): bool
|
||||
{
|
||||
return auth()->user()->is_admin;
|
||||
return auth()->user()->is_admin ?? false;
|
||||
}
|
||||
|
||||
public static function getRelations(): array
|
||||
|
@ -6,7 +6,6 @@
|
||||
use App\Enums\OrderAttributes;
|
||||
use App\Enums\OrderStatus;
|
||||
use App\Enums\OrderType;
|
||||
use App\Models\Contact;
|
||||
use App\Models\Customer;
|
||||
use App\Models\Order;
|
||||
use App\Models\OrderProduct;
|
||||
@ -62,18 +61,8 @@ public static function form(Form $form): Form
|
||||
->required()
|
||||
->label('Customer')
|
||||
->options(Customer::all()->pluck('company_name', 'id'))
|
||||
// ->reactive()
|
||||
->searchable(),
|
||||
|
||||
// Select::make('contact_id')
|
||||
// ->label('Contact')
|
||||
// ->options(fn ($get): array => Contact::where('customer_id', $get('customer_id') ?? null)
|
||||
// ->get()
|
||||
// ->pluck('full_name', 'id')
|
||||
// ->toArray())
|
||||
// ->searchable(),
|
||||
// ]),
|
||||
|
||||
TextInput::make('customer_po')
|
||||
->required()
|
||||
->label('Customer PO'),
|
||||
|
@ -11,7 +11,6 @@
|
||||
use Filament\Forms\Components\TextInput;
|
||||
use Filament\Forms\Form;
|
||||
use Filament\Resources\Resource;
|
||||
use Filament\Tables;
|
||||
use Filament\Tables\Actions\ViewAction;
|
||||
use Filament\Tables\Columns\TextColumn;
|
||||
use Filament\Tables\Table;
|
||||
@ -72,16 +71,8 @@ public static function table(Table $table): Table
|
||||
->label('Balance')
|
||||
->money(),
|
||||
])
|
||||
->filters([
|
||||
//
|
||||
])
|
||||
->actions([
|
||||
ViewAction::make(),
|
||||
])
|
||||
->bulkActions([
|
||||
// Tables\Actions\BulkActionGroup::make([
|
||||
// Tables\Actions\DeleteBulkAction::make(),
|
||||
// ]),
|
||||
]);
|
||||
}
|
||||
|
||||
|
@ -4,16 +4,17 @@
|
||||
|
||||
use App\Enums\IconEnum;
|
||||
use App\Models\Customer;
|
||||
use App\Models\Order;
|
||||
use App\Models\Quote;
|
||||
use Filament\Forms\Components\RichEditor;
|
||||
use Filament\Forms\Components\DatePicker;
|
||||
use Filament\Forms\Components\Section;
|
||||
use Filament\Forms\Components\Select;
|
||||
use Filament\Forms\Components\Split;
|
||||
use Filament\Forms\Components\Textarea;
|
||||
use Filament\Forms\Components\TextInput;
|
||||
use Filament\Forms\Form;
|
||||
use Filament\Resources\Resource;
|
||||
use Filament\Tables;
|
||||
use Filament\Tables\Table;
|
||||
use Icetalker\FilamentTableRepeater\Forms\Components\TableRepeater;
|
||||
|
||||
class QuoteResource extends Resource
|
||||
{
|
||||
@ -30,28 +31,87 @@ public static function form(Form $form): Form
|
||||
return $form
|
||||
->schema([
|
||||
Section::make([
|
||||
Split::make([
|
||||
Select::make('customer_id')
|
||||
->required()
|
||||
->label('Customer')
|
||||
->options(Customer::all()->pluck('company_name', 'id'))
|
||||
->reactive()
|
||||
->searchable(),
|
||||
Select::make('customer_id')
|
||||
->required()
|
||||
->label('Customer')
|
||||
->options(Customer::all()->pluck('company_name', 'id'))
|
||||
->reactive()
|
||||
->searchable()
|
||||
->columnSpan(1),
|
||||
|
||||
Select::make('order_id')
|
||||
->label('Order')
|
||||
->options(fn ($get): array => Order::where('customer_id', $get('customer_id') ?? null)
|
||||
->get()
|
||||
->pluck('customer_po', 'id')
|
||||
->toArray())
|
||||
->searchable(),
|
||||
DatePicker::make('date')
|
||||
->default(today())
|
||||
->required(),
|
||||
|
||||
])->columnSpan(2),
|
||||
RichEditor::make('body')
|
||||
TextArea::make('notes')
|
||||
->columnSpan(2),
|
||||
// ->rows(8),
|
||||
]),
|
||||
])->columns(3);
|
||||
])
|
||||
->columns(2),
|
||||
|
||||
TableRepeater::make('embroideryEntries')
|
||||
->relationship('embroideryEntries')
|
||||
->schema([
|
||||
TextInput::make('logo')
|
||||
->label('Logo name'),
|
||||
TextInput::make('placement'),
|
||||
TextInput::make('quantity')
|
||||
->prefix('#'),
|
||||
TextInput::make('width')
|
||||
->suffix('"'),
|
||||
TextInput::make('height')
|
||||
->suffix('"'),
|
||||
TextInput::make('stitch_count'),
|
||||
TextInput::make('digitizing_cost')
|
||||
->prefix('$'),
|
||||
TextInput::make('run_charge')
|
||||
->prefix('$'),
|
||||
])
|
||||
->addActionLabel('Add Embroidery Entry')
|
||||
->defaultItems(0),
|
||||
|
||||
TableRepeater::make('screenPrintEntries')
|
||||
->relationship('screenPrintEntries')
|
||||
->schema([
|
||||
TextInput::make('logo')
|
||||
->label('Logo name'),
|
||||
TextInput::make('quantity')
|
||||
->prefix('#'),
|
||||
TextInput::make('width')
|
||||
->suffix('"'),
|
||||
TextInput::make('height')
|
||||
->suffix('"'),
|
||||
TextInput::make('color_amount'),
|
||||
TextInput::make('color_match')
|
||||
->prefix('$'),
|
||||
TextInput::make('flash')
|
||||
->prefix('$'),
|
||||
TextInput::make('fleece')
|
||||
->prefix('$'),
|
||||
TextInput::make('poly_ink')
|
||||
->prefix('$'),
|
||||
TextInput::make('other_charges')
|
||||
->prefix('$'),
|
||||
])
|
||||
->addActionLabel('Add Screen Print Entry')
|
||||
->defaultItems(0),
|
||||
|
||||
TableRepeater::make('heatTransferEntries')
|
||||
->relationship('heatTransferEntries')
|
||||
->schema([
|
||||
TextInput::make('logo')
|
||||
->label('Logo name'),
|
||||
TextInput::make('quantity')
|
||||
->prefix('#'),
|
||||
TextInput::make('width')
|
||||
->suffix('"'),
|
||||
TextInput::make('height')
|
||||
->suffix('"'),
|
||||
TextInput::make('price')
|
||||
->prefix('$'),
|
||||
])
|
||||
->addActionLabel('Add Heat Transfer Entry')
|
||||
->defaultItems(0),
|
||||
])->columns(1);
|
||||
}
|
||||
|
||||
public static function table(Table $table): Table
|
||||
|
26
app/Models/EmbroideryEntry.php
Normal file
26
app/Models/EmbroideryEntry.php
Normal file
@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
|
||||
class EmbroideryEntry extends Model
|
||||
{
|
||||
protected $fillable = [
|
||||
'quote_id',
|
||||
'quantity',
|
||||
'logo',
|
||||
'width',
|
||||
'height',
|
||||
'placement',
|
||||
'stitch_count',
|
||||
'digitizing_cost',
|
||||
'run_charge',
|
||||
];
|
||||
|
||||
public function quote(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(Quote::class);
|
||||
}
|
||||
}
|
23
app/Models/HeatTransferEntry.php
Normal file
23
app/Models/HeatTransferEntry.php
Normal file
@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
|
||||
class HeatTransferEntry extends Model
|
||||
{
|
||||
protected $fillable = [
|
||||
'quote_id',
|
||||
'quantity',
|
||||
'logo',
|
||||
'width',
|
||||
'height',
|
||||
'price',
|
||||
];
|
||||
|
||||
public function quote(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(Quote::class);
|
||||
}
|
||||
}
|
@ -5,18 +5,35 @@
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
use Illuminate\Database\Eloquent\Relations\HasMany;
|
||||
|
||||
class Quote extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
protected $fillable = [
|
||||
'body',
|
||||
'order_id',
|
||||
'customer_id',
|
||||
'date',
|
||||
'notes',
|
||||
];
|
||||
|
||||
public function order(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(Order::class);
|
||||
}
|
||||
|
||||
public function embroideryEntries(): HasMany
|
||||
{
|
||||
return $this->hasMany(EmbroideryEntry::class);
|
||||
}
|
||||
|
||||
public function screenPrintEntries(): HasMany
|
||||
{
|
||||
return $this->hasMany(ScreenPrintEntry::class);
|
||||
}
|
||||
|
||||
public function heatTransferEntries(): HasMany
|
||||
{
|
||||
return $this->hasMany(HeatTransferEntry::class);
|
||||
}
|
||||
}
|
||||
|
32
app/Models/ScreenPrintEntry.php
Normal file
32
app/Models/ScreenPrintEntry.php
Normal file
@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
|
||||
class ScreenPrintEntry extends Model
|
||||
{
|
||||
protected $fillable = [
|
||||
'quote_id',
|
||||
'quantity',
|
||||
'logo',
|
||||
'width',
|
||||
'height',
|
||||
'color_amount',
|
||||
'setup_amount',
|
||||
'run_charge',
|
||||
'color_change',
|
||||
'color_match',
|
||||
'flash',
|
||||
'fleece',
|
||||
'poly_ink',
|
||||
'other_charges',
|
||||
'notes',
|
||||
];
|
||||
|
||||
public function quote(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(Quote::class);
|
||||
}
|
||||
}
|
@ -8,11 +8,10 @@ class PaymentService
|
||||
{
|
||||
public function distributePayments()
|
||||
{
|
||||
|
||||
$payments = Payment::where('unapplied_amount', '>', 0)->get();
|
||||
|
||||
foreach ($payments as $payment) {
|
||||
$payment->applyToInvoices(); // Apply remaining amounts to the new invoice
|
||||
$payment->applyToInvoices();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -14,9 +14,9 @@ public function up(): void
|
||||
Schema::create('quotes', function (Blueprint $table) {
|
||||
$table->id();
|
||||
|
||||
$table->foreignId('order_id')->nullable()->constrained();
|
||||
|
||||
$table->longText('body')->nullable();
|
||||
$table->foreignId('customer_id')->constrained();
|
||||
$table->date('date');
|
||||
$table->longText('notes')->nullable();
|
||||
|
||||
$table->timestamps();
|
||||
});
|
||||
|
40
database/migrations/020_create_embroidery_entries_table.php
Normal file
40
database/migrations/020_create_embroidery_entries_table.php
Normal file
@ -0,0 +1,40 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('embroidery_entries', function (Blueprint $table) {
|
||||
$table->id();
|
||||
|
||||
$table->foreignId('quote_id')->constrained();
|
||||
|
||||
$table->integer('quantity')->nullable();
|
||||
$table->string('logo')->nullable();
|
||||
$table->decimal('width', 6, 2)->nullable();
|
||||
$table->decimal('height', 6, 2)->nullable();
|
||||
$table->string('placement')->nullable();
|
||||
$table->string('stitch_count')->nullable();
|
||||
$table->string('digitizing_cost')->nullable();
|
||||
$table->string('run_charge')->nullable();
|
||||
$table->text('notes')->nullable();
|
||||
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('embroidery_entries');
|
||||
}
|
||||
};
|
@ -0,0 +1,45 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('screen_print_entries', function (Blueprint $table) {
|
||||
$table->id();
|
||||
|
||||
$table->foreignId('quote_id')->constrained();
|
||||
|
||||
$table->integer('quantity')->nullable();
|
||||
$table->string('logo')->nullable();
|
||||
$table->decimal('width', 6, 2)->nullable();
|
||||
$table->decimal('height', 6, 2)->nullable();
|
||||
$table->integer('color_amount')->nullable();
|
||||
$table->integer('setup_amount')->nullable();
|
||||
$table->decimal('run_charge', 8, 2)->nullable();
|
||||
$table->decimal('color_change', 8, 2)->default(false);
|
||||
$table->decimal('color_match', 8, 2)->default(false);
|
||||
$table->decimal('flash', 8, 2)->default(false);
|
||||
$table->decimal('fleece', 8, 2)->default(false);
|
||||
$table->decimal('poly_ink', 8, 2)->default(false);
|
||||
$table->decimal('other_charges', 8, 2)->default(false);
|
||||
$table->text('notes')->nullable();
|
||||
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('screen_print_entries');
|
||||
}
|
||||
};
|
@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('heat_transfer_entries', function (Blueprint $table) {
|
||||
$table->id();
|
||||
|
||||
$table->foreignId('quote_id')->constrained();
|
||||
|
||||
$table->integer('quantity')->nullable();
|
||||
$table->string('logo')->nullable();
|
||||
$table->decimal('width', 6, 2)->nullable();
|
||||
$table->decimal('height', 6, 2)->nullable();
|
||||
$table->decimal('price', 8, 2)->nullable();
|
||||
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('heat_transfer_entries');
|
||||
}
|
||||
};
|
@ -26,7 +26,7 @@ public function run(): void
|
||||
ServiceTypeSeeder::class,
|
||||
ProductServiceSeeder::class,
|
||||
ServiceFileSeeder::class,
|
||||
QuoteSeeder::class,
|
||||
// QuoteSeeder::class,
|
||||
InvoiceSeeder::class,
|
||||
InvoiceReportSeeder::class,
|
||||
]);
|
||||
|
BIN
public/invoice-inv400038.pdf
Normal file
BIN
public/invoice-inv400038.pdf
Normal file
Binary file not shown.
@ -1,3 +1,3 @@
|
||||
/*@tailwind base;*/
|
||||
/*@tailwind components;*/
|
||||
/*@tailwind utilities;*/
|
||||
@tailwind base;
|
||||
@tailwind components;
|
||||
@tailwind utilities;
|
@ -4,22 +4,4 @@
|
||||
// Variables
|
||||
@import 'variables';
|
||||
|
||||
// Bootstrap
|
||||
$body-bg: #fff;
|
||||
$body-color: #111;
|
||||
$table-striped-bg: #fafafa;
|
||||
|
||||
|
||||
@import 'bootstrap/scss/bootstrap';
|
||||
@import 'bootstrap-icons/font/bootstrap-icons.css';
|
||||
|
||||
input::-webkit-outer-spin-button,
|
||||
input::-webkit-inner-spin-button {
|
||||
display: none;
|
||||
-webkit-appearance: none;
|
||||
margin: 0; /* <-- Apparently some margin are still there even though it's hidden */
|
||||
}
|
||||
|
||||
input[type=number] {
|
||||
-moz-appearance: textfield; /* Firefox */
|
||||
}
|
||||
|
@ -1,73 +0,0 @@
|
||||
@extends('layouts.app')
|
||||
|
||||
@section('content')
|
||||
<div class="container">
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-md-8">
|
||||
<div class="card">
|
||||
<div class="card-header">{{ __('Login') }}</div>
|
||||
|
||||
<div class="card-body">
|
||||
<form method="POST" action="{{ route('login') }}">
|
||||
@csrf
|
||||
|
||||
<div class="row mb-3">
|
||||
<label for="email" class="col-md-4 col-form-label text-md-end">{{ __('Email Address') }}</label>
|
||||
|
||||
<div class="col-md-6">
|
||||
<input id="email" type="email" class="form-control @error('email') is-invalid @enderror" name="email" value="{{ old('email') }}" required autocomplete="email" autofocus>
|
||||
|
||||
@error('email')
|
||||
<span class="invalid-feedback" role="alert">
|
||||
<strong>{{ $message }}</strong>
|
||||
</span>
|
||||
@enderror
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row mb-3">
|
||||
<label for="password" class="col-md-4 col-form-label text-md-end">{{ __('Password') }}</label>
|
||||
|
||||
<div class="col-md-6">
|
||||
<input id="password" type="password" class="form-control @error('password') is-invalid @enderror" name="password" required autocomplete="current-password">
|
||||
|
||||
@error('password')
|
||||
<span class="invalid-feedback" role="alert">
|
||||
<strong>{{ $message }}</strong>
|
||||
</span>
|
||||
@enderror
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row mb-3">
|
||||
<div class="col-md-6 offset-md-4">
|
||||
<div class="form-check">
|
||||
<input class="form-check-input" type="checkbox" name="remember" id="remember" {{ old('remember') ? 'checked' : '' }}>
|
||||
|
||||
<label class="form-check-label" for="remember">
|
||||
{{ __('Remember Me') }}
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row mb-0">
|
||||
<div class="col-md-8 offset-md-4">
|
||||
<button type="submit" class="btn btn-primary">
|
||||
{{ __('Login') }}
|
||||
</button>
|
||||
|
||||
@if (Route::has('password.request'))
|
||||
<a class="btn btn-link" href="{{ route('password.request') }}">
|
||||
{{ __('Forgot Your Password?') }}
|
||||
</a>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
@ -1,49 +0,0 @@
|
||||
@extends('layouts.app')
|
||||
|
||||
@section('content')
|
||||
<div class="container">
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-md-8">
|
||||
<div class="card">
|
||||
<div class="card-header">{{ __('Confirm Password') }}</div>
|
||||
|
||||
<div class="card-body">
|
||||
{{ __('Please confirm your password before continuing.') }}
|
||||
|
||||
<form method="POST" action="{{ route('password.confirm') }}">
|
||||
@csrf
|
||||
|
||||
<div class="row mb-3">
|
||||
<label for="password" class="col-md-4 col-form-label text-md-end">{{ __('Password') }}</label>
|
||||
|
||||
<div class="col-md-6">
|
||||
<input id="password" type="password" class="form-control @error('password') is-invalid @enderror" name="password" required autocomplete="current-password">
|
||||
|
||||
@error('password')
|
||||
<span class="invalid-feedback" role="alert">
|
||||
<strong>{{ $message }}</strong>
|
||||
</span>
|
||||
@enderror
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row mb-0">
|
||||
<div class="col-md-8 offset-md-4">
|
||||
<button type="submit" class="btn btn-primary">
|
||||
{{ __('Confirm Password') }}
|
||||
</button>
|
||||
|
||||
@if (Route::has('password.request'))
|
||||
<a class="btn btn-link" href="{{ route('password.request') }}">
|
||||
{{ __('Forgot Your Password?') }}
|
||||
</a>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
@ -1,47 +0,0 @@
|
||||
@extends('layouts.app')
|
||||
|
||||
@section('content')
|
||||
<div class="container">
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-md-8">
|
||||
<div class="card">
|
||||
<div class="card-header">{{ __('Reset Password') }}</div>
|
||||
|
||||
<div class="card-body">
|
||||
@if (session('status'))
|
||||
<div class="alert alert-success" role="alert">
|
||||
{{ session('status') }}
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<form method="POST" action="{{ route('password.email') }}">
|
||||
@csrf
|
||||
|
||||
<div class="row mb-3">
|
||||
<label for="email" class="col-md-4 col-form-label text-md-end">{{ __('Email Address') }}</label>
|
||||
|
||||
<div class="col-md-6">
|
||||
<input id="email" type="email" class="form-control @error('email') is-invalid @enderror" name="email" value="{{ old('email') }}" required autocomplete="email" autofocus>
|
||||
|
||||
@error('email')
|
||||
<span class="invalid-feedback" role="alert">
|
||||
<strong>{{ $message }}</strong>
|
||||
</span>
|
||||
@enderror
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row mb-0">
|
||||
<div class="col-md-6 offset-md-4">
|
||||
<button type="submit" class="btn btn-primary">
|
||||
{{ __('Send Password Reset Link') }}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
@ -1,65 +0,0 @@
|
||||
@extends('layouts.app')
|
||||
|
||||
@section('content')
|
||||
<div class="container">
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-md-8">
|
||||
<div class="card">
|
||||
<div class="card-header">{{ __('Reset Password') }}</div>
|
||||
|
||||
<div class="card-body">
|
||||
<form method="POST" action="{{ route('password.update') }}">
|
||||
@csrf
|
||||
|
||||
<input type="hidden" name="token" value="{{ $token }}">
|
||||
|
||||
<div class="row mb-3">
|
||||
<label for="email" class="col-md-4 col-form-label text-md-end">{{ __('Email Address') }}</label>
|
||||
|
||||
<div class="col-md-6">
|
||||
<input id="email" type="email" class="form-control @error('email') is-invalid @enderror" name="email" value="{{ $email ?? old('email') }}" required autocomplete="email" autofocus>
|
||||
|
||||
@error('email')
|
||||
<span class="invalid-feedback" role="alert">
|
||||
<strong>{{ $message }}</strong>
|
||||
</span>
|
||||
@enderror
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row mb-3">
|
||||
<label for="password" class="col-md-4 col-form-label text-md-end">{{ __('Password') }}</label>
|
||||
|
||||
<div class="col-md-6">
|
||||
<input id="password" type="password" class="form-control @error('password') is-invalid @enderror" name="password" required autocomplete="new-password">
|
||||
|
||||
@error('password')
|
||||
<span class="invalid-feedback" role="alert">
|
||||
<strong>{{ $message }}</strong>
|
||||
</span>
|
||||
@enderror
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row mb-3">
|
||||
<label for="password-confirm" class="col-md-4 col-form-label text-md-end">{{ __('Confirm Password') }}</label>
|
||||
|
||||
<div class="col-md-6">
|
||||
<input id="password-confirm" type="password" class="form-control" name="password_confirmation" required autocomplete="new-password">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row mb-0">
|
||||
<div class="col-md-6 offset-md-4">
|
||||
<button type="submit" class="btn btn-primary">
|
||||
{{ __('Reset Password') }}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
@ -1,77 +0,0 @@
|
||||
@extends('layouts.app')
|
||||
|
||||
@section('content')
|
||||
<div class="container">
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-md-8">
|
||||
<div class="card">
|
||||
<div class="card-header">{{ __('Register') }}</div>
|
||||
|
||||
<div class="card-body">
|
||||
<form method="POST" action="{{ route('register') }}">
|
||||
@csrf
|
||||
|
||||
<div class="row mb-3">
|
||||
<label for="name" class="col-md-4 col-form-label text-md-end">{{ __('Name') }}</label>
|
||||
|
||||
<div class="col-md-6">
|
||||
<input id="name" type="text" class="form-control @error('name') is-invalid @enderror" name="name" value="{{ old('name') }}" required autocomplete="name" autofocus>
|
||||
|
||||
@error('name')
|
||||
<span class="invalid-feedback" role="alert">
|
||||
<strong>{{ $message }}</strong>
|
||||
</span>
|
||||
@enderror
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row mb-3">
|
||||
<label for="email" class="col-md-4 col-form-label text-md-end">{{ __('Email Address') }}</label>
|
||||
|
||||
<div class="col-md-6">
|
||||
<input id="email" type="email" class="form-control @error('email') is-invalid @enderror" name="email" value="{{ old('email') }}" required autocomplete="email">
|
||||
|
||||
@error('email')
|
||||
<span class="invalid-feedback" role="alert">
|
||||
<strong>{{ $message }}</strong>
|
||||
</span>
|
||||
@enderror
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row mb-3">
|
||||
<label for="password" class="col-md-4 col-form-label text-md-end">{{ __('Password') }}</label>
|
||||
|
||||
<div class="col-md-6">
|
||||
<input id="password" type="password" class="form-control @error('password') is-invalid @enderror" name="password" required autocomplete="new-password">
|
||||
|
||||
@error('password')
|
||||
<span class="invalid-feedback" role="alert">
|
||||
<strong>{{ $message }}</strong>
|
||||
</span>
|
||||
@enderror
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row mb-3">
|
||||
<label for="password-confirm" class="col-md-4 col-form-label text-md-end">{{ __('Confirm Password') }}</label>
|
||||
|
||||
<div class="col-md-6">
|
||||
<input id="password-confirm" type="password" class="form-control" name="password_confirmation" required autocomplete="new-password">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row mb-0">
|
||||
<div class="col-md-6 offset-md-4">
|
||||
<button type="submit" class="btn btn-primary">
|
||||
{{ __('Register') }}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
@ -1,28 +0,0 @@
|
||||
@extends('layouts.app')
|
||||
|
||||
@section('content')
|
||||
<div class="container">
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-md-8">
|
||||
<div class="card">
|
||||
<div class="card-header">{{ __('Verify Your Email Address') }}</div>
|
||||
|
||||
<div class="card-body">
|
||||
@if (session('resent'))
|
||||
<div class="alert alert-success" role="alert">
|
||||
{{ __('A fresh verification link has been sent to your email address.') }}
|
||||
</div>
|
||||
@endif
|
||||
|
||||
{{ __('Before proceeding, please check your email for a verification link.') }}
|
||||
{{ __('If you did not receive the email') }},
|
||||
<form class="d-inline" method="POST" action="{{ route('verification.resend') }}">
|
||||
@csrf
|
||||
<button type="submit" class="btn btn-link p-0 m-0 align-baseline">{{ __('click here to request another') }}</button>.
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
@ -1,23 +0,0 @@
|
||||
@extends('layouts.app')
|
||||
|
||||
@section('content')
|
||||
<div class="container">
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-md-8">
|
||||
<div class="card">
|
||||
<div class="card-header">Create contact</div>
|
||||
|
||||
<div class="card-body">
|
||||
@if (session('status'))
|
||||
<div class="alert alert-success" role="alert">
|
||||
{{ session('status') }}
|
||||
</div>
|
||||
@endif
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
@ -1,104 +0,0 @@
|
||||
@extends('layouts.app')
|
||||
|
||||
@section('content')
|
||||
<div class="container">
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-md-8">
|
||||
<div class="card">
|
||||
<div class="card-header">Create Customer</div>
|
||||
|
||||
<div class="card-body">
|
||||
@if (session('status'))
|
||||
<div class="alert alert-success" role="alert">
|
||||
{{ session('status') }}
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<form action="{{route('customers.store')}}" method="post">
|
||||
@csrf
|
||||
|
||||
<div class="row mb-3">
|
||||
<label for="company_name" class="col-md-4 col-form-label text-md-end">Company Name</label>
|
||||
|
||||
<div class="col-md-6">
|
||||
<input id="company_name" type="text" class="form-control @error('company_name') is-invalid @enderror" name="company_name" value="{{ old('company_name') }}" required autocomplete="company_name" autofocus>
|
||||
|
||||
@error('company_name')
|
||||
<span class="invalid-feedback" role="alert">
|
||||
<strong>{{ $message }}</strong>
|
||||
</span>
|
||||
@enderror
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row mb-3">
|
||||
<label for="internal_name" class="col-md-4 col-form-label text-md-end">Internal Name</label>
|
||||
|
||||
<div class="col-md-6">
|
||||
<input id="internal_name" type="text" class="form-control @error('internal_name') is-invalid @enderror" name="internal_name" value="{{ old('internal_name') }}" required autocomplete="internal_name" autofocus>
|
||||
|
||||
@error('internal_name')
|
||||
<span class="invalid-feedback" role="alert">
|
||||
<strong>{{ $message }}</strong>
|
||||
</span>
|
||||
@enderror
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row mb-3">
|
||||
<label for="shipping_address" class="col-md-4 col-form-label text-md-end">Shipping Address</label>
|
||||
|
||||
<div class="col-md-6">
|
||||
<input id="shipping_address" type="text" class="form-control @error('shipping_address') is-invalid @enderror" name="shipping_address" value="{{ old('shipping_address') }}" required autocomplete="shipping_address" autofocus>
|
||||
|
||||
@error('shipping_address')
|
||||
<span class="invalid-feedback" role="alert">
|
||||
<strong>{{ $message }}</strong>
|
||||
</span>
|
||||
@enderror
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row mb-3">
|
||||
<label for="billing_address" class="col-md-4 col-form-label text-md-end">Billing Address</label>
|
||||
|
||||
<div class="col-md-6">
|
||||
<input id="billing_address" type="text" class="form-control @error('billing_address') is-invalid @enderror" name="billing_address" value="{{ old('billing_address') }}" required autocomplete="billing_address" autofocus>
|
||||
|
||||
@error('billing_address')
|
||||
<span class="invalid-feedback" role="alert">
|
||||
<strong>{{ $message }}</strong>
|
||||
</span>
|
||||
@enderror
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row mb-3">
|
||||
<label for="phone" class="col-md-4 col-form-label text-md-end">Phone number</label>
|
||||
|
||||
<div class="col-md-6">
|
||||
<input id="phone" type="text" class="form-control @error('phone') is-invalid @enderror" name="phone" value="{{ old('phone') }}" required autocomplete="phone" autofocus>
|
||||
|
||||
@error('phone')
|
||||
<span class="invalid-feedback" role="alert">
|
||||
<strong>{{ $message }}</strong>
|
||||
</span>
|
||||
@enderror
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row mb-4">
|
||||
<div class="col-md-4"></div>
|
||||
<div class="col-md-6">
|
||||
<button type="submit" class="btn btn-primary">Create customer</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
@ -1,106 +0,0 @@
|
||||
@extends('layouts.app')
|
||||
|
||||
@section('header')
|
||||
<div class="container-fluid bg-light pt-3">
|
||||
|
||||
<!-- Customer company name row -->
|
||||
<div class="row justify-content-center pb-2">
|
||||
<div class="col-3"></div>
|
||||
<div class="col">
|
||||
<h2>{{$customer->company_name}}</h2>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Tabs row -->
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-3 border-bottom"></div>
|
||||
<div class="col-6 p-0">
|
||||
|
||||
<ul class="nav nav-fill nav-tabs" id="customer-tabs" role="tablist">
|
||||
<li class="nav-item" role="presentation">
|
||||
<a class="nav-link link-dark {{$tab == 'details' ? 'active' : ''}}" id="details-tab"
|
||||
href="{{route('customers.show', [$customer, 'tab'=>'details'])}}" type="button"
|
||||
role="tab"
|
||||
aria-controls="details" aria-selected="{{$tab == 'details' ? 'true' : 'false'}}">
|
||||
<x-bi-list-ul/>
|
||||
Overview
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item" role="presentation">
|
||||
<a class="nav-link link-dark {{$tab == 'shipping' ? 'active' : ''}}" id="shipping-tab"
|
||||
href="{{route('customers.show', [$customer, 'tab'=>'shipping'])}}" type="button"
|
||||
role="tab"
|
||||
aria-controls="shipping" aria-selected="{{$tab == 'shipping' ? 'true' : 'false'}}">
|
||||
<x-bi-box-fill/>
|
||||
Shipping Info
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item" role="presentation">
|
||||
<a class="nav-link link-dark {{$tab == 'packing' ? 'active' : ''}}" id="packing-tab"
|
||||
href="{{route('customers.show', [$customer, 'tab'=>'packing'])}}" type="button"
|
||||
role="tab"
|
||||
aria-controls="packing" aria-selected="{{$tab == 'packing' ? 'true' : 'false'}}">
|
||||
<x-bi-card-text/>
|
||||
Packing Slips
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item" role="presentation">
|
||||
<a class="nav-link link-dark {{$tab == 'contacts' ? 'active' : ''}}" id="contacts-tab"
|
||||
href="{{route('customers.show', [$customer, 'tab'=>'contacts'])}}" type="button"
|
||||
role="tab"
|
||||
aria-controls="contacts" aria-selected="{{$tab == 'contacts' ? 'true' : 'false'}}">
|
||||
<x-bi-people-fill/>
|
||||
Contacts
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
<div class="col border-bottom"></div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('content')
|
||||
<div class="container">
|
||||
<div class="row justify-content-center my-3">
|
||||
<div class="tab-content">
|
||||
|
||||
<!-- Overview tab -->
|
||||
@include('partials.customers.show.overview-tab')
|
||||
|
||||
<!-- Shipping Info tab -->
|
||||
@include('partials.customers.show.shipping-info-tab')
|
||||
|
||||
<!-- Packing Slips tab -->
|
||||
@include('partials.customers.show.packing-slips-tab')
|
||||
|
||||
<!-- Contacts tab -->
|
||||
@include('partials.customers.show.contacts-tab')
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Delete Customer Modal -->
|
||||
@include('partials.customers.delete-single-modal')
|
||||
|
||||
<!-- Create Contact Modal -->
|
||||
@include('partials.contacts.create-modal')
|
||||
|
||||
<!-- Delete Contact Modal -->
|
||||
@include('partials.contacts.delete-modal')
|
||||
|
||||
<!-- Create Packing Slip Modal -->
|
||||
@include('partials.packing-slips.create-modal')
|
||||
|
||||
<!-- Create Shipping Entry Modal -->
|
||||
@include('partials.shipping-entries.create-modal')
|
||||
|
||||
|
||||
@if($errors->any())
|
||||
{{ implode('', $errors->all('<div>:message</div>')) }}
|
||||
@endif
|
||||
|
||||
@endsection
|
@ -1,31 +0,0 @@
|
||||
<!doctype html>
|
||||
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
<!-- CSRF Token -->
|
||||
<meta name="csrf-token" content="{{ csrf_token() }}">
|
||||
|
||||
<title>{{ config('app.name', 'Laravel') }}</title>
|
||||
|
||||
<!-- Fonts -->
|
||||
<link rel="dns-prefetch" href="//fonts.bunny.net">
|
||||
<link href="https://fonts.bunny.net/css?family=Nunito" rel="stylesheet">
|
||||
|
||||
<!-- Scripts -->
|
||||
@vite(['resources/sass/app.scss', 'resources/css/app.css', 'resources/js/app.js'])
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<div id="app">
|
||||
@include('layouts.nav')
|
||||
|
||||
<main>
|
||||
@yield('header')
|
||||
@yield('content')
|
||||
</main>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
@ -1,97 +0,0 @@
|
||||
<nav class="navbar navbar-expand-md navbar-light bg-white border-bottom">
|
||||
<div class="container">
|
||||
<a class="navbar-brand" href="{{ url('/') }}">
|
||||
{{ config('app.name', 'Laravel') }}
|
||||
</a>
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse"
|
||||
data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent"
|
||||
aria-expanded="false" aria-label="{{ __('Toggle navigation') }}">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
|
||||
<div class="collapse navbar-collapse" id="navbarSupportedContent">
|
||||
<!-- Left Side Of Navbar -->
|
||||
<ul class="navbar-nav me-auto">
|
||||
<li class="nav-item px-2">
|
||||
<a class="nav-link @if(request()->routeIs('dashboard')) active @endif "
|
||||
href="{{route('dashboard')}}">
|
||||
<x-bi-activity/>
|
||||
Dashboard</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link @if(request()->routeIs('search')) active @endif disabled"
|
||||
href="">
|
||||
<x-bi-search/>
|
||||
Search</a>
|
||||
</li>
|
||||
<li class="nav-item px-2">
|
||||
<a class="nav-link @if(request()->routeIs('orders.*')) active @endif"
|
||||
href="{{route('orders.index')}}">
|
||||
<x-bi-box/>
|
||||
Orders</a>
|
||||
</li>
|
||||
<li class="nav-item px-2">
|
||||
<a class="nav-link @if(request()->routeIs('quotes')) active @endif disabled"
|
||||
href="">
|
||||
<x-bi-file-text/>
|
||||
Quotes</a>
|
||||
</li>
|
||||
<li class="nav-item px-2">
|
||||
<a class="nav-link @if(request()->routeIs('invoices')) active @endif disabled"
|
||||
href="">
|
||||
<x-bi-envelope/>
|
||||
Invoices</a>
|
||||
</li>
|
||||
<li class="nav-item dropdown px-2">
|
||||
<a class="nav-link dropdown-toggle @if(request()->routeIs('management.index') || request()->routeIs('customer.*')) active @endif" href="#"
|
||||
role="button" data-bs-toggle="dropdown" aria-expanded="false">
|
||||
<x-bi-pencil-square/>
|
||||
Management
|
||||
</a>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a class="dropdown-item @if(request()->routeIs('customers.*')) fw-bold @endif" href="{{route('management.index')}}">Customers</a></li>
|
||||
<li><a class="dropdown-item @if(request()->routeIs('packing-slips.*')) fw bold @endif" href="{{route('management.index', 'packing')}}">Packing Slips</a></li>
|
||||
<li><a class="dropdown-item @if(request()->routeIs('service-files.*')) fw bold @endif" href="{{route('management.index', 'files')}}">Service Files</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<!-- Right Side Of Navbar -->
|
||||
<ul class="navbar-nav ms-auto">
|
||||
<!-- Authentication Links -->
|
||||
@guest
|
||||
@if (Route::has('login'))
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="{{ route('login') }}">{{ __('Login') }}</a>
|
||||
</li>
|
||||
@endif
|
||||
|
||||
@if (Route::has('register'))
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="{{ route('register') }}">{{ __('Register') }}</a>
|
||||
</li>
|
||||
@endif
|
||||
@else
|
||||
<li class="nav-item dropdown">
|
||||
<a id="navbarDropdown" class="nav-link dropdown-toggle" href="#" role="button"
|
||||
data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false" v-pre>
|
||||
{{ Auth::user()->name }}
|
||||
</a>
|
||||
|
||||
<div class="dropdown-menu dropdown-menu-end" aria-labelledby="navbarDropdown">
|
||||
<a class="dropdown-item" href="{{ route('logout') }}"
|
||||
onclick="event.preventDefault();
|
||||
document.getElementById('logout-form').submit();">
|
||||
{{ __('Logout') }}
|
||||
</a>
|
||||
|
||||
<form id="logout-form" action="{{ route('logout') }}" method="POST" class="d-none">
|
||||
@csrf
|
||||
</form>
|
||||
</div>
|
||||
</li>
|
||||
@endguest
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
@ -1,3 +0,0 @@
|
||||
<div>
|
||||
|
||||
</div>
|
@ -1,44 +0,0 @@
|
||||
<div>
|
||||
<div class="row mb-2">
|
||||
<label for="customer_id" class="col-md-4 col-form-label text-md-end">Customer</label>
|
||||
<div class="col-md-6">
|
||||
<select wire:change="updateContactList" wire:model="selectedCustomer" name="customer_id"
|
||||
class="form-select form-select-sm" id="customer_id" autofocus required>
|
||||
@foreach($customers as $customer)
|
||||
<option value="{{$customer->id}}" {{ old('customer_id') == $customer->id ? "selected" : "" }}>
|
||||
{{$customer->company_name}}
|
||||
</option>
|
||||
@endforeach()
|
||||
</select>
|
||||
|
||||
@error('customer_id')
|
||||
<span class="invalid-feedback" role="alert">
|
||||
<strong>{{ $message }}</strong>
|
||||
</span>
|
||||
@enderror
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row mb-2">
|
||||
<label for="contact_id" class="col-md-4 col-form-label text-md-end">Contact</label>
|
||||
<div class="col-md-6">
|
||||
@if(isset($contacts))
|
||||
<select wire:model="contacts" wire:key="{{$customer}}" name="contact_id"
|
||||
class="form-select form-select-sm" id="contact_id">
|
||||
<option value=""></option>
|
||||
@foreach($contacts as $contact)
|
||||
<option value="{{$contact->id}}" {{ old('contact_id') == $contact->id ? "selected" : "" }}>
|
||||
{{$contact->full_name}}
|
||||
</option>
|
||||
@endforeach
|
||||
</select>
|
||||
|
||||
@error('contact_id')
|
||||
<span class="invalid-feedback" role="alert">
|
||||
<strong>{{ $message }}</strong>
|
||||
</span>
|
||||
@enderror
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
@ -1,302 +0,0 @@
|
||||
<div>
|
||||
|
||||
<div class="overflow-x-hidden overflow-y-visible" style="max-height: 730px">
|
||||
<table class="table table-striped table-sm mb-1 ms-0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">#</th>
|
||||
<th scope="col">SKU</th>
|
||||
<th scope="col">Product Name</th>
|
||||
<th scope="col">Color</th>
|
||||
<th scope="col">XS</th>
|
||||
<th scope="col">S</th>
|
||||
<th scope="col">M</th>
|
||||
<th scope="col">L</th>
|
||||
<th scope="col">XL</th>
|
||||
<th scope="col">2XL</th>
|
||||
<th scope="col">3XL</th>
|
||||
<th scope="col">OSFA</th>
|
||||
<th scope="col">Total</th>
|
||||
<th scope="col"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
@foreach($productInputs as $key => $value)
|
||||
|
||||
<tr wire:key="productRow.{{$key}}">
|
||||
|
||||
<input type="hidden" name="productInputCount[]" value="1">
|
||||
|
||||
<th scope="row" class="align-middle">{{$loop->index+1}}</th>
|
||||
<td class="col-1">
|
||||
<!-- SKU -->
|
||||
|
||||
<input id="sku_{{$key}}" type="text"
|
||||
class="form-control form-control-sm @error('sku') is-invalid @enderror"
|
||||
name="sku[]" value="{{@old('sku')}}" autofocus
|
||||
wire:change="determineAddProductRow({{$loop->index}})">
|
||||
</td>
|
||||
<td class="col-3">
|
||||
<!-- product_name -->
|
||||
|
||||
<input id="product_name_{{$key}}" type="text"
|
||||
class="form-control form-control-sm @error('product_name') is-invalid @enderror"
|
||||
name="product_name[]" value="{{@old('product_name')}}"
|
||||
wire:change="determineAddProductRow({{$loop->index}})">
|
||||
</td>
|
||||
<td class="col-1">
|
||||
<!-- product_color -->
|
||||
|
||||
<input id="product_color_{{$key}}" type="text" min="0"
|
||||
class="form-control form-control-sm @error('product_color') is-invalid @enderror"
|
||||
name="product_color[]" value="{{@old('product_color')}}"
|
||||
wire:change="determineAddProductRow({{$loop->index}})">
|
||||
</td>
|
||||
<td class="" style="width: 55px">
|
||||
<!-- size_xs -->
|
||||
|
||||
<input id="size_xs_{{$key}}" type="number" min="0"
|
||||
class="form-control form-control-sm @error('size_xs') is-invalid @enderror"
|
||||
name="size_xs[]" value="{{@old('size_xs')}}"
|
||||
wire:model.live="sizes.{{$key}}.xs"
|
||||
wire:change="determineAddProductRow({{$loop->index}})">
|
||||
</td>
|
||||
<td class="" style="width: 55px">
|
||||
<!-- size_s -->
|
||||
|
||||
<input id="size_s_{{$key}}" type="number" min="0"
|
||||
class="form-control form-control-sm @error('size_s') is-invalid @enderror"
|
||||
name="size_s[]" value="{{@old('size_s')}}"
|
||||
wire:model.live="sizes.{{$key}}.s"
|
||||
wire:change="determineAddProductRow({{$loop->index}})">
|
||||
</td>
|
||||
<td class="" style="width: 55px">
|
||||
<!-- size_m -->
|
||||
|
||||
<input id="size_m_{{$key}}" type="number" min="0"
|
||||
class="form-control form-control-sm @error('size_m') is-invalid @enderror"
|
||||
name="size_m[]" value="{{@old('size_m')}}"
|
||||
wire:model.live="sizes.{{$key}}.m"
|
||||
wire:change="determineAddProductRow({{$loop->index}})">
|
||||
</td>
|
||||
<td class="" style="width: 55px">
|
||||
<!-- size_l -->
|
||||
|
||||
<input id="size_l_{{$key}}" type="number" min="0"
|
||||
class="form-control form-control-sm @error('size_l') is-invalid @enderror"
|
||||
name="size_l[]" value="{{@old('size_l')}}"
|
||||
wire:model.live="sizes.{{$key}}.l"
|
||||
wire:change="determineAddProductRow({{$loop->index}})">
|
||||
</td>
|
||||
<td class="" style="width: 55px">
|
||||
<!-- size_xl -->
|
||||
|
||||
<input id="size_xl_{{$key}}" type="number" min="0"
|
||||
class="form-control form-control-sm @error('size_xl') is-invalid @enderror"
|
||||
name="size_xl[]" value="{{@old('size_xl')}}"
|
||||
wire:model.live="sizes.{{$key}}.xl"
|
||||
wire:change="determineAddProductRow({{$loop->index}})">
|
||||
</td>
|
||||
<td class="" style="width: 55px">
|
||||
<!-- size_2xl -->
|
||||
|
||||
<input id="size_2xl_{{$key}}" type="number" min="0"
|
||||
class="form-control form-control-sm @error('size_2xl') is-invalid @enderror"
|
||||
name="size_2xl[]" value="{{@old('size_2xl')}}"
|
||||
wire:model.live="sizes.{{$key}}.2xl"
|
||||
wire:change="determineAddProductRow({{$loop->index}})">
|
||||
|
||||
</td>
|
||||
<td class="" style="width: 55px">
|
||||
<!-- size_3xl -->
|
||||
|
||||
<input id="size_3xl_{{$key}}" type="number" min="0"
|
||||
class="form-control form-control-sm @error('size_3xl') is-invalid @enderror"
|
||||
name="size_3xl[]"
|
||||
wire:model.live="sizes.{{$key}}.3xl"
|
||||
wire:change="determineAddProductRow({{$loop->index}})">
|
||||
</td>
|
||||
<td style="width: 55px">
|
||||
<!-- size_osfa -->
|
||||
|
||||
<input id="size_osfa_{{$key}}" type="number" min="0"
|
||||
class="form-control form-control-sm @error('size_osfa') is-invalid @enderror"
|
||||
name="size_osfa[]" value="{{@old('size_osfa')}}"
|
||||
wire:model.live="sizes.{{$key}}.osfa"
|
||||
wire:change="determineAddProductRow({{$loop->index}})"
|
||||
>
|
||||
</td>
|
||||
<td class="col" style="width: 55px">
|
||||
<input id="product_total_{{$key}}" type="number"
|
||||
class="form-control form-control-sm @error('product_total') is-invalid @enderror"
|
||||
name="product_total[]" readonly
|
||||
wire:model.live="totals.{{$key}}"
|
||||
>
|
||||
|
||||
</td>
|
||||
<td class="col" style="width: 40px">
|
||||
@if($key > 0)
|
||||
<button class="btn btn-sm" type="button" wire:click="removeProductInput({{$key}})">
|
||||
<x-bi-trash3/>
|
||||
</button>
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
<div class="d-flex gap-2">
|
||||
<label for="total-quantity" class="text-nowrap col-form-label">Total Quantity:</label>
|
||||
|
||||
<input type="number" name="total-quantity" id="" class="form-control-plaintext" readonly
|
||||
wire:model.live="totalQuantity">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="ms-2">
|
||||
|
||||
<!-- Title -->
|
||||
<div class="row px-2 border-bottom mt-4">
|
||||
<div class="row fw-bold">
|
||||
<div class="col-1 px-0 " style="width: 40px;">#</div>
|
||||
<div class="col-1 px-1">Service</div>
|
||||
<div class="col-2 px-1">Placement</div>
|
||||
<div class="col-3 px-1">Logo Name</div>
|
||||
|
||||
<div class="col-5">
|
||||
<div class="row">
|
||||
<div class="col px-1">Setup</div>
|
||||
<div class="col px-1">Width</div>
|
||||
<div class="col px-1">Height</div>
|
||||
<div class="col px-1">Unit</div>
|
||||
<div class="col px-1">Price</div>
|
||||
<div class="col px-1">Total</div>
|
||||
<div class="col px-1"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Row -->
|
||||
|
||||
@foreach($serviceInputs as $key => $value)
|
||||
<div class="row">
|
||||
|
||||
<input type="hidden" name="serviceInputCount[]" value="1">
|
||||
|
||||
<div class="@if($loop->index % 2 != 1) bg-body-tertiary @endif border-bottom py-2">
|
||||
<div class="row mb-1">
|
||||
<div class="row mb-2">
|
||||
<div class="col-1 px-1 fw-bold" style="width: 40px;">{{$loop->index+1}}</div>
|
||||
<div class="col-1 px-1">
|
||||
<input id="service_name_{{$key}}" type="text"
|
||||
class="form-control form-control-sm m-0 @error('service_name') is-invalid @enderror"
|
||||
name="service_type[]" value="{{@old('service_name')}}" placeholder="Service"
|
||||
wire:change="determineAddServiceProductRow({{$loop->index}})">
|
||||
</div>
|
||||
<div class="col-2 px-1">
|
||||
<input id="placement_{{$key}}" type="text"
|
||||
class="form-control form-control-sm @error('placement') is-invalid @enderror"
|
||||
name="placement[]" value="{{@old('placement')}}"
|
||||
wire:change="determineAddServiceProductRow({{$loop->index}})">
|
||||
</div>
|
||||
<div class="col-3 px-1">
|
||||
<input id="logo_name_{{$key}}" type="text"
|
||||
class="form-control form-control-sm @error('logo_name') is-invalid @enderror"
|
||||
name="logo_name[]" value="{{@old('logo_name')}}"
|
||||
wire:change="determineAddServiceProductRow({{$loop->index}})">
|
||||
</div>
|
||||
<div class="col-5">
|
||||
|
||||
<div class="row">
|
||||
<div class="col px-1">
|
||||
<input id="setup_amount_{{$key}}" type="number" min="0"
|
||||
class="form-control form-control-sm @error('setup_amount') is-invalid @enderror"
|
||||
name="setup_amount[]" value="{{@old('setup_amount')}}"
|
||||
wire:change="determineAddServiceProductRow({{$loop->index}})">
|
||||
</div>
|
||||
<div class="col px-1">
|
||||
<input id="service_width_{{$key}}" type="number" min="0"
|
||||
class="form-control form-control-sm @error('service_width') is-invalid @enderror"
|
||||
name="service_width[]" value="{{@old('service_width')}}"
|
||||
wire:change="determineAddServiceProductRow({{$loop->index}})">
|
||||
</div>
|
||||
<div class="col px-1">
|
||||
<input id="service_height_{{$key}}" type="number" min="0"
|
||||
class="form-control form-control-sm @error('service_height') is-invalid @enderror"
|
||||
name="service_height[]" value="{{@old('service_height')}}"
|
||||
wire:change="determineAddServiceProductRow({{$loop->index}})">
|
||||
</div>
|
||||
<div class="col px-1">
|
||||
<input id="service_setup_unit_{{$key}}" type="number" min="0"
|
||||
class="form-control form-control-sm @error('service_setup_unit') is-invalid @enderror"
|
||||
name="amount[]"
|
||||
value="{{@old('service_setup_unit')}}"
|
||||
wire:change="determineAddServiceProductRow({{$loop->index}})"
|
||||
wire:model.live="units.{{$key}}"
|
||||
>
|
||||
</div>
|
||||
<div class="col px-1">
|
||||
<input id="service_setup_price_{{$key}}" type="text"
|
||||
class="form-control form-control-sm @error('service_setup_price') is-invalid @enderror"
|
||||
name="amount_price[]"
|
||||
value="{{@old('service_setup_price')}}"
|
||||
wire:change="determineAddServiceProductRow({{$loop->index}})"
|
||||
wire:model.live="prices.{{$key}}"
|
||||
>
|
||||
</div>
|
||||
<div class="col px-1">
|
||||
<input id="service_total_{{$key}}" type="number" precision="2"
|
||||
class="form-control form-control-sm px-1 @error('service_total') is-invalid @enderror"
|
||||
name="service_total" readonly
|
||||
wire:model.live="priceTotals.{{$key}}">
|
||||
</div>
|
||||
<div class="col px-1 text-end" style="width: 40px;">
|
||||
@if($key > 0)
|
||||
<button class="btn btn-sm" type="button"
|
||||
wire:click="removeServiceInput({{$key}})">
|
||||
<x-bi-trash3/>
|
||||
</button>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mx-0 px-0">
|
||||
<div class="col-1" style="width: 40px;"></div>
|
||||
<div class="col-1 px-1">
|
||||
<input id="service_file_name_{{$key}}" type="text"
|
||||
class="form-control form-control-sm @error('service_file_name') is-invalid @enderror"
|
||||
name="service_file_name[]" value="{{@old('service_file_name')}}"
|
||||
placeholder="File"
|
||||
wire:change="determineAddServiceProductRow({{$loop->index}})">
|
||||
</div>
|
||||
|
||||
<div class="col-9 px-1">
|
||||
<textarea name="service_notes[]" id="contents_{{$key}}" style="resize: none" rows="2"
|
||||
class="form-control form-control-sm"
|
||||
placeholder="Thread colors"
|
||||
wire:change="determineAddServiceProductRow({{$loop->index}})"
|
||||
>{{ old('service_notes') }}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
|
||||
{{-- <div class="row">--}}
|
||||
<div class="d-flex flex-row gap-2 ">
|
||||
<label for="total-price" class="col-form-label text-nowrap">Total Price:</label>
|
||||
<input type="text" name="total-price" id="" class="col-1 form-control-plaintext" readonly
|
||||
wire:model.live="totalPrice">
|
||||
</div>
|
||||
{{-- </div>--}}
|
||||
</div>
|
||||
|
||||
</div>
|
@ -1,110 +0,0 @@
|
||||
<div>
|
||||
|
||||
<div class="row justify-content-center mb-3">
|
||||
<div class="col-9">
|
||||
<div class="d-flex flex-row gap-2">
|
||||
<div class="d-inline-flex">
|
||||
<h4 class="my-auto">{{$this->title}}</h4>
|
||||
</div>
|
||||
<div class="mx-auto"></div>
|
||||
<a href="{{route('orders.create')}}"
|
||||
class="btn btn-sm btn-primary" title="Create new order...">
|
||||
<x-bi-plus-circle-fill/>
|
||||
Create entry
|
||||
</a>
|
||||
<div class="vr"></div>
|
||||
|
||||
<div class="d-inline-flex">
|
||||
<select name="" id="" class="form-select form-select-sm">
|
||||
<option value="">Sort by...</option>
|
||||
<option value="">Customer</option>
|
||||
<option value="">Internal PO</option>
|
||||
<option value="">Customer PO</option>
|
||||
<option value="">Order Date</option>
|
||||
<option value="">Due Date</option>
|
||||
<option value="">Status</option>
|
||||
<option value="">Rush</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="d-inline-flex">
|
||||
<div class="btn-group" role="group">
|
||||
<button class="btn btn-sm btn-secondary">Asc</button>
|
||||
<button class="btn btn-sm btn-outline-secondary">Desc</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="vr"></div>
|
||||
|
||||
<div class="d-inline-flex gap-2">
|
||||
<input wire:model.live.debounce.50ms="search" type="text" class="form-control form-control-sm"
|
||||
placeholder="Search..."
|
||||
name="" id="searchText">
|
||||
<button class="btn btn-sm btn-outline-primary" id="searchButton">
|
||||
<x-bi-search/>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-9">
|
||||
<table class="table table-striped table-sm table-hover">
|
||||
<thead>
|
||||
<tr class="border-bottom border-black">
|
||||
{{-- @if($this->showCustomerColumn)--}}
|
||||
<th scope="col">Customer</th>
|
||||
{{-- @endif()--}}
|
||||
<th scope="col">Internal PO</th>
|
||||
<th scope="col">Customer PO</th>
|
||||
<th scope="col">Order Date</th>
|
||||
<th scope="col">Due Date</th>
|
||||
<th scope="col">Status</th>
|
||||
<th scope="col">Rush</th>
|
||||
<th scope="col">View</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($orders as $order)
|
||||
<tr class="@if($today > $order->due_date && $order->active()) table-danger @elseif($order->rush && $order->active()) table-warning @endif">
|
||||
<td><a class="text-reset text-decoration-none"
|
||||
href="{{route('customers.show', [$order->customer, 'details'])}}">{{$order->customer->company_name}}</a>
|
||||
</td>
|
||||
<td class="fw-bold"><code>{{$order->internal_po}}</code></td>
|
||||
<td class=""><code>{{$order->customer_po}}</code></td>
|
||||
<td class="text-nowrap">{{$order->order_date}}</td>
|
||||
|
||||
<td class="text-nowrap ">
|
||||
{{$order->due_date}}
|
||||
@if($order->due_date < $today && $order->active())
|
||||
<x-bi-exclamation-triangle/>
|
||||
@endif </td>
|
||||
|
||||
<td>{{$order->status->value}}</td>
|
||||
<td>
|
||||
@if($order->rush)
|
||||
<x-bi-check-lg class="text-danger"></x-bi-check-lg>
|
||||
@endif
|
||||
</td>
|
||||
<td class="align-top">
|
||||
<a class="" href="{{route('orders.show', $order)}}">
|
||||
<x-bi-arrow-right/>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col"></div>
|
||||
<div class="col-9">
|
||||
{{$orders->links()}}
|
||||
</div>
|
||||
<div class="col"></div>
|
||||
</div>
|
||||
|
||||
</div>
|
@ -1,27 +0,0 @@
|
||||
@extends('layouts.app')
|
||||
|
||||
@section('header')
|
||||
@include('partials.management.index.management-tabs')
|
||||
|
||||
@endsection()
|
||||
|
||||
@section('content')
|
||||
<div class="container">
|
||||
<div class="tab-content">
|
||||
|
||||
@include('partials.management.index.customers')
|
||||
|
||||
@include('partials.management.index.packing-slips')
|
||||
|
||||
@include('partials.management.index.service-files')
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Create Customer Modal -->
|
||||
@include('partials.customers.index.create-modal')
|
||||
|
||||
<!-- Delete Customer Modal -->
|
||||
@include('partials.customers.index.delete-all-modal')
|
||||
|
||||
@endsection
|
@ -1,39 +0,0 @@
|
||||
@extends('layouts.app')
|
||||
|
||||
|
||||
@section('header')
|
||||
<div class="container-fluid bg-light pt-3">
|
||||
|
||||
<!-- name row -->
|
||||
<div class="row justify-content-center pb-2">
|
||||
</div>
|
||||
|
||||
<!-- Tabs row -->
|
||||
<div class="row justify-content-center mb-3">
|
||||
<div class="col-3 border-bottom"></div>
|
||||
<div class="col-6 p-0">
|
||||
<ul class="nav nav-fill nav-tabs" id="management-tabs" role="tablist">
|
||||
<li class="nav-item" role="presentation">
|
||||
<a class="nav-link link-dark active" id="order-tab"
|
||||
href="#" type="button" role="tab" aria-controls="order" aria-selected="true">
|
||||
<x-bi-box/>
|
||||
Add Products To Order
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="col border-bottom"></div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('content')
|
||||
<div class="container">
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-10 pt-3">
|
||||
<livewire:order-products-create/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@endsection
|
@ -1,216 +0,0 @@
|
||||
@extends('layouts.app')
|
||||
|
||||
|
||||
@section('header')
|
||||
<div class="container-fluid bg-light pt-3">
|
||||
|
||||
<!-- name row -->
|
||||
<div class="row justify-content-center pb-2">
|
||||
</div>
|
||||
|
||||
<!-- Tabs row -->
|
||||
<div class="row justify-content-center mb-2">
|
||||
<div class="col-3 border-bottom"></div>
|
||||
<div class="col-6 p-0">
|
||||
<ul class="nav nav-fill nav-tabs" id="management-tabs" role="tablist">
|
||||
<li class="nav-item" role="presentation">
|
||||
<a class="nav-link link-dark active" id="order-tab"
|
||||
href="#" type="button" role="tab"
|
||||
aria-controls="order" aria-selected="true">
|
||||
<x-bi-box/>
|
||||
Create Order
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="col border-bottom"></div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('content')
|
||||
<div class="container-fluid mt-3" style="max-width: 1800px">
|
||||
|
||||
<form action="{{route('orders.store') }}" method="post">
|
||||
@csrf
|
||||
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-11 col-xl-4 border-end" style="height: 730px">
|
||||
|
||||
<livewire:customer-and-contact-select :customers="$customers"/>
|
||||
|
||||
<hr class="border-secondary-subtle px-0">
|
||||
|
||||
<div class="row mb-2">
|
||||
<label for="order_type" class="col-md-4 col-form-label text-md-end">Order Type</label>
|
||||
<div class="col-md-6">
|
||||
<select name="order_type" class="form-select form-select-sm" id="order_type">
|
||||
@foreach($order_types as $case)
|
||||
<option value="{{$case->name}}">{{$case->value}}</option>
|
||||
@endforeach()
|
||||
</select>
|
||||
|
||||
@error('order_type')
|
||||
<span class="invalid-feedback" role="alert">
|
||||
<strong>{{ $message }}</strong>
|
||||
</span>
|
||||
@enderror
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row mb-2">
|
||||
<label for="order_status" class="col-md-4 col-form-label text-md-end">Order Status</label>
|
||||
<div class="col-md-6">
|
||||
<select name="status" class="form-select form-select-sm" id="order_status">
|
||||
@foreach($order_status as $case)
|
||||
<option value="{{$case->value}}" {{ $case->name === 'APPROVED' ? 'selected' : '' }}>
|
||||
{{$case->value}}
|
||||
</option>
|
||||
@endforeach()
|
||||
</select>
|
||||
|
||||
@error('status')
|
||||
<span class="invalid-feedback" role="alert">
|
||||
<strong>{{ $message }}</strong>
|
||||
</span>
|
||||
@enderror
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr class="border-secondary-subtle px-0">
|
||||
|
||||
<div class="row mb-2">
|
||||
<label class="col-md-4 col-form-label text-md-end">Customer PO</label>
|
||||
<div class="col-md-6">
|
||||
<input id="customer_po" type="text"
|
||||
class="form-control form-control-sm @error('customer_po') is-invalid @enderror"
|
||||
name="customer_po" value="{{@old('customer_po')}}" required>
|
||||
|
||||
@error('customer_po')
|
||||
<span class="invalid-feedback" role="alert">
|
||||
<strong>{{ $message }}</strong>
|
||||
</span>
|
||||
@enderror
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr class="border-secondary-subtle px-0">
|
||||
|
||||
<div class="row mb-2">
|
||||
<label class="col-md-4 col-form-label text-md-end">Attributes</label>
|
||||
<div class="col-md-3">
|
||||
<div class="form-check ">
|
||||
<input class="form-check-input" type="checkbox" id="new_art" name="new_art"
|
||||
value="1">
|
||||
<label class="form-check-label" for="new_art">New art</label>
|
||||
</div>
|
||||
<div class="form-check ">
|
||||
<input class="form-check-input" type="checkbox" id="rush" name="rush" value="1">
|
||||
<label class="form-check-label" for="rush">Rush</label>
|
||||
</div>
|
||||
<div class="form-check ">
|
||||
<input class="form-check-input" type="checkbox" id="digitizing"
|
||||
name="digitizing" value="1">
|
||||
<label class="form-check-label" for="digitizing">Digitizing</label>
|
||||
</div>
|
||||
<div class="form-check ">
|
||||
<input class="form-check-input" type="checkbox" id="supplied_file"
|
||||
name="customer_supplied_file" value="1">
|
||||
<label class="form-check-label" for="supplied_file">
|
||||
Customer Supplied File
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="form-check ">
|
||||
<input class="form-check-input" type="checkbox" id="repeat" name="repeat"
|
||||
value="1">
|
||||
<label class="form-check-label" for="repeat">Repeat</label>
|
||||
</div>
|
||||
<div class="form-check ">
|
||||
<input class="form-check-input" type="checkbox" id="event" name="event"
|
||||
value="1">
|
||||
<label class="form-check-label" for="event">Event</label>
|
||||
</div>
|
||||
<div class="form-check ">
|
||||
<input class="form-check-input" type="checkbox" id="purchased_garments"
|
||||
value="1"
|
||||
name="purchased_garment">
|
||||
<label class="form-check-label" for="purchased_garments">
|
||||
Purchased
|
||||
garments</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr class="border-secondary-subtle px-0">
|
||||
|
||||
<div class="row mb-2">
|
||||
<label for="order_date" class="col-md-4 col-form-label text-md-end">Order date</label>
|
||||
|
||||
<div class="col-md-6">
|
||||
<input id="order_date" type="date"
|
||||
class="form-control form-control-sm @error('order_date') is-invalid @enderror"
|
||||
name="order_date" value="{{ old('order_date') ?? $today }}" required
|
||||
>
|
||||
|
||||
@error('order_date')
|
||||
<span class="invalid-feedback" role="alert">
|
||||
<strong>{{ $message }}</strong>
|
||||
</span>
|
||||
@enderror
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row mb-2">
|
||||
<label for="due_date" class="col-md-4 col-form-label text-md-end">Due date</label>
|
||||
|
||||
<div class="col-md-6">
|
||||
<input id="due_date" type="date"
|
||||
class="form-control form-control-sm @error('due_date') is-invalid @enderror"
|
||||
name="due_date" value="{{ old('due_date') ?? $due_default }}" required
|
||||
>
|
||||
|
||||
@error('due_date')
|
||||
<span class="invalid-feedback" role="alert">
|
||||
<strong>{{ $message }}</strong>
|
||||
</span>
|
||||
@enderror
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr class="border-secondary-subtle px-0">
|
||||
|
||||
<div class="row mb-2">
|
||||
<label for="notes" class="col-md-4 col-form-label text-md-end">Notes</label>
|
||||
|
||||
<div class="col-md-6">
|
||||
<textarea name="notes" id="notes" cols="30" rows="4" class="form-control form-control-sm"
|
||||
>{{ old('notes') }}</textarea>
|
||||
|
||||
@error('notes')
|
||||
<span class="invalid-feedback" role="alert">
|
||||
<strong>{{ $message }}</strong>
|
||||
</span>
|
||||
@enderror
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-11 col-xl-7">
|
||||
<livewire:order-products-create/>
|
||||
</div>
|
||||
|
||||
<hr class="border-secondary-subtle px-0">
|
||||
|
||||
<div class="row">
|
||||
<div class="col text-end">
|
||||
<button type="submit" class="btn btn-primary">
|
||||
Save Order
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
@endsection
|
@ -1,91 +0,0 @@
|
||||
@extends('layouts.app')
|
||||
|
||||
@section('header')
|
||||
<div class="container-fluid bg-light pt-3">
|
||||
|
||||
<!-- Customer company name row -->
|
||||
<div class="row justify-content-center pb-2">
|
||||
<div class="col-3"></div>
|
||||
<div class="col">
|
||||
{{-- <h2>Overview</h2>--}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Tabs row -->
|
||||
<div class="row justify-content-center mb-3">
|
||||
<div class="col-3 border-bottom"></div>
|
||||
<div class="col-6 p-0">
|
||||
|
||||
<ul class="nav nav-fill nav-tabs" id="home-tabs" role="tablist">
|
||||
<li class="nav-item" role="presentation">
|
||||
<a class="nav-link link-dark {{$tab == 'all' ? 'active' : ''}}" id="all-tab"
|
||||
href="{{route('orders.index', ['tab' => 'all'])}}" type="button" role="tab"
|
||||
aria-controls="all" aria-selected="{{$tab == 'all' ? 'true' : 'false'}}">
|
||||
<x-bi-journals/>
|
||||
All Orders
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item" role="presentation">
|
||||
<a class="nav-link link-dark {{$tab == 'active_orders' ? 'active' : ''}}" id="active-orders-tab"
|
||||
href="{{route('orders.index', ['tab' => 'active_orders'])}}" type="button" role="tab"
|
||||
aria-controls="active_orders"
|
||||
aria-selected="{{$tab == 'active_orders' ? 'true' : 'false'}}">
|
||||
<x-bi-arrow-clockwise/>
|
||||
Active Orders
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item" role="presentation">
|
||||
<a class="nav-link link-dark {{$tab == 'finished_orders' ? 'active' : ''}}"
|
||||
id="finished-orders-tab"
|
||||
href="{{route('orders.index', ['tab' => 'finished_orders'])}}" type="button" role="tab"
|
||||
aria-controls="finished_orders"
|
||||
aria-selected="{{$tab == 'finished_orders' ? 'true' : 'false'}}">
|
||||
<x-bi-check-all/>
|
||||
Finished Orders
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item" role="presentation">
|
||||
<a class="nav-link link-dark {{$tab == 'invoice' ? 'active' : ''}}" id="invoice-tab"
|
||||
href="{{route('orders.index', ['tab' => 'invoice'])}}" type="button" role="tab"
|
||||
aria-controls="invoice" aria-selected="{{$tab == 'invoice' ? 'true' : 'false'}}">
|
||||
<x-bi-envelope/>
|
||||
Invoiced Orders
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="col border-bottom"></div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('content')
|
||||
<div class="container">
|
||||
<div class="row justify-content-center my-3">
|
||||
<div class="tab-content">
|
||||
|
||||
<div class="tab-pane {{$tab == 'active_orders' ? 'active' : ''}}" id="active_orders" role="tabpanel"
|
||||
aria-labelledby="active-orders-tab">
|
||||
<livewire:orders-table order-type="active" :show-customer-column='true' :title="'Active Orders'"/>
|
||||
</div>
|
||||
|
||||
<div class="tab-pane {{$tab == 'finished_orders' ? 'active' : ''}}" id="finished-orders" role="tabpanel"
|
||||
aria-labelledby="finished-orders-tab">
|
||||
<livewire:orders-table order-type="finished" :show-customer-column='true' title="Finished Orders"/>
|
||||
</div>
|
||||
|
||||
<div class="tab-pane {{$tab == 'all' ? 'active' : ''}}" id="all-orders" role="tabpanel"
|
||||
aria-labelledby="all-orders-tab">
|
||||
<livewire:orders-table order-type="all" :show-customer-column='true' title="All Orders"/>
|
||||
</div>
|
||||
|
||||
<div class="tab-pane {{$tab == 'invoice' ? 'active' : ''}}" id="invoice-orders" role="tabpanel"
|
||||
aria-labelledby="invoice-orders-tab">
|
||||
<livewire:orders-table order-type="invoiced" :show-customer-column='true' title="Invoiced Orders"/>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
@ -1,412 +0,0 @@
|
||||
@extends('layouts.app')
|
||||
|
||||
@section('header')
|
||||
<div class="container-fluid bg-light pt-3">
|
||||
|
||||
<!-- Customer company name row -->
|
||||
<div class="row justify-content-center pb-2">
|
||||
<div class="col-3"></div>
|
||||
<div class="col">
|
||||
{{-- <h2>Overview</h2>--}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Tabs row -->
|
||||
<div class="row justify-content-center mb-3">
|
||||
<div class="col-2 border-bottom"></div>
|
||||
<div class="col-8 p-0">
|
||||
|
||||
<ul class="nav nav-fill nav-tabs" id="home-tabs" role="tablist">
|
||||
<li class="nav-item" role="presentation">
|
||||
<a class="nav-link link-dark {{$tab == 'details' ? 'active' : ''}}" id="details-tab"
|
||||
href="{{route('orders.index', ['tab' => 'details'])}}" type="button" role="tab"
|
||||
aria-controls="details" aria-selected="{{$tab == 'details' ? 'true' : 'false'}}">
|
||||
<x-bi-list-ul/>
|
||||
Order Details
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item" role="presentation">
|
||||
<a class="nav-link link-dark {{$tab == 'packing-slips' ? 'active' : ''}}" id="packing-slips-tab"
|
||||
href="{{route('orders.index', ['tab' => 'packing-slips'])}}" type="button" role="tab"
|
||||
aria-controls="packing-slips"
|
||||
aria-selected="{{$tab == 'packing-slips' ? 'true' : 'false'}}">
|
||||
<x-bi-calendar-range/>
|
||||
Packing Slips
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item" role="presentation">
|
||||
<a class="nav-link link-dark {{$tab == 'timeline' ? 'active' : ''}}" id="timeline-tab"
|
||||
href="{{route('orders.index', ['tab' => 'timeline'])}}" type="button" role="tab"
|
||||
aria-controls="timeline" aria-selected="{{$tab == 'timeline' ? 'true' : 'false'}}">
|
||||
<x-bi-calendar-range/>
|
||||
Timeline
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item" role="presentation">
|
||||
<a class="nav-link link-dark {{$tab == 'quote' ? 'active' : ''}}" id="quote-tab"
|
||||
href="{{route('orders.index', ['tab' => 'quote'])}}" type="button" role="tab"
|
||||
aria-controls="quote" aria-selected="{{$tab == 'quote' ? 'true' : 'false'}}">
|
||||
<x-bi-calendar-range/>
|
||||
Quote
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item" role="presentation">
|
||||
<a class="nav-link link-dark {{$tab == 'invoice' ? 'active' : ''}}" id="invoice-tab"
|
||||
href="{{route('orders.index', ['tab' => 'invoice'])}}" type="button" role="tab"
|
||||
aria-controls="invoice" aria-selected="{{$tab == 'invoice' ? 'true' : 'false'}}">
|
||||
<x-bi-calendar-range/>
|
||||
Invoice
|
||||
</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
<div class="col border-bottom"></div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('content')
|
||||
<div class="container-fluid" style="max-width: 1800px">
|
||||
<div class="row justify-content-center my-3 pt-3 ">
|
||||
|
||||
<div class="col-11 col-xl-4 border-end">
|
||||
|
||||
<div class="row mb-3">
|
||||
<div class="col">
|
||||
<a href="{{route('orders.pdf', $order)}}" target="_blank" class="btn btn-primary">
|
||||
<x-bi-printer-fill/>
|
||||
Print Order
|
||||
</a>
|
||||
</div>
|
||||
<div class="col"></div>
|
||||
<div class="col"></div>
|
||||
</div>
|
||||
|
||||
<div class="row ">
|
||||
<label for="company_name" class="col-5 py-0 col-form-label text-md-end">Customer</label>
|
||||
<div class="col-md-6">
|
||||
<a class="fw-bold text-body text-decoration-none"
|
||||
href="{{route('customers.show', [$order->customer, 'details'])}}">{{$order->customer->company_name}}</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<label for="contact_name" class="col-5 py-0 col-form-label text-md-end">Contact</label>
|
||||
<div class="col-md-6">
|
||||
@if(isset($order->contact))
|
||||
<input type="text" name="contact_name" id="" class="py-0 form-control-plaintext" readonly
|
||||
value="{{$order->contact->full_name}}">
|
||||
@else
|
||||
<input type="text" name="contact_name" id=""
|
||||
class="py-0 form-control-plaintext text-secondary"
|
||||
readonly value="No contact set">
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr class="border-secondary-subtle px-0">
|
||||
|
||||
<div class="row">
|
||||
<label for="order_type" class="col-5 py-0 col-form-label text-md-end">Order Type</label>
|
||||
<div class="col-md-6">
|
||||
<input type="text" name="order_type" id="" class="py-0 form-control-plaintext" readonly
|
||||
value="{{$order->order_type}}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<label for="order_status" class="col-5 py-0 col-form-label text-md-end">Order Status</label>
|
||||
<div class="col-md-6">
|
||||
<input type="text" name="order_status" id="" class="py-0 form-control-plaintext" readonly
|
||||
value="{{$order->status}}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr class="border-secondary-subtle px-0">
|
||||
|
||||
<div class="row ">
|
||||
<label for="internal_po" class="col-5 py-0 col-form-label text-md-end">Internal PO</label>
|
||||
<div class="col-md-6">
|
||||
<code class="fw-bold">{{$order->internal_po}}</code>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row py-0 ">
|
||||
<label for="customer_po" class="col-5 py-0 col-form-label text-md-end">Customer PO</label>
|
||||
<div class="col-md-6">
|
||||
<code class="text-primary">{{$order->customer_po}}</code>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr class="border-secondary-subtle px-0">
|
||||
|
||||
<div class="row mb-2">
|
||||
<label class="col-5 py-0 col-form-label text-md-end">Attributes</label>
|
||||
<div class="col">
|
||||
@if($order->new_art)
|
||||
<div class="form-check">
|
||||
<x-bi-check/>
|
||||
<label class="form-check-label" for="new_art">New art</label>
|
||||
</div>
|
||||
@endif
|
||||
@if($order->rush)
|
||||
<div class="form-check ">
|
||||
<x-bi-check/>
|
||||
<label class="form-check-label" for="new_art">Rush</label>
|
||||
</div>
|
||||
@endif
|
||||
@if($order->digitizing)
|
||||
<div class="form-check ">
|
||||
<x-bi-check/>
|
||||
<label class="form-check-label" for="digitizing">Digitizing</label>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if($order->customer_supplied_file)
|
||||
<div class="form-check ">
|
||||
<x-bi-check/>
|
||||
<label class="form-check-label" for="customer_supplied_file">
|
||||
Customer Supplied File
|
||||
</label>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if($order->repeat)
|
||||
<div class="form-check ">
|
||||
<x-bi-check/>
|
||||
<label class="form-check-label" for="repeat">Repeat</label>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if($order->event)
|
||||
<div class="form-check ">
|
||||
<x-bi-check/>
|
||||
<label class="form-check-label" for="event">Event</label>
|
||||
</div>
|
||||
@endif
|
||||
@if($order->purchased_garments)
|
||||
<div class="form-check ">
|
||||
<x-bi-check/>
|
||||
<label class="form-check-label" for="purchased_garments">Purchased Garments</label>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr class="border-secondary-subtle px-0">
|
||||
|
||||
<div class="row py-0 ">
|
||||
<label for="order_date" class="col-5 py-0 col-form-label text-md-end">Order Date</label>
|
||||
<div class="col-md-6">
|
||||
<input type="text" name="order_date" id="" class="py-0 form-control-plaintext"
|
||||
readonly value="{{$order->order_date}}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row py-0 ">
|
||||
<label for="due_date" class="col-5 py-0 col-form-label text-md-end">Due Date</label>
|
||||
<div class="col-md-6">
|
||||
<input type="text" name="due_date" id="" class="py-0 form-control-plaintext"
|
||||
readonly value="{{$order->due_date}}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<hr class="border-secondary-subtle px-0">
|
||||
|
||||
<div class="row mb-3">
|
||||
<label for="notes" class="col-5 py-0 col-form-label text-md-end">Notes</label>
|
||||
|
||||
<div class="col-6">
|
||||
{{$order->notes}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-xl-7">
|
||||
<table class="table table-striped table-hover table-sm mb-1 ms-0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">#</th>
|
||||
<th scope="col">SKU</th>
|
||||
<th scope="col">Product Name</th>
|
||||
<th scope="col">Color</th>
|
||||
<th scope="col">XS</th>
|
||||
<th scope="col">S</th>
|
||||
<th scope="col">M</th>
|
||||
<th scope="col">L</th>
|
||||
<th scope="col">XL</th>
|
||||
<th scope="col">2XL</th>
|
||||
<th scope="col">3XL</th>
|
||||
<th scope="col">OSFA</th>
|
||||
<th scope="col">Total</th>
|
||||
<th scope="col"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
@foreach($order->orderProducts as $key => $product)
|
||||
<input type="hidden" name="productInputCount[]" value="1">
|
||||
|
||||
<th scope="row" class="align-middle">{{$loop->index+1}}</th>
|
||||
<td class="col-1">
|
||||
<!-- SKU -->
|
||||
{{$product->sku}}
|
||||
</td>
|
||||
<td class="col-3">
|
||||
<!-- product_name -->
|
||||
{{$product->product_name}}
|
||||
</td>
|
||||
<td class="col-1">
|
||||
<!-- product_color -->
|
||||
{{$product->color}}
|
||||
</td>
|
||||
<td class="" style="width: 55px">
|
||||
<!-- size_xs -->
|
||||
{{$product->productSizes()->get()->where('size', 'xs')->first()->amount ?? ''}}
|
||||
</td>
|
||||
<td class="" style="width: 55px">
|
||||
<!-- size_s -->
|
||||
{{$product->productSizes()->get()->where('size', 's')->first()->amount ?? ''}}
|
||||
</td>
|
||||
<td class="" style="width: 55px">
|
||||
<!-- size_m -->
|
||||
{{$product->productSizes()->get()->where('size', 'm')->first()->amount ?? ''}}
|
||||
</td>
|
||||
<td class="" style="width: 55px">
|
||||
<!-- size_l -->
|
||||
{{$product->productSizes()->get()->where('size', 'l')->first()->amount ?? ''}}
|
||||
|
||||
</td>
|
||||
<td class="" style="width: 55px">
|
||||
<!-- size_xl -->
|
||||
{{$product->productSizes()->get()->where('size', 'xl')->first()->amount ?? ''}}
|
||||
</td>
|
||||
<td class="" style="width: 55px">
|
||||
<!-- size_2xl -->
|
||||
{{$product->productSizes()->get()->where('size', '2xl')->first()->amount ?? ''}}
|
||||
</td>
|
||||
<td class="" style="width: 55px">
|
||||
<!-- size_3xl -->
|
||||
{{$product->productSizes()->get()->where('size', '3xl')->first()->amount ?? ''}}
|
||||
</td>
|
||||
<td style="width: 55px">
|
||||
<!-- size_osfa -->
|
||||
{{$product->productSizes()->get()->where('size', 'osfa')->first()->amount ?? ''}}
|
||||
</td>
|
||||
<td class="col" style="width: 55px">
|
||||
{{$product->totalQuantity()}}
|
||||
|
||||
</td>
|
||||
<td class="col" style="width: 40px">
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<div class="d-flex gap-2">
|
||||
<label for="total-quantity" class="text-nowrap col-form-label">Total Quantity:</label>
|
||||
|
||||
<input type="number" name="total-quantity" id="" class="form-control-plaintext" readonly
|
||||
value="{{$order->getTotalProductQuantity()}}">
|
||||
</div>
|
||||
|
||||
<!-- Product Services -->
|
||||
<div class="ms-2">
|
||||
|
||||
<!-- Title -->
|
||||
<div class="row px-2 border-bottom mt-4">
|
||||
<div class="row fw-bold">
|
||||
<div class="col-1 px-0" style="width: 40px;">#</div>
|
||||
<div class="col-1 px-1">Service</div>
|
||||
<div class="col-2 px-1">Placement</div>
|
||||
<div class="col-3 px-1">Logo Name</div>
|
||||
|
||||
<div class="col-5">
|
||||
<div class="row">
|
||||
<div class="col px-1">Setup</div>
|
||||
<div class="col px-1">Width</div>
|
||||
<div class="col px-1">Height</div>
|
||||
<div class="col px-1">Unit</div>
|
||||
<div class="col px-1">Price</div>
|
||||
<div class="col px-1">Total</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Row -->
|
||||
|
||||
@foreach($order->productServices as $key => $service)
|
||||
<div class="row">
|
||||
|
||||
<div class="@if($loop->index % 2 != 1) bg-body-tertiary @endif border-bottom py-2">
|
||||
<div class="row mb-1">
|
||||
<div class="row mb-2">
|
||||
<div class="col-1 px-1 fw-bold" style="width: 40px;">{{$loop->index+1}}</div>
|
||||
<div class="col-1 px-2 fw-bold text-uppercase">
|
||||
<!-- Service type -->
|
||||
{{$service->serviceType->name}}
|
||||
</div>
|
||||
<div class="col-2 px-1 text-uppercase">
|
||||
{{$service->placement}}
|
||||
</div>
|
||||
<div class="col-3 px-1 text-uppercase">
|
||||
{{$service->serviceFile->name }}
|
||||
</div>
|
||||
<div class="col-5">
|
||||
<div class="row">
|
||||
<div class="col px-1">
|
||||
{{$service->serviceFile->setup_number}}
|
||||
</div>
|
||||
<div class="col px-1">
|
||||
{{$service->serviceFile->width}}
|
||||
</div>
|
||||
<div class="col px-1">
|
||||
{{$service->serviceFile->height}}
|
||||
</div>
|
||||
<div class="col px-1">
|
||||
{{$service->amount}}
|
||||
</div>
|
||||
<div class="col px-1">
|
||||
{{$service->amount_price != 0 ? $service->amount_price : ''}}
|
||||
</div>
|
||||
<div class="col px-1">
|
||||
{{$service->amount_price != 0 ? '$' . number_format($service->amount_price*$service->amount, 2) : ''}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mx-0 px-0">
|
||||
<div class="col-1" style="width: 40px;"></div>
|
||||
<div class="col-1 px-1 ps-2">
|
||||
<code class="fs-6">
|
||||
{{$service->serviceFile->code}}
|
||||
</code>
|
||||
</div>
|
||||
|
||||
<div class="col-9 px-1">
|
||||
{{$service->notes}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
|
||||
<div class="d-flex flex-row gap-2 ">
|
||||
<label for="total-price" class="col-form-label text-nowrap">Total Price:</label>
|
||||
<input type="text" name="total-price" id="" class="col-1 form-control-plaintext" readonly
|
||||
value="{{'$'.$order->totalServicePrice()}}">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
@ -1,118 +0,0 @@
|
||||
<div class="modal modal-lg fade" id="createContactModal" tabindex="-1" aria-labelledby="createContactModalLabel"
|
||||
aria-hidden="true">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h1 class="modal-title fs-5" id="createContactModalLabel">Create Contact</h1>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||
</div>
|
||||
<form action="{{route('contacts.store')}}" method="post">
|
||||
<div class="modal-body">
|
||||
@csrf
|
||||
|
||||
<div class="row mb-3">
|
||||
<label for="customer_id" class="col-md-4 col-form-label text-md-end">Customer</label>
|
||||
|
||||
<div class="col-md-6">
|
||||
<input type="hidden" name="customer_id" value="{{$customer->id}}">
|
||||
<select name="customer_id" id="customer_id" class="form-select" disabled>
|
||||
<option value="{{ $customer->id }}">
|
||||
{{ $customer->company_name }}
|
||||
</option>
|
||||
</select>
|
||||
@error('customer_id')
|
||||
<span class="invalid-feedback" role="alert">
|
||||
<strong>{{ $message }}</strong>
|
||||
</span>
|
||||
@enderror
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row mb-3">
|
||||
<label for="first_name" class="col-md-4 col-form-label text-md-end">First name</label>
|
||||
|
||||
<div class="col-md-6">
|
||||
<input id="first_name" type="text"
|
||||
class="form-control @error('first_name') is-invalid @enderror"
|
||||
name="first_name" value="{{ old('first_name') }}"
|
||||
autocomplete="first_name" autofocus>
|
||||
|
||||
@error('first_name')
|
||||
<span class="invalid-feedback" role="alert">
|
||||
<strong>{{ $message }}</strong>
|
||||
</span>
|
||||
@enderror
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row mb-3">
|
||||
<label for="last_name" class="col-md-4 col-form-label text-md-end">Last name</label>
|
||||
|
||||
<div class="col-md-6">
|
||||
<input id="last_name" type="text"
|
||||
class="form-control @error('last_name') is-invalid @enderror"
|
||||
name="last_name" value="{{ old('last_name') }}"
|
||||
autocomplete="last_name">
|
||||
|
||||
@error('last_name')
|
||||
<span class="invalid-feedback" role="alert">
|
||||
<strong>{{ $message }}</strong>
|
||||
</span>
|
||||
@enderror
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row mb-3">
|
||||
<label for="email" class="col-md-4 col-form-label text-md-end">Email</label>
|
||||
|
||||
<div class="col-md-6">
|
||||
<input id="email" type="text"
|
||||
class="form-control @error('email') is-invalid @enderror" name="email"
|
||||
value="{{ old('email') }}" autocomplete="email">
|
||||
|
||||
@error('email')
|
||||
<span class="invalid-feedback" role="alert">
|
||||
<strong>{{ $message }}</strong>
|
||||
</span>
|
||||
@enderror
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row mb-3">
|
||||
<label for="phone" class="col-md-4 col-form-label text-md-end">Phone number</label>
|
||||
|
||||
<div class="col-md-6">
|
||||
<input id="phone" type="text"
|
||||
class="form-control @error('phone') is-invalid @enderror" name="phone"
|
||||
value="{{ old('phone') }}" autocomplete="phone">
|
||||
|
||||
@error('phone')
|
||||
<span class="invalid-feedback" role="alert">
|
||||
<strong>{{ $message }}</strong>
|
||||
</span>
|
||||
@enderror
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row mb-3">
|
||||
<label for="notes" class="col-md-4 col-form-label text-md-end">Notes</label>
|
||||
|
||||
<div class="col-md-6">
|
||||
<textarea name="notes" id="notes" cols="30" rows="3" class="form-control"
|
||||
autocomplete="notes">{{ old('notes') }}</textarea>
|
||||
@error('notes')
|
||||
<span class="invalid-feedback" role="alert">
|
||||
<strong>{{ $message }}</strong>
|
||||
</span>
|
||||
@enderror
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-outline-secondary" data-bs-dismiss="modal">Cancel</button>
|
||||
<button type="submit" class="btn btn-primary">Create contact</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
@ -1,31 +0,0 @@
|
||||
<div class="modal modal fade" id="deleteContactModal" tabindex="-1" aria-labelledby="deleteContactModalLabel"
|
||||
aria-hidden="true">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h1 class="modal-title fs-5" id="deleteContactModalLabel">Delete Contact</h1>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||
</div>
|
||||
<form action="{{route('contacts.requestDestroy')}}" method="post">
|
||||
@csrf
|
||||
<div class="modal-body">
|
||||
@if(sizeof($contacts) !== 0)
|
||||
<select name="contact" id="contact" class="form-select">
|
||||
@foreach($contacts as $contact)
|
||||
<option value="{{ $contact->id }}"> {{ $contact->first_name . ' ' . $contact->last_name }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
@else
|
||||
There are no contacts to delete.
|
||||
@endif
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-outline-secondary" data-bs-dismiss="modal">Cancel</button>
|
||||
@if (sizeof($contacts) !== 0)
|
||||
<button type="submit" class="btn btn-danger">Delete contact</button>
|
||||
@endif
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
@ -1,23 +0,0 @@
|
||||
<div class="modal modal fade" id="deleteCustomerModal" tabindex="-1" aria-labelledby="deleteCustomerModalLabel"
|
||||
aria-hidden="true">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h1 class="modal-title fs-5" id="deleteCustomerModalLabel">Delete Customer</h1>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||
</div>
|
||||
<form action="{{route('customers.destroy', $customer->id)}}" method="post">
|
||||
@csrf
|
||||
@method('DELETE')
|
||||
|
||||
<div class="modal-body">
|
||||
Are you sure you want to delete {{$customer->company_name}}?
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-outline-secondary" data-bs-dismiss="modal">Cancel</button>
|
||||
<button type="submit" class="btn btn-danger">Delete customer</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
@ -1,111 +0,0 @@
|
||||
<div class="modal modal-lg fade" id="createCustomerModal" tabindex="-1" aria-labelledby="createCustomerModalLabel"
|
||||
aria-hidden="true">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h1 class="modal-title fs-5" id="createCustomerModalLabel">Create Customer</h1>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||
</div>
|
||||
|
||||
<form action="{{route('customers.store')}}" method="post">
|
||||
<div class="modal-body">
|
||||
@csrf
|
||||
|
||||
<div class="row mb-3">
|
||||
<label for="company_name" class="col-md-4 col-form-label text-md-end">Company Name</label>
|
||||
|
||||
<div class="col-md-6">
|
||||
<input id="company_name" type="text"
|
||||
class="form-control @error('company_name') is-invalid @enderror"
|
||||
name="company_name" value="{{ old('company_name') }}" required
|
||||
autocomplete="company_name"
|
||||
autofocus>
|
||||
|
||||
@error('company_name')
|
||||
<span class="invalid-feedback" role="alert">
|
||||
<strong>{{ $message }}</strong>
|
||||
</span>
|
||||
@enderror
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row mb-3">
|
||||
<label for="internal_name" class="col-md-4 col-form-label text-md-end">Internal Name</label>
|
||||
|
||||
<div class="col-md-6">
|
||||
<input id="internal_name" type="text"
|
||||
class="form-control @error('internal_name') is-invalid @enderror"
|
||||
name="internal_name" value="{{ old('internal_name') }}" required
|
||||
autocomplete="internal_name"
|
||||
>
|
||||
|
||||
@error('internal_name')
|
||||
<span class="invalid-feedback" role="alert">
|
||||
<strong>{{ $message }}</strong>
|
||||
</span>
|
||||
@enderror
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row mb-3">
|
||||
<label for="shipping_address" class="col-md-4 col-form-label text-md-end">Shipping
|
||||
Address</label>
|
||||
|
||||
<div class="col-md-6">
|
||||
<input id="shipping_address" type="text"
|
||||
class="form-control @error('shipping_address') is-invalid @enderror"
|
||||
name="shipping_address"
|
||||
value="{{ old('shipping_address') }}" required autocomplete="shipping_address"
|
||||
>
|
||||
|
||||
@error('shipping_address')
|
||||
<span class="invalid-feedback" role="alert">
|
||||
<strong>{{ $message }}</strong>
|
||||
</span>
|
||||
@enderror
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row mb-3">
|
||||
<label for="billing_address" class="col-md-4 col-form-label text-md-end">Billing Address</label>
|
||||
|
||||
<div class="col-md-6">
|
||||
<input id="billing_address" type="text"
|
||||
class="form-control @error('billing_address') is-invalid @enderror"
|
||||
name="billing_address" value="{{ old('billing_address') }}" required
|
||||
autocomplete="billing_address"
|
||||
>
|
||||
|
||||
@error('billing_address')
|
||||
<span class="invalid-feedback" role="alert">
|
||||
<strong>{{ $message }}</strong>
|
||||
</span>
|
||||
@enderror
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row mb-3">
|
||||
<label for="phone" class="col-md-4 col-form-label text-md-end">Phone number</label>
|
||||
|
||||
<div class="col-md-6">
|
||||
<input id="phone" type="text" class="form-control @error('phone') is-invalid @enderror"
|
||||
name="phone"
|
||||
value="{{ old('phone') }}" required autocomplete="phone" >
|
||||
|
||||
@error('phone')
|
||||
<span class="invalid-feedback" role="alert">
|
||||
<strong>{{ $message }}</strong>
|
||||
</span>
|
||||
@enderror
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-outline-secondary" data-bs-dismiss="modal">Cancel</button>
|
||||
<button type="submit" class="btn btn-primary">Create customer</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
@ -1,31 +0,0 @@
|
||||
<div class="modal modal fade" id="deleteCustomerModal" tabindex="-1" aria-labelledby="deleteCustomerModalLabel"
|
||||
aria-hidden="true">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h1 class="modal-title fs-5" id="deleteCustomerModalLabel">Delete Customer</h1>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||
</div>
|
||||
<form action="{{route('customers.requestDestroy')}}" method="post">
|
||||
@csrf
|
||||
<div class="modal-body">
|
||||
@if(sizeof($customers) !== 0)
|
||||
<select name="id" id="id" class="form-select">
|
||||
@foreach($customers as $customer)
|
||||
<option value="{{ $customer->id }}"> {{ $customer->company_name}}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
@else
|
||||
There are no customers to delete.
|
||||
@endif
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-outline-secondary" data-bs-dismiss="modal">Cancel</button>
|
||||
@if (sizeof($customers) !== 0)
|
||||
<button type="submit" class="btn btn-danger">Delete customer</button>
|
||||
@endif
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
@ -1,52 +0,0 @@
|
||||
<div class="tab-pane {{$tab == 'contacts' ? 'active' : ''}}" id="contacts" role="tabpanel"
|
||||
aria-labelledby="contacts-tab">
|
||||
<div class="row justify-content-center mb-3">
|
||||
<div class="col-9">
|
||||
<div class="d-flex flex-row-reverse gap-2">
|
||||
{{-- <button class="btn btn-sm btn-danger" title="Remove a contact..."--}}
|
||||
{{-- data-bs-toggle="modal" data-bs-target="#deleteContactModal">--}}
|
||||
{{-- <x-bi-trash-fill/>--}}
|
||||
{{-- Delete contact--}}
|
||||
{{-- </button>--}}
|
||||
|
||||
<div class="mx-auto"></div>
|
||||
|
||||
<button class="btn btn-sm btn-primary" title="Create new contact..."
|
||||
data-bs-toggle="modal" data-bs-target="#createContactModal">
|
||||
<x-bi-person-plus-fill/>
|
||||
New contact
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@if(sizeof($contacts) !== 0)
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-9">
|
||||
<table class="table table-hover table-striped">
|
||||
<thead>
|
||||
<tr class="border-bottom border-black">
|
||||
<th scope="col">Name</th>
|
||||
<th scope="col">Email</th>
|
||||
<th scope="col">Phone</th>
|
||||
<th scope="col">Notes</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
@foreach ($contacts as $contact)
|
||||
<tr>
|
||||
<td class="text-nowrap">{{ $contact->first_name . ' ' . $contact->last_name }}</td>
|
||||
<td class="text-nowrap"><a href="mailto:{{$contact->email}}">{{ $contact->email }}</a></td>
|
||||
<td class="text-nowrap">{{ $contact->phone }}</td>
|
||||
<td class="w-100">{{ $contact->notes }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
@else()
|
||||
No contacts registered for this customer.
|
||||
@endif()
|
||||
</div>
|
@ -1,6 +0,0 @@
|
||||
<div class="tab-pane {{$tab == 'details' ? 'active' : ''}}" id="details" role="tabpanel"
|
||||
aria-labelledby="details-tab">
|
||||
|
||||
<livewire:orders-table :show-customer-column="false" order-type="active" title="Active orders"
|
||||
:customer_id="$customer->id"/>
|
||||
</div>
|
@ -1,66 +0,0 @@
|
||||
<div class="tab-pane {{$tab == 'packing' ? 'active' : ''}}" id="packing" role="tabpanel"
|
||||
aria-labelledby="packing-tab">
|
||||
<div class="row justify-content-center mb-3">
|
||||
<div class="col-9">
|
||||
<div class="d-flex flex-row gap-2">
|
||||
{{-- <button class="btn btn-sm btn-danger" title="Remove a contact..."--}}
|
||||
{{-- data-bs-toggle="modal" data-bs-target="#deleteContactModal">--}}
|
||||
{{-- <x-bi-trash-fill/>--}}
|
||||
{{-- Delete entry--}}
|
||||
{{-- </button>--}}
|
||||
|
||||
<button class="btn btn-sm btn-primary" title="Create new packing slip..."
|
||||
data-bs-toggle="modal" data-bs-target="#createPackingSlipModal">
|
||||
<x-bi-plus-circle-fill/>
|
||||
Create entry
|
||||
</button>
|
||||
|
||||
<div class="mx-auto"></div>
|
||||
|
||||
{{-- <div class="vr"></div>--}}
|
||||
|
||||
<div class="d-inline-flex gap-2">
|
||||
<input type="text" class="form-control form-control-sm" placeholder="Search..."
|
||||
name="" id="searchText">
|
||||
<button class="btn btn-sm btn-outline-primary" id="searchButton">
|
||||
<x-bi-search/>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row justify-content-center mb-3">
|
||||
<div class="col-7">
|
||||
<table class="table table-striped table-sm table-hover">
|
||||
<thead>
|
||||
<tr class="border-bottom border-black">
|
||||
<th scope="col">Date</th>
|
||||
<th scope="col">PO</th>
|
||||
<th scope="col">Amount</th>
|
||||
<th scope="col">Contents</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($packingSlips as $packingSlip)
|
||||
<tr>
|
||||
<td class="text-nowrap">{{$packingSlip->date_received}}</td>
|
||||
<td class="text-nowrap"><a href="">{{$packingSlip->order_id}}</a></td>
|
||||
<td class="text-nowrap">{{$packingSlip->amount}}</td>
|
||||
<td class="w-50">{{$packingSlip->contents}}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col"></div>
|
||||
<div class="col-4">
|
||||
{{$packingSlips->links()}}
|
||||
</div>
|
||||
<div class="col"></div>
|
||||
</div>
|
||||
|
||||
</div>
|
@ -1,99 +0,0 @@
|
||||
<div class="tab-pane {{$tab == 'shipping' ? 'active' : ''}}" id="shipping" role="tabpanel"
|
||||
aria-labelledby="shipping-tab">
|
||||
<div class="row justify-content-center mb-3">
|
||||
<div class="col-9">
|
||||
<div class="d-flex flex-row gap-2">
|
||||
<button class="btn btn-sm btn-primary" title="Create new shipping entry..."
|
||||
data-bs-toggle="modal" data-bs-target="#createShippingEntryModal">
|
||||
<x-bi-plus-circle-fill/>
|
||||
Create entry
|
||||
</button>
|
||||
|
||||
<div class="mx-auto"></div>
|
||||
|
||||
<div class="d-inline-flex gap-2">
|
||||
<input type="text" class="form-control form-control-sm" placeholder="Search..."
|
||||
name="" id="searchText">
|
||||
<button class="btn btn-sm btn-outline-primary" id="searchButton">
|
||||
<x-bi-search/>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row justify-content-center mb-3">
|
||||
@foreach($shippingEntries as $shippingEntry)
|
||||
<div class="col-4">
|
||||
<div class="card mb-3">
|
||||
<div class="card-header">
|
||||
{{$shippingEntry->account_title}}
|
||||
</div>
|
||||
<div class="card-body">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-4 text-md-end text-secondary">Shipping Type</div>
|
||||
<div class="col-md-6">
|
||||
<div class="">{{$shippingEntry->shipping_type}}</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr class="border-secondary-subtle mx-4 px-0">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-4 text-md-end text-secondary">Courier</div>
|
||||
<div class="col-md-6">
|
||||
<div class="fw-bold">{{$shippingEntry->courier}}</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-4 text-md-end text-secondary">Contact</div>
|
||||
<div class="col-md-6">
|
||||
<div class="text-nowrap">
|
||||
<a href="">{{$shippingEntry->contact}}</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-4 text-md-end text-secondary">Login</div>
|
||||
<div class="col-md-6">
|
||||
<div class="fw-bold">
|
||||
{{$shippingEntry->account_username}} <br>
|
||||
<code>{{$shippingEntry->account_password}}</code>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr class="border-secondary-subtle mx-4 px-0">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-4 text-md-end text-secondary text-nowrap">Required Info
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="">{{$shippingEntry->info_needed}}</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-4 text-md-end text-secondary">Notify</div>
|
||||
<div class="col-md-6">
|
||||
<div class="text-nowrap"><a
|
||||
href="mailto:">{{$shippingEntry->notify}}</a></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-4 text-md-end text-secondary">Notes</div>
|
||||
<div class="col-md-6">
|
||||
<div class="">{{$shippingEntry->notes}}</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
</div>
|
@ -1,75 +0,0 @@
|
||||
<div class="tab-pane {{$tab == 'customers' ? 'active' : ''}}" id="customers" role="tabpanel"
|
||||
aria-labelledby="customers-tab">
|
||||
<div class="row justify-content-center mb-3">
|
||||
<div class="col">
|
||||
<div class="d-flex flex-row gap-2">
|
||||
<button class="btn btn-primary" title="Create new customer..."
|
||||
data-bs-toggle="modal"
|
||||
data-bs-target="#createCustomerModal">
|
||||
<x-bi-person-plus-fill/>
|
||||
Create entry
|
||||
</button>
|
||||
|
||||
<div class="vr"></div>
|
||||
|
||||
<div class="d-inline-flex gap-2">
|
||||
<input type="text" class="form-control" placeholder="Search..."
|
||||
name="" id="">
|
||||
<button class="btn btn-outline-primary">
|
||||
<x-bi-search/>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div class="mx-auto"></div>
|
||||
|
||||
<button class="btn btn-danger" title="Delete customer..."
|
||||
data-bs-toggle="modal"
|
||||
data-bs-target="#deleteCustomerModal">
|
||||
<x-bi-trash-fill/>
|
||||
Delete entry
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row mb-3">
|
||||
<div class="col">
|
||||
@if(sizeof($customers) !== 0)
|
||||
<table class="table table-sm table-striped table-hover">
|
||||
<thead>
|
||||
<tr class="border-bottom border-black">
|
||||
<th scope="col">Company Name</th>
|
||||
<th scope="col">Internal Name</th>
|
||||
<th scope="col">Shipping Address</th>
|
||||
<th scope="col">Billing Address</th>
|
||||
<th scope="col">Phone</th>
|
||||
<th scope="col">View</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
|
||||
@foreach($customers as $customer)
|
||||
<tr>
|
||||
<td> {{$customer->company_name}} </td>
|
||||
<td><code>{{$customer->internal_name}}</code></td>
|
||||
<td> {{$customer->shipping_address}} </td>
|
||||
<td> {{$customer->billing_address}} </td>
|
||||
<td class="text-nowrap"> {{$customer->phone}} </td>
|
||||
<td class="align-top">
|
||||
<a class="" href="{{route('customers.show', [$customer->id, 'tab'=>'details'])}}">
|
||||
<x-bi-arrow-right/>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
@else()
|
||||
No customer data.
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
@ -1,43 +0,0 @@
|
||||
<div class="container-fluid bg-light pt-3">
|
||||
|
||||
<!-- Customer company name row -->
|
||||
<div class="row justify-content-center pb-2">
|
||||
<div class="col-3"></div>
|
||||
<div class="col">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Tabs row -->
|
||||
<div class="row justify-content-center mb-3">
|
||||
<div class="col-3 border-bottom"></div>
|
||||
<div class="col-6 p-0">
|
||||
<ul class="nav nav-fill nav-tabs" id="management-tabs" role="tablist">
|
||||
<li class="nav-item" role="presentation">
|
||||
<a class="nav-link link-dark {{$tab == 'customers' ? 'active' : ''}}" id="customers-tab"
|
||||
href="{{route('management.index', 'customers')}}" type="button" role="tab"
|
||||
aria-controls="customers" aria-selected="{{$tab == 'customers' ? 'true' : 'false'}}">
|
||||
<x-bi-list-ul/>
|
||||
Customers
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item" role="presentation">
|
||||
<a class="nav-link link-dark {{$tab == 'packing' ? 'active' : ''}}" id="packing-tab"
|
||||
href="{{route('management.index', 'packing')}}" type="button" role="tab"
|
||||
aria-controls="packing" aria-selected="{{$tab == 'packing' ? 'true' : 'false'}}">
|
||||
<x-bi-card-text/>
|
||||
Packing Slips
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item" role="presentation">
|
||||
<a class="nav-link link-dark {{$tab == 'files' ? 'active' : ''}}" id="files-tab"
|
||||
href="{{route('management.index', 'files')}}" type="button" role="tab"
|
||||
aria-controls="files" aria-selected="{{$tab == 'files' ? 'true' : 'false'}}">
|
||||
<x-bi-file-earmark/>
|
||||
Service Files
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="col border-bottom"></div>
|
||||
</div>
|
||||
</div>
|
@ -1,5 +0,0 @@
|
||||
<div class="tab-pane {{$tab == 'packing' ? 'active' : ''}}" id="packing" role="tabpanel"
|
||||
aria-labelledby="packing-tab">
|
||||
|
||||
packing slips
|
||||
</div>
|
@ -1,31 +0,0 @@
|
||||
<div class="tab-pane {{$tab == 'files' ? 'active' : ''}}" id="files" role="tabpanel"
|
||||
aria-labelledby="files-tab">
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-8">
|
||||
<table class="table table-sm table-striped table-hover">
|
||||
<thead>
|
||||
<th>Code</th>
|
||||
<th>Name</th>
|
||||
<th>Width</th>
|
||||
<th>Height</th>
|
||||
<th>Setup Number</th>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($serviceFiles as $file)
|
||||
<tr>
|
||||
<td>{{$file->code}}</td>
|
||||
<td>{{$file->name}}</td>
|
||||
<td>{{$file->width}}</td>
|
||||
<td>{{$file->height}}</td>
|
||||
<td>{{$file->setup_number}}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
{{$serviceFiles->links()}}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
@ -1,114 +0,0 @@
|
||||
<div class="modal modal-lg fade" id="createPackingSlipModal" tabindex="-1" aria-labelledby="createPackingSlipModalLabel"
|
||||
aria-hidden="true">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h1 class="modal-title fs-5" id="createPackingSlipModalLabel">Create Packing Slip</h1>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||
</div>
|
||||
|
||||
<form action="{{route('packing-slips.store')}}" method="post">
|
||||
@csrf
|
||||
|
||||
<div class="modal-body">
|
||||
<div class="row mb-3">
|
||||
<label for="date_received" class="col-md-4 col-form-label text-md-end">Date received</label>
|
||||
|
||||
<div class="col-md-6">
|
||||
<input id="date_received" type="date"
|
||||
class="form-control @error('date_received') is-invalid @enderror"
|
||||
name="date_received" value="{{ old('date_received') ?? $today }}" required
|
||||
autocomplete="date_received" max="{{$today}}"
|
||||
autofocus>
|
||||
|
||||
@error('date_received')
|
||||
<span class="invalid-feedback" role="alert">
|
||||
<strong>{{ $message }}</strong>
|
||||
</span>
|
||||
@enderror
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row mb-3">
|
||||
<label for="customer_id" class="col-md-4 col-form-label text-md-end">Customer</label>
|
||||
|
||||
<div class="col-md-6">
|
||||
<input type="hidden" name="from_customer" value="0">
|
||||
|
||||
@if(isset($customer))
|
||||
<input type="hidden" name="customer_id" value="{{$customer->id}}">
|
||||
<input type="hidden" name="from_customer" value="1">
|
||||
|
||||
<select name="customer_id" id="customer_id" class="form-select" disabled>
|
||||
<option value="{{ $customer->id }}">
|
||||
{{ $customer->company_name }}
|
||||
</option>
|
||||
</select>
|
||||
@endif
|
||||
@error('customer_id')
|
||||
<span class="invalid-feedback" role="alert">
|
||||
<strong>{{ $message }}</strong>
|
||||
</span>
|
||||
@enderror
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row mb-3">
|
||||
<label for="order_id" class="col-md-4 col-form-label text-md-end">Product Order</label>
|
||||
|
||||
<div class="col-md-6">
|
||||
<input id="order_id" type="text"
|
||||
class="form-control @error('order_id') is-invalid @enderror"
|
||||
name="order_id" value="{{ old('order_id') }}"
|
||||
autocomplete="order_id">
|
||||
|
||||
@error('order_id')
|
||||
<span class="invalid-feedback" role="alert">
|
||||
<strong>{{ $message }}</strong>
|
||||
</span>
|
||||
@enderror
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row mb-3">
|
||||
<label for="amount"
|
||||
class="col-md-4 col-form-label text-md-end">Amount</label>
|
||||
|
||||
<div class="col-md-6">
|
||||
<input id="amount" type="text"
|
||||
class="form-control @error('amount') is-invalid @enderror"
|
||||
name="amount" placeholder="For example: 2 boxes"
|
||||
value="{{ old('amount') }}" required autocomplete="amount">
|
||||
|
||||
@error('amount')
|
||||
<span class="invalid-feedback" role="alert">
|
||||
<strong>{{ $message }}</strong>
|
||||
</span>
|
||||
@enderror
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row mb-3">
|
||||
<label for="contents" class="col-md-4 col-form-label text-md-end">Contents</label>
|
||||
|
||||
<div class="col-md-6">
|
||||
<textarea name="contents" id="contents" cols="30" rows="3" class="form-control"
|
||||
autocomplete="contents" placeholder="For example: 30 shirts, 25 jackets"
|
||||
required>{{ old('contents') }}</textarea>
|
||||
@error('contents')
|
||||
<span class="invalid-feedback" role="alert">
|
||||
<strong>{{ $message }}</strong>
|
||||
</span>
|
||||
@enderror
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-outline-secondary" data-bs-dismiss="modal">Cancel</button>
|
||||
<button type="submit" class="btn btn-primary">Create</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
@ -1,128 +0,0 @@
|
||||
<div class="modal modal-lg fade" id="createShippingEntryModal" tabindex="-1"
|
||||
aria-labelledby="createShippingEntryModalLabel"
|
||||
aria-hidden="true">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h1 class="modal-title fs-5" id="createShippingEntryModalLabel">Create Shipping Entry</h1>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"
|
||||
tabindex="-1"></button>
|
||||
</div>
|
||||
|
||||
<form action="{{route('shipping-entries.store')}}" method="post">
|
||||
@csrf
|
||||
|
||||
<div class="modal-body">
|
||||
|
||||
@if (isset($customer))
|
||||
<input type="hidden" name="customer_id" value="{{$customer->id}}">
|
||||
@endif
|
||||
|
||||
<div class="row mb-3">
|
||||
<label for="shipping_type" class="col-md-4 col-form-label text-md-end">Ship Type</label>
|
||||
<div class="col-md-6">
|
||||
<select name="shipping_type" class="form-select" id="shipping_type" autofocus>
|
||||
<option value="pickup">Pick-up</option>
|
||||
<option value="they-ship">They ship</option>
|
||||
<option value="we-ship">We ship</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row mb-3">
|
||||
<label for="account_title" class="col-md-4 col-form-label text-md-end">Entry Title</label>
|
||||
|
||||
<div class="col-md-6">
|
||||
<input id="account_title" type="text"
|
||||
class="form-control @error('account_title') is-invalid @enderror"
|
||||
name="account_title" value="{{ old('account_name') }}"
|
||||
autocomplete="account_title">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr class="border-secondary-subtle mx-4 px-0">
|
||||
|
||||
<div class="row mb-3">
|
||||
<label for="courier" class="col-md-4 col-form-label text-md-end">Courier</label>
|
||||
|
||||
<div class="col-md-6">
|
||||
<input id="courier" type="text"
|
||||
class="form-control @error('courier') is-invalid @enderror"
|
||||
name="courier" value="{{ old('courier') }}"
|
||||
autocomplete="courier">
|
||||
|
||||
{{-- @error('order_id')--}}
|
||||
{{-- <span class="invalid-feedback" role="alert">--}}
|
||||
{{-- <strong>{{ $message }}</strong>--}}
|
||||
{{-- </span>--}}
|
||||
{{-- @enderror--}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row mb-3">
|
||||
<label for="contact" class="col-md-4 col-form-label text-md-end">Contact</label>
|
||||
|
||||
<div class="col-md-6">
|
||||
<input id="contact" type="text"
|
||||
class="form-control @error('contact') is-invalid @enderror"
|
||||
name="contact" value="{{ old('contact') }}"
|
||||
autocomplete="contact" placeholder="Website link or phone number">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr class="border-secondary-subtle mx-4 px-0">
|
||||
|
||||
<div class="row mb-3">
|
||||
<label for="account_username" class="col-md-4 col-form-label text-md-end">Username</label>
|
||||
|
||||
<div class="col-md-6">
|
||||
<input id="account_username" type="text"
|
||||
class="form-control @error('account_username') is-invalid @enderror"
|
||||
name="account_username" value="{{ old('account_username') }}"
|
||||
autocomplete="account_username">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row mb-3">
|
||||
<label for="account_password" class="col-md-4 col-form-label text-md-end">Password</label>
|
||||
|
||||
<div class="col-md-6">
|
||||
<input id="account_password" type="text"
|
||||
class="form-control @error('account_password') is-invalid @enderror"
|
||||
name="account_password" value="{{ old('password') }}"
|
||||
autocomplete="account_password">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr class="border-secondary-subtle mx-4 px-0">
|
||||
|
||||
<div class="row mb-3">
|
||||
<label for="info_needed" class="col-md-4 col-form-label text-md-end">Required Info</label>
|
||||
|
||||
<div class="col-md-6">
|
||||
<textarea name="info_needed" id="info_needed" cols="30" rows="2"
|
||||
class="form-control"
|
||||
autocomplete="info_needed">{{ old('info_needed') }}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row mb-3">
|
||||
<label for="notes" class="col-md-4 col-form-label text-md-end">Notes</label>
|
||||
|
||||
<div class="col-md-6">
|
||||
<textarea name="notes" id="notes" cols="30" rows="3"
|
||||
class="form-control"
|
||||
autocomplete="notes">{{ old('notes') }}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-outline-secondary" data-bs-dismiss="modal">Cancel</button>
|
||||
<button type="submit" class="btn btn-primary">Create</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -37,7 +37,7 @@
|
||||
{{
|
||||
$attributes
|
||||
->merge($getExtraAttributes(), escape: false)
|
||||
->class(['bg-white border border-gray-150 rounded-xl relative dark:bg-gray-900 dark:border-gray-700'])
|
||||
->class(['bg-white border border-gray-150 rounded-xl relative dark:bg-gray-900 dark:border-gray-800'])
|
||||
}}
|
||||
>
|
||||
|
||||
@ -74,14 +74,14 @@
|
||||
@endif
|
||||
</div>
|
||||
|
||||
<div class="px-4{{ $isAddable? '' : ' py-2' }}">
|
||||
<div class="px-4{{ $isAddable? '' : ' py-2' }} pb-4">
|
||||
<table class="it-table-repeater w-full text-left rtl:text-right table-auto mx-4" x-show="! isCollapsed">
|
||||
<thead>
|
||||
<tr>
|
||||
|
||||
@foreach($columnLabels as $columnLabel)
|
||||
@if($columnLabel['display'])
|
||||
<th class="it-table-repeater-cell-label p-2"
|
||||
<th class="it-table-repeater-cell-label p-2" style="font-weight: 500; font-size: 0.875rem;"
|
||||
@if($colStyles && isset($colStyles[$columnLabel['component']]))
|
||||
style="{{ $colStyles[$columnLabel['component']] }}"
|
||||
@endif
|
||||
|
@ -2,6 +2,7 @@
|
||||
export default {
|
||||
content: [
|
||||
"./resources/**/*.blade.php",
|
||||
"./resources/**/*",
|
||||
"./app/Filament/**/*.php",
|
||||
"./vendor/filament/**/*.php"
|
||||
],
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
use App\Filament\Admin\Resources\QuoteResource\Pages\ListQuotes;
|
||||
use App\Filament\Admin\Resources\CustomerReportResource\Pages\ListCustomerReports;
|
||||
use App\Models\User;
|
||||
use Illuminate\Foundation\Testing\RefreshDatabase;
|
||||
|
||||
@ -8,12 +8,13 @@
|
||||
|
||||
uses(RefreshDatabase::class);
|
||||
|
||||
it('can render the list page', function () {
|
||||
it('can render Customer Report pages', function () {
|
||||
$this->actingAs(User::factory(['is_admin' => true])->create());
|
||||
livewire(ListQuotes::class)->assertSuccessful();
|
||||
|
||||
livewire(ListCustomerReports::class)->assertSuccessful();
|
||||
});
|
||||
|
||||
it('cannot render the list page if user isn\'t an admin', function () {
|
||||
$this->actingAs(User::factory()->create());
|
||||
livewire(ListQuotes::class)->assertForbidden();
|
||||
livewire(ListCustomerReports::class)->assertForbidden();
|
||||
});
|
||||
|
@ -1,5 +1,6 @@
|
||||
<?php
|
||||
|
||||
use App\Filament\Admin\Resources\CustomerResource\Pages\EditCustomer;
|
||||
use App\Filament\Admin\Resources\CustomerResource\Pages\ListCustomers;
|
||||
use App\Models\User;
|
||||
use Illuminate\Foundation\Testing\RefreshDatabase;
|
||||
@ -8,7 +9,11 @@
|
||||
|
||||
uses(RefreshDatabase::class);
|
||||
|
||||
it('can render the list page', function () {
|
||||
it('can render the Customer pages', function () {
|
||||
$this->actingAs(User::factory()->create());
|
||||
livewire(ListCustomers::class)->assertSuccessful();
|
||||
// livewire(ListCustomers::class)
|
||||
// ->call('create')
|
||||
// ->assertSuccessful();
|
||||
// livewire(EditCustomer::class)->assertSuccessful();
|
||||
});
|
||||
|
@ -1,6 +1,8 @@
|
||||
<?php
|
||||
|
||||
use App\Filament\Admin\Resources\QuoteResource\Pages\CreateQuote;
|
||||
use App\Filament\Admin\Resources\QuoteResource\Pages\ListQuotes;
|
||||
use App\Models\Customer;
|
||||
use App\Models\User;
|
||||
use Illuminate\Foundation\Testing\RefreshDatabase;
|
||||
|
||||
@ -17,3 +19,117 @@
|
||||
$this->actingAs(User::factory()->create());
|
||||
livewire(ListQuotes::class)->assertForbidden();
|
||||
});
|
||||
|
||||
it('can create a quote using the form', function () {
|
||||
$this->actingAs(User::factory(['is_admin' => true])->create());
|
||||
|
||||
$customer = Customer::factory()->create();
|
||||
|
||||
$formData = [
|
||||
'customer_id' => $customer->id,
|
||||
'date' => today(),
|
||||
'notes' => 'Some note',
|
||||
];
|
||||
|
||||
$this->livewire(CreateQuote::class)
|
||||
->fillForm($formData)
|
||||
->call('create')
|
||||
->assertHasNoErrors();
|
||||
|
||||
$this->assertDatabaseHas('quotes', $formData);
|
||||
});
|
||||
|
||||
it('can add an embroidery entry to the quote using the form', function () {
|
||||
$this->actingAs(User::factory(['is_admin' => true])->create());
|
||||
|
||||
$customer = Customer::factory()->create();
|
||||
|
||||
$formData = [
|
||||
'customer_id' => $customer->id,
|
||||
'date' => today(),
|
||||
'notes' => 'Some note',
|
||||
|
||||
'embroideryEntries' => [
|
||||
[
|
||||
'logo' => 'logo name',
|
||||
'placement' => 'Right sleeve',
|
||||
'quantity' => 5,
|
||||
'width' => 1.5,
|
||||
'height' => 2.5,
|
||||
'stitch_count' => '3k - 4k',
|
||||
'digitizing_cost' => 10.5,
|
||||
'run_charge' => 12,
|
||||
],
|
||||
],
|
||||
];
|
||||
|
||||
$this->livewire(CreateQuote::class)
|
||||
->fillForm($formData)
|
||||
->call('create')
|
||||
->assertHasNoErrors();
|
||||
|
||||
$this->assertDatabaseHas('embroidery_entries', $formData['embroideryEntries'][0]);
|
||||
});
|
||||
|
||||
it('can add a screen printing entry to the quote using the form', function () {
|
||||
$this->actingAs(User::factory(['is_admin' => true])->create());
|
||||
|
||||
$customer = Customer::factory()->create();
|
||||
|
||||
$formData = [
|
||||
'customer_id' => $customer->id,
|
||||
'date' => today(),
|
||||
'notes' => 'Some note',
|
||||
|
||||
'screenPrintEntries' => [
|
||||
[
|
||||
'logo' => 'logo name',
|
||||
'quantity' => 5,
|
||||
'width' => 1.5,
|
||||
'height' => 2.5,
|
||||
'color_amount' => 2,
|
||||
'color_match' => 5.10,
|
||||
'flash' => 5.20,
|
||||
'fleece' => 5.30,
|
||||
'poly_ink' => 5.40,
|
||||
'other_charges' => 5.50,
|
||||
],
|
||||
],
|
||||
];
|
||||
|
||||
$this->livewire(CreateQuote::class)
|
||||
->fillForm($formData)
|
||||
->call('create')
|
||||
->assertHasNoErrors();
|
||||
|
||||
$this->assertDatabaseHas('screen_print_entries', $formData['screenPrintEntries'][0]);
|
||||
});
|
||||
|
||||
it('can add a heat transfer entry to the quote using the form', function () {
|
||||
$this->actingAs(User::factory(['is_admin' => true])->create());
|
||||
|
||||
$customer = Customer::factory()->create();
|
||||
|
||||
$formData = [
|
||||
'customer_id' => $customer->id,
|
||||
'date' => today(),
|
||||
'notes' => 'Some note',
|
||||
|
||||
'heatTransferEntries' => [
|
||||
[
|
||||
'logo' => 'logo name',
|
||||
'quantity' => 5,
|
||||
'width' => 1.5,
|
||||
'height' => 2.5,
|
||||
'price' => 2,
|
||||
],
|
||||
],
|
||||
];
|
||||
|
||||
$this->livewire(CreateQuote::class)
|
||||
->fillForm($formData)
|
||||
->call('create')
|
||||
->assertHasNoErrors();
|
||||
|
||||
$this->assertDatabaseHas('heat_transfer_entries', $formData['heatTransferEntries'][0]);
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user