diff --git a/app/Enums/OrderStatus.php b/app/Enums/OrderStatus.php index 77ae5cd..90ebf2a 100644 --- a/app/Enums/OrderStatus.php +++ b/app/Enums/OrderStatus.php @@ -4,9 +4,11 @@ namespace App\Enums; enum OrderStatus: string { - case ORDER = 'Order'; +// case ON_HOLD = 'On hold'; case APPROVED = 'Approved'; case PRODUCTION = 'Production'; - case COMPLETED = 'Completed'; - case CANCELLED = 'Cancelled'; +// case COMPLETED = 'Completed'; + case SHIPPED = 'Shipped'; + case INVOICED = 'Invoiced'; +// case CANCELLED = 'Cancelled'; } diff --git a/app/Http/Controllers/CustomerController.php b/app/Http/Controllers/CustomerController.php index 0bc5ee0..5151b87 100644 --- a/app/Http/Controllers/CustomerController.php +++ b/app/Http/Controllers/CustomerController.php @@ -5,25 +5,20 @@ namespace App\Http\Controllers; use App\Http\Requests\CustomerRequest; use App\Models\Customer; use App\Models\PackingSlip; -use App\Models\ShippingEntry; use Illuminate\Http\Request; use Illuminate\Support\Carbon; class CustomerController extends Controller { - public function index(Request $request) + public function index() { - return view('customers.index', [ - 'customers' => Customer::all(), - 'tab' => $request->tab, - ]); } public function store(CustomerRequest $request) { Customer::create($request->validated()); - return redirect()->route('customers.index')->with('status', 'Customer created successfully.'); + return redirect()->route('management.index')->with('status', 'Customer created successfully.'); } public function create() @@ -68,13 +63,13 @@ class CustomerController extends Controller $customer = Customer::find($request->id); $customer->delete(); - return redirect()->route('customers.index')->with('status', 'Customer deleted successfully.'); + return redirect()->route('management.index')->with('status', 'Customer deleted successfully.'); } public function destroy(Customer $customer) { $customer->delete(); - return redirect()->route('customers.index')->with('status', 'Customer deleted successfully.'); + return redirect()->route('management.index')->with('status', 'Customer deleted successfully.'); } } diff --git a/app/Http/Controllers/DashboardController.php b/app/Http/Controllers/DashboardController.php new file mode 100644 index 0000000..a132753 --- /dev/null +++ b/app/Http/Controllers/DashboardController.php @@ -0,0 +1,43 @@ +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() + ]); + } +} diff --git a/app/Http/Controllers/HomeController.php b/app/Http/Controllers/HomeController.php deleted file mode 100644 index 7cbc2c3..0000000 --- a/app/Http/Controllers/HomeController.php +++ /dev/null @@ -1,28 +0,0 @@ -middleware('auth'); - } - - /** - * Show the application dashboard. - * - * @return \Illuminate\Contracts\Support\Renderable - */ - public function index() - { - return view('home'); - } -} diff --git a/app/Http/Controllers/ManagementController.php b/app/Http/Controllers/ManagementController.php new file mode 100644 index 0000000..60fc9c2 --- /dev/null +++ b/app/Http/Controllers/ManagementController.php @@ -0,0 +1,24 @@ +route('management.index', ['tab' => $this->defaultTab]); + } + + return view('management.index', [ + 'customers' => Customer::all(), + 'tab' => $tab, + ]); + } +} diff --git a/app/Http/Controllers/OrderController.php b/app/Http/Controllers/OrderController.php index 5148ec7..064d164 100644 --- a/app/Http/Controllers/OrderController.php +++ b/app/Http/Controllers/OrderController.php @@ -4,15 +4,23 @@ namespace App\Http\Controllers; use App\Enums\OrderStatus; use App\Enums\OrderType; +use App\Http\Requests\OrderRequest; use App\Models\Customer; +use App\Models\Order; use Illuminate\Http\Request; use Illuminate\Support\Carbon; class OrderController extends Controller { - public function index() + public function index(Request $request) { + if (!$request->get('tab')) { + return redirect()->route('orders.index', ['tab' => 'all']); + } + return view('orders.index', [ + 'tab' => $request->get('tab'), + ]); } public function create() @@ -26,12 +34,19 @@ class OrderController extends Controller ]); } - public function store(Request $request) + public function store(OrderRequest $request) { + $order = Order::create($request->validated()); + + return redirect()->route('order-products.create', ['order' => $order->id]); } public function show($id) { + return view('orders.show', [ + 'order' => Order::find($id), + 'tab' => 'details' + ]); } public function edit($id) diff --git a/app/Http/Controllers/OrderProductController.php b/app/Http/Controllers/OrderProductController.php new file mode 100644 index 0000000..56791a8 --- /dev/null +++ b/app/Http/Controllers/OrderProductController.php @@ -0,0 +1,38 @@ + ['required', 'exists:orders'], + 'sku' => ['string', 'nullable'], + 'product_name' => ['required'], + 'color' => ['string', 'nullable'], + ]; + } + + public function authorize(): bool + { + return true; + } +} diff --git a/app/Http/Requests/OrderRequest.php b/app/Http/Requests/OrderRequest.php index 8da7f60..ce491a0 100644 --- a/app/Http/Requests/OrderRequest.php +++ b/app/Http/Requests/OrderRequest.php @@ -9,19 +9,21 @@ class OrderRequest extends FormRequest public function rules(): array { return [ - 'customer_id' => ['required', 'exists:customers'], - 'internal_po' => ['required'], - 'customer_po' => ['required'], + 'customer_id' => ['required', 'exists:customers,id'], + 'contact_id' => ['nullable', 'exists:contacts,id'], +// 'internal_po' => ['required'], + 'customer_po' => ['required', 'string'], + 'order_type' => ['required', 'string'], 'order_date' => ['required', 'date'], 'due_date' => ['required', 'date'], 'status' => ['required'], - 'rush' => ['boolean'], - 'new_art' => ['boolean'], - 'digitizing' => ['boolean'], - 'repeat' => ['boolean'], - 'purchased_garments' => ['boolean'], - 'customer_supplied_file' => ['boolean'], - 'notes' => ['required'], + 'rush' => ['nullable'], + 'new_art' => ['nullable'], + 'digitizing' => ['nullable'], + 'repeat' => ['nullable'], + 'purchased_garments' => ['nullable'], + 'customer_supplied_file' => ['nullable'], + 'notes' => ['nullable'], ]; } diff --git a/app/Http/Requests/ProductServiceRequest.php b/app/Http/Requests/ProductServiceRequest.php new file mode 100644 index 0000000..0b743db --- /dev/null +++ b/app/Http/Requests/ProductServiceRequest.php @@ -0,0 +1,26 @@ + ['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; + } +} diff --git a/app/Http/Requests/ProductSizeRequest.php b/app/Http/Requests/ProductSizeRequest.php new file mode 100644 index 0000000..272716f --- /dev/null +++ b/app/Http/Requests/ProductSizeRequest.php @@ -0,0 +1,22 @@ + ['required', 'exists:order_products'], + 'size' => ['required'], + 'amount' => ['required'], + ]; + } + + public function authorize(): bool + { + return true; + } +} diff --git a/app/Http/Requests/ServiceFileRequest.php b/app/Http/Requests/ServiceFileRequest.php new file mode 100644 index 0000000..f66ae36 --- /dev/null +++ b/app/Http/Requests/ServiceFileRequest.php @@ -0,0 +1,24 @@ + ['required'], + 'name' => ['required'], + 'width' => ['required', 'numeric'], + 'height' => ['required', 'numeric'], + 'unit' => ['required'], + ]; + } + + public function authorize(): bool + { + return true; + } +} diff --git a/app/Livewire/Counter.php b/app/Livewire/Counter.php new file mode 100644 index 0000000..b4ee99c --- /dev/null +++ b/app/Livewire/Counter.php @@ -0,0 +1,25 @@ +count++; + } + + public function decrement() + { + $this->count--; + } + + public function render() + { + return view('livewire.counter'); + } +} diff --git a/app/Livewire/CreateOrder.php b/app/Livewire/CreateOrder.php new file mode 100644 index 0000000..1ce2e9c --- /dev/null +++ b/app/Livewire/CreateOrder.php @@ -0,0 +1,40 @@ +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') + ]); + } +} diff --git a/app/Livewire/CustomerAndContactSelect.php b/app/Livewire/CustomerAndContactSelect.php new file mode 100644 index 0000000..2938dba --- /dev/null +++ b/app/Livewire/CustomerAndContactSelect.php @@ -0,0 +1,41 @@ +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, + ]); + } +} diff --git a/app/Livewire/OrdersTable.php b/app/Livewire/OrdersTable.php new file mode 100644 index 0000000..47429b0 --- /dev/null +++ b/app/Livewire/OrdersTable.php @@ -0,0 +1,55 @@ +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, + ]); + } +} diff --git a/app/Models/Contact.php b/app/Models/Contact.php index 2ae4319..dd92d68 100644 --- a/app/Models/Contact.php +++ b/app/Models/Contact.php @@ -20,6 +20,11 @@ class Contact extends Model 'notes', ]; + public function getFullNameAttribute(): string + { + return $this->first_name . ' ' . $this->last_name; + } + public function customer(): BelongsTo { return $this->belongsTo(Customer::class); diff --git a/app/Models/Order.php b/app/Models/Order.php index cb8ec44..8f12ada 100644 --- a/app/Models/Order.php +++ b/app/Models/Order.php @@ -7,6 +7,7 @@ use DateTimeInterface; 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\SoftDeletes; class Order extends Model @@ -15,9 +16,11 @@ class Order extends Model protected $fillable = [ 'customer_id', + 'contact_id', 'internal_po', 'customer_po', 'order_date', + 'order_type', 'due_date', 'status', 'rush', @@ -30,16 +33,39 @@ class Order extends Model ]; protected $appends = [ - 'active_status' + 'active' ]; - public function getActiveStatus(): bool + public function active(): bool { - if ($this->status === OrderStatus::COMPLETED || $this->status === OrderStatus::CANCELLED) { - return false; + if ($this->status == OrderStatus::APPROVED + || $this->status == OrderStatus::PRODUCTION) { + return true; } - return true; + return false; + } + + public function scopeActive($query) + { + return $query->where('status', 'approved') + ->orWhere('status', 'production'); + } + + public function scopeFinished($query) + { + return $query->where('status', 'shipped') + ->orWhere('status', 'completed'); + } + + public function scopeInvoiced($query) + { + return $query->where('status', 'invoiced'); + } + + public function scopeRush($query) + { + return $query->where('rush', true); } public function customer(): BelongsTo @@ -47,6 +73,11 @@ class Order extends Model return $this->belongsTo(Customer::class); } + public function orderProduct(): HasMany + { + return $this->hasMany(OrderProduct::class); + } + protected function serializeDate(DateTimeInterface $date): string { return $date->format('Y-m-d'); diff --git a/app/Models/OrderProduct.php b/app/Models/OrderProduct.php new file mode 100644 index 0000000..745ac50 --- /dev/null +++ b/app/Models/OrderProduct.php @@ -0,0 +1,42 @@ +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); + } +} diff --git a/app/Models/ProductService.php b/app/Models/ProductService.php new file mode 100644 index 0000000..c351bcf --- /dev/null +++ b/app/Models/ProductService.php @@ -0,0 +1,33 @@ +belongsTo(OrderProduct::class); + } + + public function serviceFile(): HasOne + { + return $this->hasOne(ServiceFile::class); + } +} diff --git a/app/Models/ProductSize.php b/app/Models/ProductSize.php new file mode 100644 index 0000000..51150fa --- /dev/null +++ b/app/Models/ProductSize.php @@ -0,0 +1,24 @@ +belongsTo(OrderProduct::class); + } +} diff --git a/app/Models/ServiceFile.php b/app/Models/ServiceFile.php new file mode 100644 index 0000000..436a6f2 --- /dev/null +++ b/app/Models/ServiceFile.php @@ -0,0 +1,28 @@ +belongsTo(ProductService::class); + } +} diff --git a/composer.json b/composer.json index 7f6cb1b..3b608c3 100644 --- a/composer.json +++ b/composer.json @@ -8,7 +8,8 @@ "php": "^8.2", "davidhsianturi/blade-bootstrap-icons": "^1.5", "laravel/framework": "^11.9", - "laravel/tinker": "^2.9" + "laravel/tinker": "^2.9", + "livewire/livewire": "^3.5" }, "require-dev": { "fakerphp/faker": "^1.23", diff --git a/composer.lock b/composer.lock index da623a1..363f653 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "ecf358f6808ee41e24a7136c4c0cd543", + "content-hash": "cf385c78ac1f239d7823feaf6668a15b", "packages": [ { "name": "blade-ui-kit/blade-icons", @@ -1959,6 +1959,82 @@ ], "time": "2024-01-28T23:22:08+00:00" }, + { + "name": "livewire/livewire", + "version": "v3.5.6", + "source": { + "type": "git", + "url": "https://github.com/livewire/livewire.git", + "reference": "597a2808d8d3001cc3ed5ce89a6ebab00f83b80f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/livewire/livewire/zipball/597a2808d8d3001cc3ed5ce89a6ebab00f83b80f", + "reference": "597a2808d8d3001cc3ed5ce89a6ebab00f83b80f", + "shasum": "" + }, + "require": { + "illuminate/database": "^10.0|^11.0", + "illuminate/routing": "^10.0|^11.0", + "illuminate/support": "^10.0|^11.0", + "illuminate/validation": "^10.0|^11.0", + "laravel/prompts": "^0.1.24", + "league/mime-type-detection": "^1.9", + "php": "^8.1", + "symfony/console": "^6.0|^7.0", + "symfony/http-kernel": "^6.2|^7.0" + }, + "require-dev": { + "calebporzio/sushi": "^2.1", + "laravel/framework": "^10.15.0|^11.0", + "mockery/mockery": "^1.3.1", + "orchestra/testbench": "^8.21.0|^9.0", + "orchestra/testbench-dusk": "^8.24|^9.1", + "phpunit/phpunit": "^10.4", + "psy/psysh": "^0.11.22|^0.12" + }, + "type": "library", + "extra": { + "laravel": { + "providers": [ + "Livewire\\LivewireServiceProvider" + ], + "aliases": { + "Livewire": "Livewire\\Livewire" + } + } + }, + "autoload": { + "files": [ + "src/helpers.php" + ], + "psr-4": { + "Livewire\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Caleb Porzio", + "email": "calebporzio@gmail.com" + } + ], + "description": "A front-end framework for Laravel.", + "support": { + "issues": "https://github.com/livewire/livewire/issues", + "source": "https://github.com/livewire/livewire/tree/v3.5.6" + }, + "funding": [ + { + "url": "https://github.com/livewire", + "type": "github" + } + ], + "time": "2024-08-19T11:52:18+00:00" + }, { "name": "monolog/monolog", "version": "3.7.0", diff --git a/database/factories/OrderFactory.php b/database/factories/OrderFactory.php index 35d8502..b4093ed 100644 --- a/database/factories/OrderFactory.php +++ b/database/factories/OrderFactory.php @@ -3,6 +3,7 @@ namespace Database\Factories; use App\Enums\OrderStatus; +use App\Enums\OrderType; use App\Models\Customer; use App\Models\Order; use Illuminate\Database\Eloquent\Factories\Factory; @@ -14,17 +15,19 @@ class OrderFactory extends Factory public function definition(): array { - $order_date = Carbon::today()->subDays(rand(0, 30)); + $order_date = Carbon::today()->subDays(rand(0, 10)); + $due_date = $order_date->copy()->addDays(rand(9,15)); return [ 'created_at' => Carbon::now(), 'updated_at' => Carbon::now(), 'internal_po' => 'TN' . $this->faker->randomNumber(4, true), 'customer_po' => $this->faker->randomNumber(6, true), + 'order_type' => $this->faker->randomElement(OrderType::cases())->value, 'order_date' => $order_date, - 'due_date' => $order_date->addDays(rand(8, 12)), - 'status' => $this->faker->randomELement(OrderStatus::cases())->value, //todo: setup order status enum - 'rush' => $this->faker->boolean(), + 'due_date' => $due_date, + 'status' => $this->faker->randomELement(OrderStatus::cases())->value, + 'rush' => $this->faker->boolean(10), 'new_art' => $this->faker->boolean(), 'digitizing' => $this->faker->boolean(), 'repeat' => $this->faker->boolean(), diff --git a/database/factories/OrderProductFactory.php b/database/factories/OrderProductFactory.php new file mode 100644 index 0000000..c395073 --- /dev/null +++ b/database/factories/OrderProductFactory.php @@ -0,0 +1,24 @@ + 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']), + ]; + } +} diff --git a/database/factories/ProductServiceFactory.php b/database/factories/ProductServiceFactory.php new file mode 100644 index 0000000..ad7917e --- /dev/null +++ b/database/factories/ProductServiceFactory.php @@ -0,0 +1,27 @@ + 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, + ]; + } +} diff --git a/database/factories/ProductSizeFactory.php b/database/factories/ProductSizeFactory.php new file mode 100644 index 0000000..621b3b3 --- /dev/null +++ b/database/factories/ProductSizeFactory.php @@ -0,0 +1,23 @@ + Carbon::now(), + 'updated_at' => Carbon::now(), + 'size' => $this->faker->randomElement(['xs', 's', 'm', 'l', 'xl', '2xl', '3xl']), + 'amount' => $this->faker->randomNumber(2, false), + ]; + } +} diff --git a/database/factories/ServiceFileFactory.php b/database/factories/ServiceFileFactory.php new file mode 100644 index 0000000..8e464ff --- /dev/null +++ b/database/factories/ServiceFileFactory.php @@ -0,0 +1,25 @@ + 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', + ]; + } +} diff --git a/database/migrations/2024_09_09_194631_create_orders_table.php b/database/migrations/2024_09_09_194631_create_orders_table.php index c36c202..402d283 100644 --- a/database/migrations/2024_09_09_194631_create_orders_table.php +++ b/database/migrations/2024_09_09_194631_create_orders_table.php @@ -11,20 +11,21 @@ return new class extends Migration { { Schema::create('orders', function (Blueprint $table) { $table->id(); - $table->foreignId('customer_id'); - $table->string('internal_po'); + $table->foreignId('customer_id')->constrained(); + $table->foreignId('contact_id')->nullable()->constrained(); + $table->string('internal_po')->nullable(); $table->string('customer_po'); - $table->enum('order_type', OrderType::cases()); + $table->string('order_type'); $table->date('order_date'); $table->date('due_date'); - $table->enum('status', OrderStatus::cases()); + $table->string('status'); $table->boolean('rush')->default(0); $table->boolean('new_art')->default(0); $table->boolean('digitizing')->default(0); $table->boolean('repeat')->default(0); $table->boolean('purchased_garments')->default(0); $table->boolean('customer_supplied_file')->default(0); - $table->longText('notes'); + $table->longText('notes')->nullable(); $table->softDeletes(); $table->timestamps(); }); diff --git a/database/migrations/2024_09_10_224439_create_order_products_table.php b/database/migrations/2024_09_10_224439_create_order_products_table.php new file mode 100644 index 0000000..8edaf9a --- /dev/null +++ b/database/migrations/2024_09_10_224439_create_order_products_table.php @@ -0,0 +1,25 @@ +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'); + } +}; diff --git a/database/migrations/2024_09_10_224947_create_product_services_table.php b/database/migrations/2024_09_10_224947_create_product_services_table.php new file mode 100644 index 0000000..a9d44d6 --- /dev/null +++ b/database/migrations/2024_09_10_224947_create_product_services_table.php @@ -0,0 +1,27 @@ +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'); + } +}; diff --git a/database/migrations/2024_09_10_225029_create_service_files_table.php b/database/migrations/2024_09_10_225029_create_service_files_table.php new file mode 100644 index 0000000..e4ea7f0 --- /dev/null +++ b/database/migrations/2024_09_10_225029_create_service_files_table.php @@ -0,0 +1,29 @@ +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'); + } +}; diff --git a/database/migrations/2024_09_10_230904_create_product_sizes_table.php b/database/migrations/2024_09_10_230904_create_product_sizes_table.php new file mode 100644 index 0000000..00e3e99 --- /dev/null +++ b/database/migrations/2024_09_10_230904_create_product_sizes_table.php @@ -0,0 +1,24 @@ +id(); + $table->foreignId('order_product_id'); + $table->string('size'); + $table->string('amount'); + $table->softDeletes(); + $table->timestamps(); + }); + } + + public function down(): void + { + Schema::dropIfExists('product_sizes'); + } +}; diff --git a/database/seeders/CustomerSeeder.php b/database/seeders/CustomerSeeder.php new file mode 100644 index 0000000..5e5aa92 --- /dev/null +++ b/database/seeders/CustomerSeeder.php @@ -0,0 +1,93 @@ +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(); + } +} diff --git a/database/seeders/DatabaseSeeder.php b/database/seeders/DatabaseSeeder.php index 3293b57..0fa984e 100644 --- a/database/seeders/DatabaseSeeder.php +++ b/database/seeders/DatabaseSeeder.php @@ -21,73 +21,10 @@ class DatabaseSeeder extends Seeder */ public function run(): void { - Customer::factory(9) - ->has(Contact::factory(5)) - ->has(PackingSlip::factory(30)) - ->has(ShippingEntry::factory(2)) - ->create(); + $this->call([ + CustomerSeeder::class, + ]); - 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(); User::factory()->create([ 'name' => 'Test User', diff --git a/resources/views/customers/index.blade.php b/resources/views/customers/index.blade.php deleted file mode 100644 index a9f0430..0000000 --- a/resources/views/customers/index.blade.php +++ /dev/null @@ -1,144 +0,0 @@ -@extends('layouts.app') - -@section('header') -
- - -
-
-
-

-
-
- - -
-
-
- - - -
-
-
- -
-@endsection() - -@section('content') -
-
-
-
- - -
- -
- - -
- -
- - -
-
-
- -
-
- @if(sizeof($customers) !== 0) - - - - - - - - - - - - - - - @foreach($customers as $customer) - - - - - - - - - @endforeach - - -
Company NameInternal NameShipping AddressBilling AddressPhoneView
{{$customer->company_name}} {{$customer->internal_name}} {{$customer->shipping_address}} {{$customer->billing_address}} {{$customer->phone}} - - - -
- - @else() - No customer data. - @endif -
-
-
- - - @include('partials.customers.create-modal') - - - @include('partials.customers.delete-all-modal') - -@endsection diff --git a/resources/views/customers/show.blade.php b/resources/views/customers/show.blade.php index 2cc702b..6f3f989 100644 --- a/resources/views/customers/show.blade.php +++ b/resources/views/customers/show.blade.php @@ -65,28 +65,24 @@ @section('content')
-
- @include('partials.customers.show-overview') + @include('partials.customers.show.overview-tab') - @include('partials.customers.show-shipping-info') + @include('partials.customers.show.shipping-info-tab') - @include('partials.customers.show-packing-slips') + @include('partials.customers.show.packing-slips-tab') - @include('partials.customers.show-contacts') + @include('partials.customers.show.contacts-tab')
- - @include('partials.customers.edit-modal') - @include('partials.customers.delete-single-modal') diff --git a/resources/views/dashboard.blade.php b/resources/views/dashboard.blade.php new file mode 100644 index 0000000..8fff6b1 --- /dev/null +++ b/resources/views/dashboard.blade.php @@ -0,0 +1,57 @@ +@extends('layouts.app') + +@section('header') +
+ + +
+
+
+ {{--

Overview

--}} +
+
+ + +
+
+ +
+
+ +
+@endsection + +@section('content') +
+
+
+
+ + +
+
+
+
+@endsection diff --git a/resources/views/home.blade.php b/resources/views/home.blade.php deleted file mode 100644 index 1f34466..0000000 --- a/resources/views/home.blade.php +++ /dev/null @@ -1,23 +0,0 @@ -@extends('layouts.app') - -@section('content') -
-
-
-
-
{{ __('Dashboard') }}
- -
- @if (session('status')) - - @endif - - {{ __('You are logged in!') }} -
-
-
-
-
-@endsection diff --git a/resources/views/layouts/app.blade.php b/resources/views/layouts/app.blade.php index 1593400..9ef0aae 100644 --- a/resources/views/layouts/app.blade.php +++ b/resources/views/layouts/app.blade.php @@ -15,65 +15,12 @@ @vite(['resources/sass/app.scss', 'resources/js/app.js']) + +{{-- @livewireStyles--}}
- + @include('layouts.nav')
@yield('header') @@ -81,5 +28,6 @@
+{{--@livewireScripts--}} diff --git a/resources/views/layouts/nav.blade.php b/resources/views/layouts/nav.blade.php new file mode 100644 index 0000000..8472126 --- /dev/null +++ b/resources/views/layouts/nav.blade.php @@ -0,0 +1,97 @@ + \ No newline at end of file diff --git a/resources/views/livewire/counter.blade.php b/resources/views/livewire/counter.blade.php new file mode 100644 index 0000000..2107cc7 --- /dev/null +++ b/resources/views/livewire/counter.blade.php @@ -0,0 +1,7 @@ +
+

{{ $count }}

+ + + + +
diff --git a/resources/views/livewire/create-order.blade.php b/resources/views/livewire/create-order.blade.php new file mode 100644 index 0000000..b80e6e0 --- /dev/null +++ b/resources/views/livewire/create-order.blade.php @@ -0,0 +1,3 @@ +
+ +
diff --git a/resources/views/livewire/customer-and-contact-select.blade.php b/resources/views/livewire/customer-and-contact-select.blade.php new file mode 100644 index 0000000..f76b5d0 --- /dev/null +++ b/resources/views/livewire/customer-and-contact-select.blade.php @@ -0,0 +1,43 @@ +
+
+ +
+ + + @error('customer_id') + + {{ $message }} + + @enderror +
+
+ +
+ +
+ @if(isset($contacts)) + + + @error('contact_id') + + {{ $message }} + + @enderror + @endif +
+
+
diff --git a/resources/views/livewire/orders-table.blade.php b/resources/views/livewire/orders-table.blade.php new file mode 100644 index 0000000..93bb7c4 --- /dev/null +++ b/resources/views/livewire/orders-table.blade.php @@ -0,0 +1,111 @@ +
+ +
+
+
+
+

{{$this->title}}

+
+
+ + + Create entry + +
+ +
+ +
+ +
+
+ + +
+
+ +
+ +
+ + +
+
+
+
+ +
+
+ + + + {{-- @if($this->showCustomerColumn)--}} + + {{-- @endif()--}} + + + + + + + + + + + @foreach($orders as $order) + + + + + + + + + + + + + @endforeach + +
CustomerInternal POCustomer POOrder DateDue DateStatusRushView
{{$order->customer->company_name}} + {{$order->internal_po}}{{$order->customer_po}}{{$order->order_date}} + {{$order->due_date}} + @if($order->due_date < $today && $order->active()) + + @endif {{$order->status->value}} + @if($order->rush) + + @endif + + + + +
+
+
+ +
+
+
+ {{$orders->links()}} +
+
+
+ +
diff --git a/resources/views/management/index.blade.php b/resources/views/management/index.blade.php new file mode 100644 index 0000000..7e0a606 --- /dev/null +++ b/resources/views/management/index.blade.php @@ -0,0 +1,27 @@ +@extends('layouts.app') + +@section('header') + @include('partials.management.index.management-tabs') + +@endsection() + +@section('content') +
+
+ + @include('partials.management.index.customers') + + @include('partials.management.index.packing-slips') + + @include('partials.management.index.service-files') + +
+
+ + + @include('partials.customers.index.create-modal') + + + @include('partials.customers.index.delete-all-modal') + +@endsection diff --git a/resources/views/order-products/create.blade.php b/resources/views/order-products/create.blade.php new file mode 100644 index 0000000..2302c00 --- /dev/null +++ b/resources/views/order-products/create.blade.php @@ -0,0 +1,354 @@ +@extends('layouts.app') + + +@section('header') +
+ + +
+
+ + +
+
+ +
+
+
+@endsection + +@section('content') +
+
+
+
+ @csrf + +
+ +
+ + + @error('sku') + + {{ $message }} + + @enderror +
+ + +
+ + + @error('color') + + {{ $message }} + + @enderror +
+
+ +
+ +
+ + + @error('product_name') + + {{ $message }} + + @enderror +
+
+ +
+ +
+
+
XS
+
S
+
M
+
L
+
XL
+
2XL
+
Other
+
Total
+
+
+
+ + @error('size-xs') {{ $message }} @enderror +
+
+ + @error('size-s') {{ $message }} @enderror +
+
+ + @error('size-m') {{ $message }} @enderror +
+
+ + @error('size-l') {{ $message }} @enderror +
+
+ + @error('size-xl') {{ $message }} @enderror +
+
+ + @error('size-2xl') {{ $message }} @enderror +
+
+ + @error('size-other') {{ $message }} @enderror +
+
+ +
+
+
+
+ +
+
+
+ +
+
+
+ +
+ +
+ +
+ + + @error('service_file_name') + + {{ $message }} + + @enderror +
+
+ +
+ +
+ + + @error('service_file_placement') + + {{ $message }} + + @enderror +
+
+ +
+ +
+ +
+
+ +
+
+ +
+
+ +
+
+
+ +
+
+
+ +
+ + + @error('service_file_code') + + {{ $message }} + + @enderror +
+ +
+ + + @error('service_file_width') + + {{ $message }} + + @enderror +
+ +
+ + + @error('service_file_height') + + {{ $message }} + + @enderror +
+ +
+ + + @error('service_file_amount') + + {{ $message }} + + @enderror +
+ +
+
+ +
+
+
+ +
+
+ +
+
+ +
+
+
+ +
+
+
+ + + @error('service_file_setup_amount') + + {{ $message }} + + @enderror +
+ +
+ + + @error('service_file_price') + + {{ $message }} + + @enderror +
+
+ + + @error('service_file_price') + + {{ $message }} + + @enderror +
+
+
+
+ +
+ + @error('contents') + + {{ $message }} + + @enderror +
+
+ +
+ +
+
+
+
+ Back +
+
+ +
+
+ +
+
+
+
+@endsection diff --git a/resources/views/orders/create.blade.php b/resources/views/orders/create.blade.php index 5c1db42..5dab179 100644 --- a/resources/views/orders/create.blade.php +++ b/resources/views/orders/create.blade.php @@ -1,129 +1,200 @@ @extends('layouts.app') + +@section('header') +
+ + +
+
+ + +
+
+ +
+
+
+@endsection + @section('content')
-
-

Create Order

- -
- -
- -
-
- -
- -
- -
-
- -
- -
- -
-
+
+
+ @csrf -
+ -
- -
-
- - -
-
- - -
-
- - +
+ +
+ +
+ + + @error('order_type') + + {{ $message }} + + @enderror
-
- - +
+ +
+ +
+ + + @error('status') + + {{ $message }} + + @enderror
-
-
- - + +
+ +
+ +
+ + + @error('customer_po') + + {{ $message }} + + @enderror
-
- - +
+ +
+ +
+ +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
-
- - +
+
+ + +
+
+ + +
+
+ + +
-
-
+
-
- +
+ -
- +
+ - @error('order_date') - + @error('order_date') + {{ $message }} - @enderror + @enderror +
-
-
- +
+ -
- +
+ - @error('due_date') - + @error('due_date') + {{ $message }} - @enderror + @enderror +
-
-
+
+ +
+ + +
+ -
- -
- + @error('notes') + + {{ $message }} + + @enderror +
-
+
+ +
+
+
+ +
+
+
diff --git a/resources/views/orders/index.blade.php b/resources/views/orders/index.blade.php new file mode 100644 index 0000000..625655d --- /dev/null +++ b/resources/views/orders/index.blade.php @@ -0,0 +1,91 @@ +@extends('layouts.app') + +@section('header') +
+ + +
+
+
+ {{--

Overview

--}} +
+
+ + + +
+@endsection + +@section('content') +
+
+
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+
+
+@endsection diff --git a/resources/views/orders/show.blade.php b/resources/views/orders/show.blade.php new file mode 100644 index 0000000..964d174 --- /dev/null +++ b/resources/views/orders/show.blade.php @@ -0,0 +1,71 @@ +@extends('layouts.app') + +@section('header') +
+ + +
+
+
+ {{--

Overview

--}} +
+
+ + +
+
+ +
+
+
+@endsection + +@section('content') +
+
+
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+
+
+@endsection diff --git a/resources/views/partials/customers/edit-modal.blade.php b/resources/views/partials/customers/edit-modal.blade.php deleted file mode 100644 index 60a9a00..0000000 --- a/resources/views/partials/customers/edit-modal.blade.php +++ /dev/null @@ -1,110 +0,0 @@ - diff --git a/resources/views/partials/customers/create-modal.blade.php b/resources/views/partials/customers/index/create-modal.blade.php similarity index 100% rename from resources/views/partials/customers/create-modal.blade.php rename to resources/views/partials/customers/index/create-modal.blade.php diff --git a/resources/views/partials/customers/delete-all-modal.blade.php b/resources/views/partials/customers/index/delete-all-modal.blade.php similarity index 100% rename from resources/views/partials/customers/delete-all-modal.blade.php rename to resources/views/partials/customers/index/delete-all-modal.blade.php diff --git a/resources/views/partials/customers/show-contacts.blade.php b/resources/views/partials/customers/show/contacts-tab.blade.php similarity index 83% rename from resources/views/partials/customers/show-contacts.blade.php rename to resources/views/partials/customers/show/contacts-tab.blade.php index 60e0ea9..14ab6bb 100644 --- a/resources/views/partials/customers/show-contacts.blade.php +++ b/resources/views/partials/customers/show/contacts-tab.blade.php @@ -36,10 +36,10 @@ @foreach ($contacts as $contact) - {{ $contact->first_name . ' ' . $contact->last_name }} - {{ $contact->email }} - {{ $contact->phone }} - {{ $contact->notes }} + {{ $contact->first_name . ' ' . $contact->last_name }} + {{ $contact->email }} + {{ $contact->phone }} + {{ $contact->notes }} @endforeach diff --git a/resources/views/partials/customers/show-overview.blade.php b/resources/views/partials/customers/show/overview-tab.blade.php similarity index 88% rename from resources/views/partials/customers/show-overview.blade.php rename to resources/views/partials/customers/show/overview-tab.blade.php index ab9d2aa..eb4dac2 100644 --- a/resources/views/partials/customers/show-overview.blade.php +++ b/resources/views/partials/customers/show/overview-tab.blade.php @@ -8,11 +8,11 @@

Active orders

- +
@@ -41,12 +41,12 @@ @foreach($active_orders as $order) - + {{$order->internal_po}} {{$order->customer_po}} {{$order->order_date}} {{$order->due_date}} - {{$order->status->value}} + {{$order->status->value}} @if($order->rush) diff --git a/resources/views/partials/customers/show-packing-slips.blade.php b/resources/views/partials/customers/show/packing-slips-tab.blade.php similarity index 86% rename from resources/views/partials/customers/show-packing-slips.blade.php rename to resources/views/partials/customers/show/packing-slips-tab.blade.php index 396876c..4ea63a4 100644 --- a/resources/views/partials/customers/show-packing-slips.blade.php +++ b/resources/views/partials/customers/show/packing-slips-tab.blade.php @@ -31,7 +31,7 @@
-
+
@@ -44,10 +44,10 @@ @foreach($packingSlips as $packingSlip) - - - - + + + + @endforeach diff --git a/resources/views/partials/customers/show-shipping-info.blade.php b/resources/views/partials/customers/show/shipping-info-tab.blade.php similarity index 100% rename from resources/views/partials/customers/show-shipping-info.blade.php rename to resources/views/partials/customers/show/shipping-info-tab.blade.php diff --git a/resources/views/partials/management/index/customers.blade.php b/resources/views/partials/management/index/customers.blade.php new file mode 100644 index 0000000..bfb7b13 --- /dev/null +++ b/resources/views/partials/management/index/customers.blade.php @@ -0,0 +1,76 @@ +
+
+
+
+ + +
+ +
+ + +
+ +
+ + +
+
+
+ +
+
+ @if(sizeof($customers) !== 0) +
{{$packingSlip->date_received}}{{$packingSlip->order_id}}{{$packingSlip->amount}}{{$packingSlip->contents}}{{$packingSlip->date_received}}{{$packingSlip->order_id}}{{$packingSlip->amount}}{{$packingSlip->contents}}
+ + + + + + + + + + + + + + @foreach($customers as $customer) + + + + + + + + + @endforeach + + +
Company NameInternal NameShipping AddressBilling AddressPhoneView
{{$customer->company_name}} {{$customer->internal_name}} {{$customer->shipping_address}} {{$customer->billing_address}} {{$customer->phone}} + + + +
+ + @else() + No customer data. + @endif +
+
+
\ No newline at end of file diff --git a/resources/views/partials/management/index/management-tabs.blade.php b/resources/views/partials/management/index/management-tabs.blade.php new file mode 100644 index 0000000..82d87a7 --- /dev/null +++ b/resources/views/partials/management/index/management-tabs.blade.php @@ -0,0 +1,43 @@ +
+ + +
+
+
+
+
+ + + +
diff --git a/resources/views/partials/management/index/packing-slips.blade.php b/resources/views/partials/management/index/packing-slips.blade.php new file mode 100644 index 0000000..a249f32 --- /dev/null +++ b/resources/views/partials/management/index/packing-slips.blade.php @@ -0,0 +1,5 @@ +
+ + packing slips +
\ No newline at end of file diff --git a/resources/views/partials/management/index/service-files.blade.php b/resources/views/partials/management/index/service-files.blade.php new file mode 100644 index 0000000..c5da197 --- /dev/null +++ b/resources/views/partials/management/index/service-files.blade.php @@ -0,0 +1,5 @@ +
+ + Files +
diff --git a/resources/views/vendor/pagination/bootstrap-4.blade.php b/resources/views/vendor/pagination/bootstrap-4.blade.php deleted file mode 100644 index 63c6f56..0000000 --- a/resources/views/vendor/pagination/bootstrap-4.blade.php +++ /dev/null @@ -1,46 +0,0 @@ -@if ($paginator->hasPages()) - -@endif diff --git a/resources/views/vendor/pagination/bootstrap-5.blade.php b/resources/views/vendor/pagination/bootstrap-5.blade.php deleted file mode 100644 index a1795a4..0000000 --- a/resources/views/vendor/pagination/bootstrap-5.blade.php +++ /dev/null @@ -1,88 +0,0 @@ -@if ($paginator->hasPages()) - -@endif diff --git a/resources/views/vendor/pagination/default.blade.php b/resources/views/vendor/pagination/default.blade.php deleted file mode 100644 index 0db70b5..0000000 --- a/resources/views/vendor/pagination/default.blade.php +++ /dev/null @@ -1,46 +0,0 @@ -@if ($paginator->hasPages()) - -@endif diff --git a/resources/views/vendor/pagination/semantic-ui.blade.php b/resources/views/vendor/pagination/semantic-ui.blade.php deleted file mode 100644 index ef0dbb1..0000000 --- a/resources/views/vendor/pagination/semantic-ui.blade.php +++ /dev/null @@ -1,36 +0,0 @@ -@if ($paginator->hasPages()) - -@endif diff --git a/resources/views/vendor/pagination/simple-bootstrap-4.blade.php b/resources/views/vendor/pagination/simple-bootstrap-4.blade.php deleted file mode 100644 index 4bb4917..0000000 --- a/resources/views/vendor/pagination/simple-bootstrap-4.blade.php +++ /dev/null @@ -1,27 +0,0 @@ -@if ($paginator->hasPages()) - -@endif diff --git a/resources/views/vendor/pagination/simple-bootstrap-5.blade.php b/resources/views/vendor/pagination/simple-bootstrap-5.blade.php deleted file mode 100644 index a89005e..0000000 --- a/resources/views/vendor/pagination/simple-bootstrap-5.blade.php +++ /dev/null @@ -1,29 +0,0 @@ -@if ($paginator->hasPages()) - -@endif diff --git a/resources/views/vendor/pagination/simple-default.blade.php b/resources/views/vendor/pagination/simple-default.blade.php deleted file mode 100644 index 36bdbc1..0000000 --- a/resources/views/vendor/pagination/simple-default.blade.php +++ /dev/null @@ -1,19 +0,0 @@ -@if ($paginator->hasPages()) - -@endif diff --git a/resources/views/vendor/pagination/simple-tailwind.blade.php b/resources/views/vendor/pagination/simple-tailwind.blade.php deleted file mode 100644 index ea02400..0000000 --- a/resources/views/vendor/pagination/simple-tailwind.blade.php +++ /dev/null @@ -1,25 +0,0 @@ -@if ($paginator->hasPages()) - -@endif diff --git a/resources/views/vendor/pagination/tailwind.blade.php b/resources/views/vendor/pagination/tailwind.blade.php deleted file mode 100644 index aee2ad2..0000000 --- a/resources/views/vendor/pagination/tailwind.blade.php +++ /dev/null @@ -1,106 +0,0 @@ -@if ($paginator->hasPages()) - -@endif diff --git a/routes/web.php b/routes/web.php index c3f8633..a9f6ab6 100644 --- a/routes/web.php +++ b/routes/web.php @@ -2,26 +2,33 @@ use App\Http\Controllers\ContactController; use App\Http\Controllers\CustomerController; +use App\Http\Controllers\DashboardController; +use App\Http\Controllers\ManagementController; use App\Http\Controllers\OrderController; +use App\Http\Controllers\OrderProductController; use App\Http\Controllers\PackingSlipController; use App\Http\Controllers\ShippingEntryController; -use App\Models\ShippingEntry; use Illuminate\Support\Facades\Route; Route::get('/', function () { - return view('welcome'); + return redirect()->route('dashboard'); }); Auth::routes(); -Route::get('/home', [App\Http\Controllers\HomeController::class, 'index'])->name('home'); +Route::get('/dashboard', [DashboardController::class, 'index'])->name('dashboard'); -Route::resource('customers', CustomerController::class); +Route::get('/management/{tab?}', [ManagementController::class, 'index'])->name('management.index'); +// Customers +Route::resource('customers', CustomerController::class); Route::get('/customers/{customer}/{tab}', [CustomerController::class, 'show'])->name('customers.show'); -Route::get('/customers/', [CustomerController::class, 'index'])->name('customers.index'); Route::post('/customers/request-destroy', [CustomerController::class, 'requestDestroy'])->name('customers.requestDestroy'); +// OrderProducts +Route::resource('order-products', OrderProductController::class); + +// Contacts Route::resource('contacts', ContactController::class); Route::post('/contacts/request-destroy', [ContactController::class, 'requestDestroy'])->name('contacts.requestDestroy');