basics test
parent
3ba11e5637
commit
dcdad94a61
@ -0,0 +1,43 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use App\Enums\OrderStatus;
|
||||
use App\Models\Order;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Carbon;
|
||||
|
||||
class DashboardController extends Controller
|
||||
{
|
||||
/**
|
||||
* Create a new controller instance.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
$this->middleware('auth');
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the application dashboard.
|
||||
*
|
||||
*/
|
||||
public function index(Request $request)
|
||||
{
|
||||
if (!$request->get('tab')) {
|
||||
return redirect()->route('dashboard', ['tab' => 'active_orders']);
|
||||
}
|
||||
|
||||
return view('dashboard', [
|
||||
'today' => Carbon::today(),
|
||||
'tab' => $request->get('tab'),
|
||||
'active_orders' => Order::where('status', '!=', 'cancelled')
|
||||
->where('status', '!=', 'completed')
|
||||
->orderByDesc('rush')
|
||||
->orderBy('due_date')
|
||||
->paginate(15)
|
||||
->withQueryString()
|
||||
]);
|
||||
}
|
||||
}
|
@ -1,28 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class HomeController extends Controller
|
||||
{
|
||||
/**
|
||||
* Create a new controller instance.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
$this->middleware('auth');
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the application dashboard.
|
||||
*
|
||||
* @return \Illuminate\Contracts\Support\Renderable
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
return view('home');
|
||||
}
|
||||
}
|
@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use App\Models\Customer;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class ManagementController extends Controller
|
||||
{
|
||||
protected string $defaultTab = 'customers';
|
||||
|
||||
public function index(string $tab = null)
|
||||
{
|
||||
if (!$tab)
|
||||
{
|
||||
return redirect()->route('management.index', ['tab' => $this->defaultTab]);
|
||||
}
|
||||
|
||||
return view('management.index', [
|
||||
'customers' => Customer::all(),
|
||||
'tab' => $tab,
|
||||
]);
|
||||
}
|
||||
}
|
@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class OrderProductController extends Controller
|
||||
{
|
||||
public function index()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public function create()
|
||||
{
|
||||
return view('order-products.create');
|
||||
}
|
||||
|
||||
public function store(Request $request)
|
||||
{
|
||||
}
|
||||
|
||||
public function show($id)
|
||||
{
|
||||
}
|
||||
|
||||
public function edit($id)
|
||||
{
|
||||
}
|
||||
|
||||
public function update(Request $request, $id)
|
||||
{
|
||||
}
|
||||
|
||||
public function destroy($id)
|
||||
{
|
||||
}
|
||||
}
|
@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class OrderProductRequest extends FormRequest
|
||||
{
|
||||
public function rules(): array
|
||||
{
|
||||
return [
|
||||
'order_id' => ['required', 'exists:orders'],
|
||||
'sku' => ['string', 'nullable'],
|
||||
'product_name' => ['required'],
|
||||
'color' => ['string', 'nullable'],
|
||||
];
|
||||
}
|
||||
|
||||
public function authorize(): bool
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class ProductServiceRequest extends FormRequest
|
||||
{
|
||||
public function rules(): array
|
||||
{
|
||||
return [
|
||||
'order_product_id' => ['required', 'exists:order_products'],
|
||||
'service_file_id' => ['nullable', 'exists:service_files'],
|
||||
'service_type' => ['required'],
|
||||
'placement' => ['required'],
|
||||
'setup_amount' => ['required'],
|
||||
'amount' => ['nullable'],
|
||||
'amount_price' => ['nullable'],
|
||||
];
|
||||
}
|
||||
|
||||
public function authorize(): bool
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class ProductSizeRequest extends FormRequest
|
||||
{
|
||||
public function rules(): array
|
||||
{
|
||||
return [
|
||||
'order_product_id' => ['required', 'exists:order_products'],
|
||||
'size' => ['required'],
|
||||
'amount' => ['required'],
|
||||
];
|
||||
}
|
||||
|
||||
public function authorize(): bool
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class ServiceFileRequest extends FormRequest
|
||||
{
|
||||
public function rules(): array
|
||||
{
|
||||
return [
|
||||
'code' => ['required'],
|
||||
'name' => ['required'],
|
||||
'width' => ['required', 'numeric'],
|
||||
'height' => ['required', 'numeric'],
|
||||
'unit' => ['required'],
|
||||
];
|
||||
}
|
||||
|
||||
public function authorize(): bool
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
namespace App\Livewire;
|
||||
|
||||
use Livewire\Component;
|
||||
|
||||
class Counter extends Component
|
||||
{
|
||||
public $count = 1;
|
||||
|
||||
public function increment()
|
||||
{
|
||||
$this->count++;
|
||||
}
|
||||
|
||||
public function decrement()
|
||||
{
|
||||
$this->count--;
|
||||
}
|
||||
|
||||
public function render()
|
||||
{
|
||||
return view('livewire.counter');
|
||||
}
|
||||
}
|
@ -0,0 +1,40 @@
|
||||
<?php
|
||||
|
||||
namespace App\Livewire;
|
||||
|
||||
use App\Enums\OrderStatus;
|
||||
use App\Enums\OrderType;
|
||||
use App\Models\Customer;
|
||||
use Illuminate\Database\Eloquent\Collection;
|
||||
use Illuminate\Support\Carbon;
|
||||
use Livewire\Component;
|
||||
|
||||
class CreateOrder extends Component
|
||||
{
|
||||
public Collection $customers;
|
||||
public string $selectedCustomer;
|
||||
public $contacts;
|
||||
|
||||
public function mount( Collection $customers)
|
||||
{
|
||||
$this->customers = $customers;
|
||||
$this->contacts = $customers->first()->contacts;
|
||||
}
|
||||
|
||||
public function getContacts()
|
||||
{
|
||||
$this->contacts = Customer::find($this->selectedCustomer)->contacts;
|
||||
}
|
||||
|
||||
public function render()
|
||||
{
|
||||
return view('livewire.create-order', [
|
||||
'contacts' => $this->contacts,
|
||||
'order_types' => OrderType::cases(),
|
||||
'order_status' => OrderStatus::cases(),
|
||||
'customers' => $this->customers,
|
||||
'today' => Carbon::today()->format('Y-m-d'),
|
||||
'due_default' => Carbon::today()->addDay(10)->format('Y-m-d')
|
||||
]);
|
||||
}
|
||||
}
|
@ -0,0 +1,41 @@
|
||||
<?php
|
||||
|
||||
namespace App\Livewire;
|
||||
|
||||
use App\Models\Customer;
|
||||
use Illuminate\Support\Collection;
|
||||
use Livewire\Component;
|
||||
|
||||
class CustomerAndContactSelect extends Component
|
||||
{
|
||||
public Collection $customers;
|
||||
public Collection $contacts;
|
||||
public string $selectedCustomer;
|
||||
|
||||
public function mount(Collection $customers)
|
||||
{
|
||||
$this->customers = $customers;
|
||||
|
||||
if (isset($this->selectedCustomer))
|
||||
{
|
||||
$this->contacts = Customer::find($this->selectedCustomer)->contacts;
|
||||
}
|
||||
else {
|
||||
$this->contacts = $customers->first()->contacts;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public function updateContactList()
|
||||
{
|
||||
$this->contacts = Customer::find($this->selectedCustomer)->contacts;
|
||||
}
|
||||
|
||||
public function render()
|
||||
{
|
||||
return view('livewire.customer-and-contact-select', [
|
||||
'customers' => $this->customers,
|
||||
'contacts' => $this->contacts,
|
||||
]);
|
||||
}
|
||||
}
|
@ -0,0 +1,55 @@
|
||||
<?php
|
||||
|
||||
namespace App\Livewire;
|
||||
|
||||
use App\Models\Customer;
|
||||
use App\Models\Order;
|
||||
use Illuminate\Database\Query\Builder;
|
||||
use Illuminate\Support\Carbon;
|
||||
use Livewire\Component;
|
||||
use Livewire\WithPagination;
|
||||
|
||||
class OrdersTable extends Component
|
||||
{
|
||||
use WithPagination;
|
||||
|
||||
protected $paginationTheme = 'bootstrap';
|
||||
|
||||
public bool $showCustomerColumn;
|
||||
public string $orderType = "active";
|
||||
public string $search = "";
|
||||
public string $title = "";
|
||||
public Carbon $today;
|
||||
|
||||
public function mount(bool $showCustomerColumn, string $orderType, string $title)
|
||||
{
|
||||
$this->today = Carbon::today();
|
||||
$this->showCustomerColumn = $showCustomerColumn;
|
||||
$this->orderType = $orderType;
|
||||
$this->title = $title;
|
||||
}
|
||||
|
||||
public function render()
|
||||
{
|
||||
return view('livewire.orders-table', [
|
||||
'orders' => Order::with('customer')
|
||||
->when($this->orderType === 'active', fn($q) => $q->active())
|
||||
->when($this->orderType === 'invoiced', fn($q) => $q->invoiced())
|
||||
->when($this->orderType === 'finished', fn($q) => $q->finished())
|
||||
->when($this->search !== '', function ($query) {
|
||||
$query->whereHas('customer', function ($query) {
|
||||
$query->where('company_name', 'like', '%' . $this->search . '%');
|
||||
})->orWhere('customer_po', 'like', '%' . $this->search . '%')
|
||||
->orWhere('internal_po', 'like', '%' . $this->search . '%')
|
||||
->orWhere('order_date', 'like', '%' . $this->search . '%')
|
||||
->orWhere('due_date', 'like', '%' . $this->search . '%')
|
||||
->orWhere('status', 'like', '%' . $this->search . '%');
|
||||
})
|
||||
->orderByDesc('rush')
|
||||
->orderBy('due_date')
|
||||
->paginate(15)
|
||||
->withQueryString(),
|
||||
'today' => $this->today,
|
||||
]);
|
||||
}
|
||||
}
|
@ -0,0 +1,42 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
use Illuminate\Database\Eloquent\Relations\HasMany;
|
||||
use Illuminate\Database\Eloquent\Relations\HasOne;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
|
||||
class OrderProduct extends Model
|
||||
{
|
||||
use SoftDeletes, HasFactory;
|
||||
|
||||
protected $fillable = [
|
||||
'order_id',
|
||||
'sku',
|
||||
'product_name',
|
||||
'color',
|
||||
];
|
||||
|
||||
public function order(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(Order::class);
|
||||
}
|
||||
|
||||
public function productService(): HasOne
|
||||
{
|
||||
return $this->hasOne(ProductService::class);
|
||||
}
|
||||
|
||||
public function serviceFile(): HasOne
|
||||
{
|
||||
return $this->hasOne(ServiceFile::class);
|
||||
}
|
||||
|
||||
public function productSize(): HasMany
|
||||
{
|
||||
return $this->hasMany(ProductSize::class);
|
||||
}
|
||||
}
|
@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
use Illuminate\Database\Eloquent\Relations\HasOne;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
|
||||
class ProductService extends Model
|
||||
{
|
||||
use SoftDeletes, HasFactory;
|
||||
|
||||
protected $fillable = [
|
||||
'order_product_id',
|
||||
'service_type',
|
||||
'placement',
|
||||
'setup_amount',
|
||||
'amount',
|
||||
'amount_price',
|
||||
];
|
||||
|
||||
public function orderProduct(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(OrderProduct::class);
|
||||
}
|
||||
|
||||
public function serviceFile(): HasOne
|
||||
{
|
||||
return $this->hasOne(ServiceFile::class);
|
||||
}
|
||||
}
|
@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
|
||||
class ProductSize extends Model
|
||||
{
|
||||
use SoftDeletes, HasFactory;
|
||||
|
||||
protected $fillable = [
|
||||
'order_product_id',
|
||||
'size',
|
||||
'amount',
|
||||
];
|
||||
|
||||
public function orderProduct(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(OrderProduct::class);
|
||||
}
|
||||
}
|
@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
|
||||
class ServiceFile extends Model
|
||||
{
|
||||
use SoftDeletes, HasFactory;
|
||||
|
||||
protected $fillable = [
|
||||
'code',
|
||||
'product_service_id',
|
||||
'name',
|
||||
'width',
|
||||
'height',
|
||||
'unit',
|
||||
'setup_number'
|
||||
];
|
||||
|
||||
public function productService(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(ProductService::class);
|
||||
}
|
||||
}
|
@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Factories;
|
||||
|
||||
use App\Models\Order;
|
||||
use App\Models\OrderProduct;
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
use Illuminate\Support\Carbon;
|
||||
|
||||
class OrderProductFactory extends Factory
|
||||
{
|
||||
protected $model = OrderProduct::class;
|
||||
|
||||
public function definition(): array
|
||||
{
|
||||
return [
|
||||
'created_at' => Carbon::now(),
|
||||
'updated_at' => Carbon::now(),
|
||||
'sku' => $this->faker->randomElement([$this->faker->randomNumber(4, true), null]),
|
||||
'product_name' => $this->faker->randomElement(['shirts', 'hats', 'jackets', 'pants', 'tote bags', 'backpacks']),
|
||||
'color' => $this->faker->randomElement(['black', 'white', 'navy', 'red', 'gold', 'charcoal']),
|
||||
];
|
||||
}
|
||||
}
|
@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Factories;
|
||||
|
||||
use App\Models\OrderProduct;
|
||||
use App\Models\ProductService;
|
||||
use App\Models\ServiceFile;
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
use Illuminate\Support\Carbon;
|
||||
|
||||
class ProductServiceFactory extends Factory
|
||||
{
|
||||
protected $model = ProductService::class;
|
||||
|
||||
public function definition(): array
|
||||
{
|
||||
return [
|
||||
'created_at' => Carbon::now(),
|
||||
'updated_at' => Carbon::now(),
|
||||
'service_type' => $this->faker->randomElement(['embroidery', 'screen printing', 'dtg', 'vinyl']),
|
||||
'placement' => $this->faker->randomElement(['l/c', 'c/f', 'f/b', 'r/c']),
|
||||
'setup_amount' => 0,
|
||||
'amount' => $this->faker->randomNumber(1),
|
||||
'amount_price' => 0,
|
||||
];
|
||||
}
|
||||
}
|
@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Factories;
|
||||
|
||||
use App\Models\OrderProduct;
|
||||
use App\Models\ProductSize;
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
use Illuminate\Support\Carbon;
|
||||
|
||||
class ProductSizeFactory extends Factory
|
||||
{
|
||||
protected $model = ProductSize::class;
|
||||
|
||||
public function definition(): array
|
||||
{
|
||||
return [
|
||||
'created_at' => Carbon::now(),
|
||||
'updated_at' => Carbon::now(),
|
||||
'size' => $this->faker->randomElement(['xs', 's', 'm', 'l', 'xl', '2xl', '3xl']),
|
||||
'amount' => $this->faker->randomNumber(2, false),
|
||||
];
|
||||
}
|
||||
}
|
@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Factories;
|
||||
|
||||
use App\Models\ServiceFile;
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
use Illuminate\Support\Carbon;
|
||||
|
||||
class ServiceFileFactory extends Factory
|
||||
{
|
||||
protected $model = ServiceFile::class;
|
||||
|
||||
public function definition(): array
|
||||
{
|
||||
return [
|
||||
'created_at' => Carbon::now(),
|
||||
'updated_at' => Carbon::now(),
|
||||
'code' => $this->faker->randomElement(['A', 'B']) . $this->faker->randomNumber(4, true),
|
||||
'name' => $this->faker->word(),
|
||||
'width' => round($this->faker->randomFloat(2, 0, 10), 1),
|
||||
'height' => round($this->faker->randomFloat(2, 0, 10), 1),
|
||||
'unit' => 'inch',
|
||||
];
|
||||
}
|
||||
}
|
@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration {
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('order_products', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->foreignId('order_id')->constrained();
|
||||
$table->string('sku')->nullable();
|
||||
$table->string('product_name');
|
||||
$table->string('color')->nullable();
|
||||
$table->softDeletes();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('order_products');
|
||||
}
|
||||
};
|
@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration {
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('product_services', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->foreignId('order_product_id');
|
||||
$table->string('service_type');
|
||||
$table->string('placement');
|
||||
$table->string('setup_amount');
|
||||
$table->string('amount')->nullable();
|
||||
$table->string('amount_price')->nullable();
|
||||
$table->softDeletes();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('product_services');
|
||||
}
|
||||
};
|
@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration {
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('service_files', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->foreignId('product_service_id')->constrained();
|
||||
$table->string('code');
|
||||
$table->string('name');
|
||||
$table->string('placement');
|
||||
$table->decimal('width')->nullable();
|
||||
$table->decimal('height')->nullable();
|
||||
$table->string('unit')->default("inch");
|
||||
$table->integer('setup_number')->nullable();
|
||||
$table->softDeletes();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('service_files');
|
||||
}
|
||||
};
|
@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration {
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('product_sizes', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->foreignId('order_product_id');
|
||||
$table->string('size');
|
||||
$table->string('amount');
|
||||
$table->softDeletes();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('product_sizes');
|
||||
}
|
||||
};
|
@ -0,0 +1,93 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Seeders;
|
||||
|
||||
use App\Models\Contact;
|
||||
use App\Models\Customer;
|
||||
use App\Models\Order;
|
||||
use App\Models\OrderProduct;
|
||||
use App\Models\PackingSlip;
|
||||
use App\Models\ProductService;
|
||||
use App\Models\ProductSize;
|
||||
use App\Models\ServiceFile;
|
||||
use App\Models\ShippingEntry;
|
||||
use Illuminate\Database\Seeder;
|
||||
|
||||
class CustomerSeeder extends Seeder
|
||||
{
|
||||
public function run(): void
|
||||
{
|
||||
Customer::factory(9)
|
||||
->has(Contact::factory(5))
|
||||
->has(PackingSlip::factory(30))
|
||||
->has(ShippingEntry::factory(2))
|
||||
->has(Order::factory(10)
|
||||
->has(OrderProduct::factory(2)
|
||||
->has(ProductSize::factory(3))
|
||||
->has(ProductService::factory(3)
|
||||
->has(ServiceFile::factory(1)))))
|
||||
->create();
|
||||
|
||||
Customer::factory([
|
||||
'company_name' => 'Genumark',
|
||||
'internal_name' => 'genumark',
|
||||
'shipping_address' => '',
|
||||
'billing_address' => '',
|
||||
])
|
||||
->has(Contact::factory([
|
||||
'first_name' => 'Tammy',
|
||||
'last_name' => 'Bookbinder',
|
||||
'email' => 'tbookbinder@genumark.com',
|
||||
'phone' => '+1 778 229 5668'
|
||||
]))
|
||||
->has(Contact::factory([
|
||||
'first_name' => 'Kathlyn',
|
||||
'last_name' => 'Wood',
|
||||
'email' => 'kwood@genumark.com',
|
||||
'phone' => '+1 604 294 2376',
|
||||
'notes' => 'Always CC, unless SOF order'
|
||||
]))
|
||||
->has(Contact::factory([
|
||||
'first_name' => 'Jane',
|
||||
'last_name' => 'Wellman',
|
||||
'email' => 'jwellman@genumark.com',
|
||||
'phone' => '+1 604 742 5584',
|
||||
'notes' => 'Deals with SOF orders'
|
||||
]))
|
||||
->has(Contact::factory([
|
||||
'first_name' => 'Trisha',
|
||||
'last_name' => 'Miller',
|
||||
'email' => 'tmiller@genumark.com',
|
||||
'phone' => '+1 604 802 8486'
|
||||
]))
|
||||
->has(Contact::factory([
|
||||
'first_name' => 'Brenda',
|
||||
'last_name' => 'Kuepfer',
|
||||
'email' => 'bkuepfer@genumark.com',
|
||||
'phone' => '+1 604 305 5002'
|
||||
]))
|
||||
->has(PackingSlip::factory(20))
|
||||
->has(ShippingEntry::factory([
|
||||
'account_title' => 'Genumark',
|
||||
'courier' => 'UPS CampusShip',
|
||||
'contact' => 'https://www.ups.com/lasso/login',
|
||||
'account_username' => 'GenumarkTopNotch',
|
||||
'account_password' => 'TopNotch@13579',
|
||||
'info_needed' => 'Put PO on box',
|
||||
'notify' => 'Various reps, CC Kathlyn Wood',
|
||||
'notes' => 'For Save On Foods orders, see Genumark SOF'
|
||||
]))
|
||||
->has(ShippingEntry::factory([
|
||||
'account_title' => 'Genumark Save-On-Foods',
|
||||
'courier' => 'UPS CampusShip',
|
||||
'contact' => 'https://www.ups.com/lasso/login',
|
||||
'account_username' => 'GenumarkTopNotch',
|
||||
'account_password' => 'TopNotch@13579',
|
||||
'info_needed' => 'Put PO on box',
|
||||
'notify' => 'Jane Wellman',
|
||||
'notes' => 'Don\'t CC Kathlyn for SOF orders'
|
||||
]))
|
||||
->has(Order::factory(10))
|
||||
->create();
|
||||
}
|
||||
}
|
@ -1,144 +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></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="customer-tabs" role="tablist">
|
||||
<li class="nav-item" role="presentation">
|
||||
<button class="nav-link link-dark {{$tab == null ? 'active' : ''}}" id="details-tab"
|
||||
data-bs-toggle="tab" data-bs-target="#details" type="button" role="tab"
|
||||
aria-controls="details" aria-selected="{{$tab == null ? 'true' : 'false'}}">
|
||||
<x-bi-list-ul/>
|
||||
Customers
|
||||
</button>
|
||||
</li>
|
||||
<li class="nav-item" role="presentation">
|
||||
<button class="nav-link link-dark {{$tab == 'shipping' ? 'active' : ''}}" id="shipping-tab"
|
||||
data-bs-toggle="tab" data-bs-target="#shipping" type="button" role="tab"
|
||||
aria-controls="shipping" aria-selected="{{$tab == 'shipping' ? 'true' : 'false'}}">
|
||||
<x-bi-box-fill/>
|
||||
Orders
|
||||
</button>
|
||||
</li>
|
||||
<li class="nav-item" role="presentation">
|
||||
<button class="nav-link link-dark {{$tab == 'packing' ? 'active' : ''}}" id="packing-tab"
|
||||
data-bs-toggle="tab" data-bs-target="#packing" type="button" role="tab"
|
||||
aria-controls="packing" aria-selected="{{$tab == 'packing' ? 'true' : 'false'}}">
|
||||
<x-bi-card-text/>
|
||||
Packing Slips
|
||||
</button>
|
||||
</li>
|
||||
{{-- <li class="nav-item" role="presentation">--}}
|
||||
{{-- <button class="nav-link link-dark {{$tab == 'contacts' ? 'active' : ''}}" id="contacts-tab"--}}
|
||||
{{-- data-bs-toggle="tab" data-bs-target="#contacts" type="button" role="tab"--}}
|
||||
{{-- aria-controls="contacts" aria-selected="{{$tab == 'contacts' ? 'true' : 'false'}}">--}}
|
||||
{{-- <x-bi-people-fill/>--}}
|
||||
{{-- Contacts--}}
|
||||
{{-- </button>--}}
|
||||
{{-- </li>--}}
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
<div class="col border-bottom"></div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@endsection()
|
||||
|
||||
@section('content')
|
||||
<div class="container">
|
||||
<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-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="btn btn-sm btn-outline-secondary"
|
||||
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>
|
||||
|
||||
<!-- Create Customer Modal -->
|
||||
@include('partials.customers.create-modal')
|
||||
|
||||
<!-- Delete Customer Modal -->
|
||||
@include('partials.customers.delete-all-modal')
|
||||
|
||||
@endsection
|
@ -0,0 +1,57 @@
|
||||
@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">
|
||||
<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 == 'active_orders' ? 'active' : ''}}" id="active_orders-tab"
|
||||
href="{{route('dashboard', ['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 == 'packing_slips' ? 'active' : ''}}" id="packing-tab"
|
||||
href="{{route('dashboard', ['tab' => 'packing_slips'])}}" type="button" role="tab"
|
||||
aria-controls="packing_slips" aria-selected="{{$tab == 'packing_slips' ? 'true' : 'false'}}">
|
||||
<x-bi-list-ul/>
|
||||
Packing Slips
|
||||
</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>
|
||||
</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">{{ __('Dashboard') }}</div>
|
||||
|
||||
<div class="card-body">
|
||||
@if (session('status'))
|
||||
<div class="alert alert-success" role="alert">
|
||||
{{ session('status') }}
|
||||
</div>
|
||||
@endif
|
||||
|
||||
{{ __('You are logged in!') }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
@ -0,0 +1,97 @@
|
||||
<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>
|
@ -0,0 +1,7 @@
|
||||
<div>
|
||||
<h1>{{ $count }}</h1>
|
||||
|
||||
<button wire:click="increment">+</button>
|
||||
|
||||
<button wire:click="decrement">-</button>
|
||||
</div>
|
@ -0,0 +1,3 @@
|
||||
<div>
|
||||
|
||||
</div>
|
@ -0,0 +1,43 @@
|
||||
<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">
|
||||
<select wire:change="updateContactList" wire:model="selectedCustomer" name="customer_id"
|
||||
class="form-select" 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-3">
|
||||
<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" name="contact_id" class="form-select" 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>
|
@ -0,0 +1,111 @@
|
||||
<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="btn btn-sm btn-outline-secondary px-1 py-0 m-0"
|
||||
href="">
|
||||
<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>
|
@ -0,0 +1,27 @@
|
||||
@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
|
@ -0,0 +1,354 @@
|
||||
@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-9 pt-3">
|
||||
<form action="{{route('order-products.store') }}" method="post">
|
||||
@csrf
|
||||
|
||||
<div class="row mb-3">
|
||||
<label class="col-md-4 col-form-label text-md-end">SKU</label>
|
||||
<div class="col-md-2">
|
||||
<input id="sku" type="text"
|
||||
class="form-control @error('sku') is-invalid @enderror"
|
||||
name="sku" value="{{@old('sku')}}" autofocus>
|
||||
|
||||
@error('sku')
|
||||
<span class="invalid-feedback" role="alert">
|
||||
<strong>{{ $message }}</strong>
|
||||
</span>
|
||||
@enderror
|
||||
</div>
|
||||
|
||||
<label class="col-1 col-form-label text-md-end">Color</label>
|
||||
<div class="col-3">
|
||||
<input id="color" type="text"
|
||||
class="form-control @error('color') is-invalid @enderror"
|
||||
name="color" value="{{@old('color')}}">
|
||||
|
||||
@error('color')
|
||||
<span class="invalid-feedback" role="alert">
|
||||
<strong>{{ $message }}</strong>
|
||||
</span>
|
||||
@enderror
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row mb-3">
|
||||
<label class="col-md-4 col-form-label text-md-end">Product Name</label>
|
||||
<div class="col-md-6">
|
||||
<input id="product_name" type="text"
|
||||
class="form-control @error('product_name') is-invalid @enderror"
|
||||
name="product_name" value="{{@old('product_name')}}" required>
|
||||
|
||||
@error('product_name')
|
||||
<span class="invalid-feedback" role="alert">
|
||||
<strong>{{ $message }}</strong>
|
||||
</span>
|
||||
@enderror
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row mb-3">
|
||||
<label class="col-md-4 col-form-label text-md-end">Sizes</label>
|
||||
<div class="col-6">
|
||||
<div class="row mb-1 text-center fw-bold">
|
||||
<div class="col px-1">XS</div>
|
||||
<div class="col px-1">S</div>
|
||||
<div class="col px-1">M</div>
|
||||
<div class="col px-1">L</div>
|
||||
<div class="col px-1">XL</div>
|
||||
<div class="col px-1">2XL</div>
|
||||
<div class="col px-1">Other</div>
|
||||
<div class="col px-1">Total</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col px-1">
|
||||
<input id="size-xs" type="text"
|
||||
class="form-control px-1 text-center @error('size-xs') is-invalid @enderror"
|
||||
name="size-xs"
|
||||
value="{{@old('size-xs')}}">
|
||||
@error('size-xs') <span class="invalid-feedback"
|
||||
role="alert"> <strong>{{ $message }}</strong> </span> @enderror
|
||||
</div>
|
||||
<div class="col px-1">
|
||||
<input id="size-s" type="text"
|
||||
class="form-control px-1 text-center @error('size-s') is-invalid @enderror"
|
||||
name="size-s"
|
||||
value="{{@old('size-s')}}">
|
||||
@error('size-s') <span class="invalid-feedback"
|
||||
role="alert"> <strong>{{ $message }}</strong> </span> @enderror
|
||||
</div>
|
||||
<div class="col px-1">
|
||||
<input id="size-m" type="text"
|
||||
class="form-control px-1 text-center @error('size-m') is-invalid @enderror"
|
||||
name="size-m"
|
||||
value="{{@old('size-m')}}">
|
||||
@error('size-m') <span class="invalid-feedback"
|
||||
role="alert"> <strong>{{ $message }}</strong> </span> @enderror
|
||||
</div>
|
||||
<div class="col px-1">
|
||||
<input id="size-l" type="text"
|
||||
class="form-control px-1 text-center @error('size-l') is-invalid @enderror"
|
||||
name="size-l"
|
||||
value="{{@old('size-l')}}">
|
||||
@error('size-l') <span class="invalid-feedback"
|
||||
role="alert"> <strong>{{ $message }}</strong> </span> @enderror
|
||||
</div>
|
||||
<div class="col px-1">
|
||||
<input id="size-xl" type="text"
|
||||
class="form-control px-1 text-center @error('size-xl') is-invalid @enderror"
|
||||
name="size-xl"
|
||||
value="{{@old('size-xl')}}">
|
||||
@error('size-xl') <span class="invalid-feedback"
|
||||
role="alert"> <strong>{{ $message }}</strong> </span> @enderror
|
||||
</div>
|
||||
<div class="col px-1">
|
||||
<input id="size-2xl" type="text"
|
||||
class="form-control px-1 text-center @error('size-2xl') is-invalid @enderror"
|
||||
name="size-2xl"
|
||||
value="{{@old('size-2xl')}}">
|
||||
@error('size-2xl') <span class="invalid-feedback"
|
||||
role="alert"> <strong>{{ $message }}</strong> </span> @enderror
|
||||
</div>
|
||||
<div class="col px-1">
|
||||
<input id="size-other" type="text"
|
||||
class="form-control px-1 text-center @error('size-other') is-invalid @enderror"
|
||||
name="size-other"
|
||||
value="{{@old('size-other')}}">
|
||||
@error('size-other') <span class="invalid-feedback"
|
||||
role="alert"> <strong>{{ $message }}</strong> </span> @enderror
|
||||
</div>
|
||||
<div class="col px-1">
|
||||
<span name="total" id="total"></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row mb-3">
|
||||
<div class="col-4"></div>
|
||||
<div class="col text-end">
|
||||
<button class="btn btn-sm btn-primary w-25" type="">Add</button>
|
||||
</div>
|
||||
<div class="col-2"></div>
|
||||
</div>
|
||||
|
||||
<hr class="border-secondary-subtle mx-4 px-0">
|
||||
|
||||
<div class="row mb-3">
|
||||
<label class="col-md-4 col-form-label text-md-end">Name</label>
|
||||
<div class="col-md-6">
|
||||
<input id="service_file_name" type="text"
|
||||
class="form-control @error('service_file_name') is-invalid @enderror"
|
||||
name="service_file_name" value="{{@old('service_file_name')}}" required>
|
||||
|
||||
@error('service_file_name')
|
||||
<span class="invalid-feedback" role="alert">
|
||||
<strong>{{ $message }}</strong>
|
||||
</span>
|
||||
@enderror
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row mb-3">
|
||||
<label class="col-md-4 col-form-label text-md-end">Placement</label>
|
||||
<div class="col-md-6">
|
||||
<input id="service_file_placement" type="text"
|
||||
class="form-control @error('service_file_placement') is-invalid @enderror"
|
||||
name="service_file_placement" value="{{@old('service_file_placement')}}" required>
|
||||
|
||||
@error('service_file_placement')
|
||||
<span class="invalid-feedback" role="alert">
|
||||
<strong>{{ $message }}</strong>
|
||||
</span>
|
||||
@enderror
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<label class="col-md-4 col-form-label text-md-end">File Details</label>
|
||||
<div class="col">
|
||||
<label class="col-form-label text-md-end">Code</label>
|
||||
</div>
|
||||
<div class="col">
|
||||
<label class="col-form-label text-md-end">Width</label>
|
||||
</div>
|
||||
<div class="col">
|
||||
<label class="col-form-label text-md-end">Height</label>
|
||||
</div>
|
||||
<div class="col">
|
||||
<label class="col-form-label text-md-end">Amount</label>
|
||||
</div>
|
||||
<div class="col-2"></div>
|
||||
</div>
|
||||
|
||||
<div class="row mb-2">
|
||||
<div class="col-4">
|
||||
</div>
|
||||
|
||||
<div class="col">
|
||||
<input id="service_file_code"
|
||||
class="form-control @error('service_file_code') is-invalid @enderror"
|
||||
name="service_file_code" value="{{@old('service_file_code')}}" placeholder="A1111"
|
||||
required>
|
||||
|
||||
@error('service_file_code')
|
||||
<span class="invalid-feedback" role="alert">
|
||||
<strong>{{ $message }}</strong>
|
||||
</span>
|
||||
@enderror
|
||||
</div>
|
||||
|
||||
<div class="col">
|
||||
<input id="service_file_width" type="number" step="0.05" min="0"
|
||||
class="form-control @error('service_file_width') is-invalid @enderror"
|
||||
name="service_file_width" value="{{@old('service_file_width')}}" required>
|
||||
|
||||
@error('service_file_width')
|
||||
<span class="invalid-feedback" role="alert">
|
||||
<strong>{{ $message }}</strong>
|
||||
</span>
|
||||
@enderror
|
||||
</div>
|
||||
|
||||
<div class="col">
|
||||
<input id="service_file_height" type="number" step="0.05" min="0"
|
||||
class="form-control @error('service_file_height') is-invalid @enderror"
|
||||
name="service_file_height" value="{{@old('service_file_height')}}" required>
|
||||
|
||||
@error('service_file_height')
|
||||
<span class="invalid-feedback" role="alert">
|
||||
<strong>{{ $message }}</strong>
|
||||
</span>
|
||||
@enderror
|
||||
</div>
|
||||
|
||||
<div class="col">
|
||||
<input id="service_file_amount" type="number" step="1" min="0"
|
||||
class="form-control @error('service_file_amount') is-invalid @enderror"
|
||||
amount="service_file_amount" value="{{@old('service_file_amount')}}" required>
|
||||
|
||||
@error('service_file_amount')
|
||||
<span class="invalid-feedback" role="alert">
|
||||
<strong>{{ $message }}</strong>
|
||||
</span>
|
||||
@enderror
|
||||
</div>
|
||||
|
||||
<div class="col-2"></div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-4"></div>
|
||||
<div class="col">
|
||||
<label class="col-form-label text-md-end">Unit Price</label>
|
||||
</div>
|
||||
<div class="col">
|
||||
<label class="col-form-label text-md-end">Number of Setup</label>
|
||||
</div>
|
||||
<div class="col">
|
||||
<label class="col-form-label text-md-end">Total</label>
|
||||
</div>
|
||||
<div class="col-2"></div>
|
||||
</div>
|
||||
|
||||
<div class="row mb-3">
|
||||
<div class="col-4"></div>
|
||||
<div class="col">
|
||||
<input id="service_file_setup_amount" type="text"
|
||||
class="form-control @error('service_file_setup_amount') is-invalid @enderror"
|
||||
name="service_file_setup_amount" value="{{@old('service_file_setup_amount')}}"
|
||||
required>
|
||||
|
||||
@error('service_file_setup_amount')
|
||||
<span class="invalid-feedback" role="alert">
|
||||
<strong>{{ $message }}</strong>
|
||||
</span>
|
||||
@enderror
|
||||
</div>
|
||||
|
||||
<div class="col">
|
||||
<input id="service_file_price" type="text"
|
||||
class="form-control @error('service_file_price') is-invalid @enderror"
|
||||
name="service_file_price" value="{{@old('service_file_price')}}" required>
|
||||
|
||||
@error('service_file_price')
|
||||
<span class="invalid-feedback" role="alert">
|
||||
<strong>{{ $message }}</strong>
|
||||
</span>
|
||||
@enderror
|
||||
</div>
|
||||
<div class="col">
|
||||
<input id="service_file_price" type="text"
|
||||
class="form-control @error('service_file_price') is-invalid @enderror"
|
||||
name="service_file_price" value="{{@old('service_file_price')}}" required>
|
||||
|
||||
@error('service_file_price')
|
||||
<span class="invalid-feedback" role="alert">
|
||||
<strong>{{ $message }}</strong>
|
||||
</span>
|
||||
@enderror
|
||||
</div>
|
||||
<div class="col-2"></div>
|
||||
</div>
|
||||
<div class="row mb-3">
|
||||
<label class="col-md-4 col-form-label text-md-end">Notes</label>
|
||||
<div class="col-6">
|
||||
<textarea name="contents" id="contents" cols="30" rows="2" class="form-control"
|
||||
autocomplete="contents" placeholder=""
|
||||
required>{{ old('contents') }}</textarea>
|
||||
@error('contents')
|
||||
<span class="invalid-feedback" role="alert">
|
||||
<strong>{{ $message }}</strong>
|
||||
</span>
|
||||
@enderror
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr class="border-secondary-subtle mx-4 px-0">
|
||||
|
||||
<div class="row mb-3">
|
||||
<div class="col-4">
|
||||
</div>
|
||||
<div class="col-1">
|
||||
<a class="btn btn-secondary" type="">Back</a>
|
||||
</div>
|
||||
<div class="col-5 text-end">
|
||||
<button class="btn btn-primary w-25" type="submit">Save</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
@ -0,0 +1,91 @@
|
||||
@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
|
@ -0,0 +1,71 @@
|
||||
@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 == '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 == '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>
|
||||
</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,110 +0,0 @@
|
||||
<div class="modal modal-lg fade" id="editCustomerModal" tabindex="-1" aria-labelledby="editCustomerModalLabel"
|
||||
aria-hidden="true">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h1 class="modal-title fs-5" id="editCustomerModalLabel">Edit Customer</h1>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||
</div>
|
||||
|
||||
<form action="{{route('customers.update', $customer)}}" method="post">
|
||||
@csrf
|
||||
@method('PATCH')
|
||||
|
||||
<div class="modal-body">
|
||||
|
||||
<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="{{$customer->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="{{ $customer->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="{{ $customer->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="{{ $customer->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="{{ $customer->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">Edit customer</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
@ -0,0 +1,76 @@
|
||||
<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-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="btn btn-sm btn-outline-secondary"
|
||||
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>
|
@ -0,0 +1,43 @@
|
||||
<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>
|
@ -0,0 +1,5 @@
|
||||
<div class="tab-pane {{$tab == 'packing' ? 'active' : ''}}" id="packing" role="tabpanel"
|
||||
aria-labelledby="packing-tab">
|
||||
|
||||
packing slips
|
||||
</div>
|
@ -0,0 +1,5 @@
|
||||
<div class="tab-pane {{$tab == 'files' ? 'active' : ''}}" id="files" role="tabpanel"
|
||||
aria-labelledby="files-tab">
|
||||
|
||||
Files
|
||||
</div>
|
@ -1,46 +0,0 @@
|
||||
@if ($paginator->hasPages())
|
||||
<nav>
|
||||
<ul class="pagination">
|
||||
{{-- Previous Page Link --}}
|
||||
@if ($paginator->onFirstPage())
|
||||
<li class="page-item disabled" aria-disabled="true" aria-label="@lang('pagination.previous')">
|
||||
<span class="page-link" aria-hidden="true">‹</span>
|
||||
</li>
|
||||
@else
|
||||
<li class="page-item">
|
||||
<a class="page-link" href="{{ $paginator->previousPageUrl() }}" rel="prev" aria-label="@lang('pagination.previous')">‹</a>
|
||||
</li>
|
||||
@endif
|
||||
|
||||
{{-- Pagination Elements --}}
|
||||
@foreach ($elements as $element)
|
||||
{{-- "Three Dots" Separator --}}
|
||||
@if (is_string($element))
|
||||
<li class="page-item disabled" aria-disabled="true"><span class="page-link">{{ $element }}</span></li>
|
||||
@endif
|
||||
|
||||
{{-- Array Of Links --}}
|
||||
@if (is_array($element))
|
||||
@foreach ($element as $page => $url)
|
||||
@if ($page == $paginator->currentPage())
|
||||
<li class="page-item active" aria-current="page"><span class="page-link">{{ $page }}</span></li>
|
||||
@else
|
||||
<li class="page-item"><a class="page-link" href="{{ $url }}">{{ $page }}</a></li>
|
||||
@endif
|
||||
@endforeach
|
||||
@endif
|
||||
@endforeach
|
||||
|
||||
{{-- Next Page Link --}}
|
||||
@if ($paginator->hasMorePages())
|
||||
<li class="page-item">
|
||||
<a class="page-link" href="{{ $paginator->nextPageUrl() }}" rel="next" aria-label="@lang('pagination.next')">›</a>
|
||||
</li>
|
||||
@else
|
||||
<li class="page-item disabled" aria-disabled="true" aria-label="@lang('pagination.next')">
|
||||
<span class="page-link" aria-hidden="true">›</span>
|
||||
</li>
|
||||
@endif
|
||||
</ul>
|
||||
</nav>
|
||||
@endif
|
@ -1,88 +0,0 @@
|
||||
@if ($paginator->hasPages())
|
||||
<nav class="d-flex justify-items-center justify-content-between">
|
||||
<div class="d-flex justify-content-between flex-fill d-sm-none">
|
||||
<ul class="pagination">
|
||||
{{-- Previous Page Link --}}
|
||||
@if ($paginator->onFirstPage())
|
||||
<li class="page-item disabled" aria-disabled="true">
|
||||
<span class="page-link">@lang('pagination.previous')</span>
|
||||
</li>
|
||||
@else
|
||||
<li class="page-item">
|
||||
<a class="page-link" href="{{ $paginator->previousPageUrl() }}" rel="prev">@lang('pagination.previous')</a>
|
||||
</li>
|
||||
@endif
|
||||
|
||||
{{-- Next Page Link --}}
|
||||
@if ($paginator->hasMorePages())
|
||||
<li class="page-item">
|
||||
<a class="page-link" href="{{ $paginator->nextPageUrl() }}" rel="next">@lang('pagination.next')</a>
|
||||
</li>
|
||||
@else
|
||||
<li class="page-item disabled" aria-disabled="true">
|
||||
<span class="page-link">@lang('pagination.next')</span>
|
||||
</li>
|
||||
@endif
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="d-none flex-sm-fill d-sm-flex align-items-sm-center justify-content-sm-between">
|
||||
<div>
|
||||
<p class="small text-muted">
|
||||
{!! __('Showing') !!}
|
||||
<span class="fw-semibold">{{ $paginator->firstItem() }}</span>
|
||||
{!! __('to') !!}
|
||||
<span class="fw-semibold">{{ $paginator->lastItem() }}</span>
|
||||
{!! __('of') !!}
|
||||
<span class="fw-semibold">{{ $paginator->total() }}</span>
|
||||
{!! __('results') !!}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<ul class="pagination">
|
||||
{{-- Previous Page Link --}}
|
||||
@if ($paginator->onFirstPage())
|
||||
<li class="page-item disabled" aria-disabled="true" aria-label="@lang('pagination.previous')">
|
||||
<span class="page-link" aria-hidden="true">‹</span>
|
||||
</li>
|
||||
@else
|
||||
<li class="page-item">
|
||||
<a class="page-link" href="{{ $paginator->previousPageUrl() }}" rel="prev" aria-label="@lang('pagination.previous')">‹</a>
|
||||
</li>
|
||||
@endif
|
||||
|
||||
{{-- Pagination Elements --}}
|
||||
@foreach ($elements as $element)
|
||||
{{-- "Three Dots" Separator --}}
|
||||
@if (is_string($element))
|
||||
<li class="page-item disabled" aria-disabled="true"><span class="page-link">{{ $element }}</span></li>
|
||||
@endif
|
||||
|
||||
{{-- Array Of Links --}}
|
||||
@if (is_array($element))
|
||||
@foreach ($element as $page => $url)
|
||||
@if ($page == $paginator->currentPage())
|
||||
<li class="page-item active" aria-current="page"><span class="page-link">{{ $page }}</span></li>
|
||||
@else
|
||||
<li class="page-item"><a class="page-link" href="{{ $url }}">{{ $page }}</a></li>
|
||||
@endif
|
||||
@endforeach
|
||||
@endif
|
||||
@endforeach
|
||||
|
||||
{{-- Next Page Link --}}
|
||||
@if ($paginator->hasMorePages())
|
||||
<li class="page-item">
|
||||
<a class="page-link" href="{{ $paginator->nextPageUrl() }}" rel="next" aria-label="@lang('pagination.next')">›</a>
|
||||
</li>
|
||||
@else
|
||||
<li class="page-item disabled" aria-disabled="true" aria-label="@lang('pagination.next')">
|
||||
<span class="page-link" aria-hidden="true">›</span>
|
||||
</li>
|
||||
@endif
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
@endif
|
@ -1,46 +0,0 @@
|
||||
@if ($paginator->hasPages())
|
||||
<nav>
|
||||
<ul class="pagination">
|
||||
{{-- Previous Page Link --}}
|
||||
@if ($paginator->onFirstPage())
|
||||
<li class="disabled" aria-disabled="true" aria-label="@lang('pagination.previous')">
|
||||
<span aria-hidden="true">‹</span>
|
||||
</li>
|
||||
@else
|
||||
<li>
|
||||
<a href="{{ $paginator->previousPageUrl() }}" rel="prev" aria-label="@lang('pagination.previous')">‹</a>
|
||||
</li>
|
||||
@endif
|
||||
|
||||
{{-- Pagination Elements --}}
|
||||
@foreach ($elements as $element)
|
||||
{{-- "Three Dots" Separator --}}
|
||||
@if (is_string($element))
|
||||
<li class="disabled" aria-disabled="true"><span>{{ $element }}</span></li>
|
||||
@endif
|
||||
|
||||
{{-- Array Of Links --}}
|
||||
@if (is_array($element))
|
||||
@foreach ($element as $page => $url)
|
||||
@if ($page == $paginator->currentPage())
|
||||
<li class="active" aria-current="page"><span>{{ $page }}</span></li>
|
||||
@else
|
||||
<li><a href="{{ $url }}">{{ $page }}</a></li>
|
||||
@endif
|
||||
@endforeach
|
||||
@endif
|
||||
@endforeach
|
||||
|
||||
{{-- Next Page Link --}}
|
||||
@if ($paginator->hasMorePages())
|
||||
<li>
|
||||
<a href="{{ $paginator->nextPageUrl() }}" rel="next" aria-label="@lang('pagination.next')">›</a>
|
||||
</li>
|
||||
@else
|
||||
<li class="disabled" aria-disabled="true" aria-label="@lang('pagination.next')">
|
||||
<span aria-hidden="true">›</span>
|
||||
</li>
|
||||
@endif
|
||||
</ul>
|
||||
</nav>
|
||||
@endif
|
@ -1,36 +0,0 @@
|
||||
@if ($paginator->hasPages())
|
||||
<div class="ui pagination menu" role="navigation">
|
||||
{{-- Previous Page Link --}}
|
||||
@if ($paginator->onFirstPage())
|
||||
<a class="icon item disabled" aria-disabled="true" aria-label="@lang('pagination.previous')"> <i class="left chevron icon"></i> </a>
|
||||
@else
|
||||
<a class="icon item" href="{{ $paginator->previousPageUrl() }}" rel="prev" aria-label="@lang('pagination.previous')"> <i class="left chevron icon"></i> </a>
|
||||
@endif
|
||||
|
||||
{{-- Pagination Elements --}}
|
||||
@foreach ($elements as $element)
|
||||
{{-- "Three Dots" Separator --}}
|
||||
@if (is_string($element))
|
||||
<a class="icon item disabled" aria-disabled="true">{{ $element }}</a>
|
||||
@endif
|
||||
|
||||
{{-- Array Of Links --}}
|
||||
@if (is_array($element))
|
||||
@foreach ($element as $page => $url)
|
||||
@if ($page == $paginator->currentPage())
|
||||
<a class="item active" href="{{ $url }}" aria-current="page">{{ $page }}</a>
|
||||
@else
|
||||
<a class="item" href="{{ $url }}">{{ $page }}</a>
|
||||
@endif
|
||||
@endforeach
|
||||
@endif
|
||||
@endforeach
|
||||
|
||||
{{-- Next Page Link --}}
|
||||
@if ($paginator->hasMorePages())
|
||||
<a class="icon item" href="{{ $paginator->nextPageUrl() }}" rel="next" aria-label="@lang('pagination.next')"> <i class="right chevron icon"></i> </a>
|
||||
@else
|
||||
<a class="icon item disabled" aria-disabled="true" aria-label="@lang('pagination.next')"> <i class="right chevron icon"></i> </a>
|
||||
@endif
|
||||
</div>
|
||||
@endif
|
@ -1,27 +0,0 @@
|
||||
@if ($paginator->hasPages())
|
||||
<nav>
|
||||
<ul class="pagination">
|
||||
{{-- Previous Page Link --}}
|
||||
@if ($paginator->onFirstPage())
|
||||
<li class="page-item disabled" aria-disabled="true">
|
||||
<span class="page-link">@lang('pagination.previous')</span>
|
||||
</li>
|
||||
@else
|
||||
<li class="page-item">
|
||||
<a class="page-link" href="{{ $paginator->previousPageUrl() }}" rel="prev">@lang('pagination.previous')</a>
|
||||
</li>
|
||||
@endif
|
||||
|
||||
{{-- Next Page Link --}}
|
||||
@if ($paginator->hasMorePages())
|
||||
<li class="page-item">
|
||||
<a class="page-link" href="{{ $paginator->nextPageUrl() }}" rel="next">@lang('pagination.next')</a>
|
||||
</li>
|
||||
@else
|
||||
<li class="page-item disabled" aria-disabled="true">
|
||||
<span class="page-link">@lang('pagination.next')</span>
|
||||
</li>
|
||||
@endif
|
||||
</ul>
|
||||
</nav>
|
||||
@endif
|
@ -1,29 +0,0 @@
|
||||
@if ($paginator->hasPages())
|
||||
<nav role="navigation" aria-label="Pagination Navigation">
|
||||
<ul class="pagination">
|
||||
{{-- Previous Page Link --}}
|
||||
@if ($paginator->onFirstPage())
|
||||
<li class="page-item disabled" aria-disabled="true">
|
||||
<span class="page-link">{!! __('pagination.previous') !!}</span>
|
||||
</li>
|
||||
@else
|
||||
<li class="page-item">
|
||||
<a class="page-link" href="{{ $paginator->previousPageUrl() }}" rel="prev">
|
||||
{!! __('pagination.previous') !!}
|
||||
</a>
|
||||
</li>
|
||||
@endif
|
||||
|
||||
{{-- Next Page Link --}}
|
||||
@if ($paginator->hasMorePages())
|
||||
<li class="page-item">
|
||||
<a class="page-link" href="{{ $paginator->nextPageUrl() }}" rel="next">{!! __('pagination.next') !!}</a>
|
||||
</li>
|
||||
@else
|
||||
<li class="page-item disabled" aria-disabled="true">
|
||||
<span class="page-link">{!! __('pagination.next') !!}</span>
|
||||
</li>
|
||||
@endif
|
||||
</ul>
|
||||
</nav>
|
||||
@endif
|
@ -1,19 +0,0 @@
|
||||
@if ($paginator->hasPages())
|
||||
<nav>
|
||||
<ul class="pagination">
|
||||
{{-- Previous Page Link --}}
|
||||
@if ($paginator->onFirstPage())
|
||||
<li class="disabled" aria-disabled="true"><span>@lang('pagination.previous')</span></li>
|
||||
@else
|
||||
<li><a href="{{ $paginator->previousPageUrl() }}" rel="prev">@lang('pagination.previous')</a></li>
|
||||
@endif
|
||||
|
||||
{{-- Next Page Link --}}
|
||||
@if ($paginator->hasMorePages())
|
||||
<li><a href="{{ $paginator->nextPageUrl() }}" rel="next">@lang('pagination.next')</a></li>
|
||||
@else
|
||||
<li class="disabled" aria-disabled="true"><span>@lang('pagination.next')</span></li>
|
||||
@endif
|
||||
</ul>
|
||||
</nav>
|
||||
@endif
|
@ -1,25 +0,0 @@
|
||||
@if ($paginator->hasPages())
|
||||
<nav role="navigation" aria-label="Pagination Navigation" class="flex justify-between">
|
||||
{{-- Previous Page Link --}}
|
||||
@if ($paginator->onFirstPage())
|
||||
<span class="relative inline-flex items-center px-4 py-2 text-sm font-medium text-gray-500 bg-white border border-gray-300 cursor-default leading-5 rounded-md dark:text-gray-600 dark:bg-gray-800 dark:border-gray-600">
|
||||
{!! __('pagination.previous') !!}
|
||||
</span>
|
||||
@else
|
||||
<a href="{{ $paginator->previousPageUrl() }}" rel="prev" class="relative inline-flex items-center px-4 py-2 text-sm font-medium text-gray-700 bg-white border border-gray-300 leading-5 rounded-md hover:text-gray-500 focus:outline-none focus:ring ring-gray-300 focus:border-blue-300 active:bg-gray-100 active:text-gray-700 transition ease-in-out duration-150 dark:bg-gray-800 dark:border-gray-600 dark:text-gray-300 dark:focus:border-blue-700 dark:active:bg-gray-700 dark:active:text-gray-300">
|
||||
{!! __('pagination.previous') !!}
|
||||
</a>
|
||||
@endif
|
||||
|
||||
{{-- Next Page Link --}}
|
||||
@if ($paginator->hasMorePages())
|
||||
<a href="{{ $paginator->nextPageUrl() }}" rel="next" class="relative inline-flex items-center px-4 py-2 text-sm font-medium text-gray-700 bg-white border border-gray-300 leading-5 rounded-md hover:text-gray-500 focus:outline-none focus:ring ring-gray-300 focus:border-blue-300 active:bg-gray-100 active:text-gray-700 transition ease-in-out duration-150 dark:bg-gray-800 dark:border-gray-600 dark:text-gray-300 dark:focus:border-blue-700 dark:active:bg-gray-700 dark:active:text-gray-300">
|
||||
{!! __('pagination.next') !!}
|
||||
</a>
|
||||
@else
|
||||
<span class="relative inline-flex items-center px-4 py-2 text-sm font-medium text-gray-500 bg-white border border-gray-300 cursor-default leading-5 rounded-md dark:text-gray-600 dark:bg-gray-800 dark:border-gray-600">
|
||||
{!! __('pagination.next') !!}
|
||||
</span>
|
||||
@endif
|
||||
</nav>
|
||||
@endif
|
@ -1,106 +0,0 @@
|
||||
@if ($paginator->hasPages())
|
||||
<nav role="navigation" aria-label="{{ __('Pagination Navigation') }}" class="flex items-center justify-between">
|
||||
<div class="flex justify-between flex-1 sm:hidden">
|
||||
@if ($paginator->onFirstPage())
|
||||
<span class="relative inline-flex items-center px-4 py-2 text-sm font-medium text-gray-500 bg-white border border-gray-300 cursor-default leading-5 rounded-md dark:text-gray-600 dark:bg-gray-800 dark:border-gray-600">
|
||||
{!! __('pagination.previous') !!}
|
||||
</span>
|
||||
@else
|
||||
<a href="{{ $paginator->previousPageUrl() }}" class="relative inline-flex items-center px-4 py-2 text-sm font-medium text-gray-700 bg-white border border-gray-300 leading-5 rounded-md hover:text-gray-500 focus:outline-none focus:ring ring-gray-300 focus:border-blue-300 active:bg-gray-100 active:text-gray-700 transition ease-in-out duration-150 dark:bg-gray-800 dark:border-gray-600 dark:text-gray-300 dark:focus:border-blue-700 dark:active:bg-gray-700 dark:active:text-gray-300">
|
||||
{!! __('pagination.previous') !!}
|
||||
</a>
|
||||
@endif
|
||||
|
||||
@if ($paginator->hasMorePages())
|
||||
<a href="{{ $paginator->nextPageUrl() }}" class="relative inline-flex items-center px-4 py-2 ml-3 text-sm font-medium text-gray-700 bg-white border border-gray-300 leading-5 rounded-md hover:text-gray-500 focus:outline-none focus:ring ring-gray-300 focus:border-blue-300 active:bg-gray-100 active:text-gray-700 transition ease-in-out duration-150 dark:bg-gray-800 dark:border-gray-600 dark:text-gray-300 dark:focus:border-blue-700 dark:active:bg-gray-700 dark:active:text-gray-300">
|
||||
{!! __('pagination.next') !!}
|
||||
</a>
|
||||
@else
|
||||
<span class="relative inline-flex items-center px-4 py-2 ml-3 text-sm font-medium text-gray-500 bg-white border border-gray-300 cursor-default leading-5 rounded-md dark:text-gray-600 dark:bg-gray-800 dark:border-gray-600">
|
||||
{!! __('pagination.next') !!}
|
||||
</span>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
<div class="hidden sm:flex-1 sm:flex sm:items-center sm:justify-between">
|
||||
<div>
|
||||
<p class="text-sm text-gray-700 leading-5 dark:text-gray-400">
|
||||
{!! __('Showing') !!}
|
||||
@if ($paginator->firstItem())
|
||||
<span class="font-medium">{{ $paginator->firstItem() }}</span>
|
||||
{!! __('to') !!}
|
||||
<span class="font-medium">{{ $paginator->lastItem() }}</span>
|
||||
@else
|
||||
{{ $paginator->count() }}
|
||||
@endif
|
||||
{!! __('of') !!}
|
||||
<span class="font-medium">{{ $paginator->total() }}</span>
|
||||
{!! __('results') !!}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<span class="relative z-0 inline-flex rtl:flex-row-reverse shadow-sm rounded-md">
|
||||
{{-- Previous Page Link --}}
|
||||
@if ($paginator->onFirstPage())
|
||||
<span aria-disabled="true" aria-label="{{ __('pagination.previous') }}">
|
||||
<span class="relative inline-flex items-center px-2 py-2 text-sm font-medium text-gray-500 bg-white border border-gray-300 cursor-default rounded-l-md leading-5 dark:bg-gray-800 dark:border-gray-600" aria-hidden="true">
|
||||
<svg class="w-5 h-5" fill="currentColor" viewBox="0 0 20 20">
|
||||
<path fill-rule="evenodd" d="M12.707 5.293a1 1 0 010 1.414L9.414 10l3.293 3.293a1 1 0 01-1.414 1.414l-4-4a1 1 0 010-1.414l4-4a1 1 0 011.414 0z" clip-rule="evenodd" />
|
||||
</svg>
|
||||
</span>
|
||||
</span>
|
||||
@else
|
||||
<a href="{{ $paginator->previousPageUrl() }}" rel="prev" class="relative inline-flex items-center px-2 py-2 text-sm font-medium text-gray-500 bg-white border border-gray-300 rounded-l-md leading-5 hover:text-gray-400 focus:z-10 focus:outline-none focus:ring ring-gray-300 focus:border-blue-300 active:bg-gray-100 active:text-gray-500 transition ease-in-out duration-150 dark:bg-gray-800 dark:border-gray-600 dark:active:bg-gray-700 dark:focus:border-blue-800" aria-label="{{ __('pagination.previous') }}">
|
||||
<svg class="w-5 h-5" fill="currentColor" viewBox="0 0 20 20">
|
||||
<path fill-rule="evenodd" d="M12.707 5.293a1 1 0 010 1.414L9.414 10l3.293 3.293a1 1 0 01-1.414 1.414l-4-4a1 1 0 010-1.414l4-4a1 1 0 011.414 0z" clip-rule="evenodd" />
|
||||
</svg>
|
||||
</a>
|
||||
@endif
|
||||
|
||||
{{-- Pagination Elements --}}
|
||||
@foreach ($elements as $element)
|
||||
{{-- "Three Dots" Separator --}}
|
||||
@if (is_string($element))
|
||||
<span aria-disabled="true">
|
||||
<span class="relative inline-flex items-center px-4 py-2 -ml-px text-sm font-medium text-gray-700 bg-white border border-gray-300 cursor-default leading-5 dark:bg-gray-800 dark:border-gray-600">{{ $element }}</span>
|
||||
</span>
|
||||
@endif
|
||||
|
||||
{{-- Array Of Links --}}
|
||||
@if (is_array($element))
|
||||
@foreach ($element as $page => $url)
|
||||
@if ($page == $paginator->currentPage())
|
||||
<span aria-current="page">
|
||||
<span class="relative inline-flex items-center px-4 py-2 -ml-px text-sm font-medium text-gray-500 bg-white border border-gray-300 cursor-default leading-5 dark:bg-gray-800 dark:border-gray-600">{{ $page }}</span>
|
||||
</span>
|
||||
@else
|
||||
<a href="{{ $url }}" class="relative inline-flex items-center px-4 py-2 -ml-px text-sm font-medium text-gray-700 bg-white border border-gray-300 leading-5 hover:text-gray-500 focus:z-10 focus:outline-none focus:ring ring-gray-300 focus:border-blue-300 active:bg-gray-100 active:text-gray-700 transition ease-in-out duration-150 dark:bg-gray-800 dark:border-gray-600 dark:text-gray-400 dark:hover:text-gray-300 dark:active:bg-gray-700 dark:focus:border-blue-800" aria-label="{{ __('Go to page :page', ['page' => $page]) }}">
|
||||
{{ $page }}
|
||||
</a>
|
||||
@endif
|
||||
@endforeach
|
||||
@endif
|
||||
@endforeach
|
||||
|
||||
{{-- Next Page Link --}}
|
||||
@if ($paginator->hasMorePages())
|
||||
<a href="{{ $paginator->nextPageUrl() }}" rel="next" class="relative inline-flex items-center px-2 py-2 -ml-px text-sm font-medium text-gray-500 bg-white border border-gray-300 rounded-r-md leading-5 hover:text-gray-400 focus:z-10 focus:outline-none focus:ring ring-gray-300 focus:border-blue-300 active:bg-gray-100 active:text-gray-500 transition ease-in-out duration-150 dark:bg-gray-800 dark:border-gray-600 dark:active:bg-gray-700 dark:focus:border-blue-800" aria-label="{{ __('pagination.next') }}">
|
||||
<svg class="w-5 h-5" fill="currentColor" viewBox="0 0 20 20">
|
||||
<path fill-rule="evenodd" d="M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z" clip-rule="evenodd" />
|
||||
</svg>
|
||||
</a>
|
||||
@else
|
||||
<span aria-disabled="true" aria-label="{{ __('pagination.next') }}">
|
||||
<span class="relative inline-flex items-center px-2 py-2 -ml-px text-sm font-medium text-gray-500 bg-white border border-gray-300 cursor-default rounded-r-md leading-5 dark:bg-gray-800 dark:border-gray-600" aria-hidden="true">
|
||||
<svg class="w-5 h-5" fill="currentColor" viewBox="0 0 20 20">
|
||||
<path fill-rule="evenodd" d="M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z" clip-rule="evenodd" />
|
||||
</svg>
|
||||
</span>
|
||||
</span>
|
||||
@endif
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
@endif
|
Loading…
Reference in New Issue