92 Commits
Author SHA1 Message Date
iridium34 b1e2ab8978 Add Filaments module with Seeder, update Calculator UI for filament selection, and upgrade dependencies for Livewire Flux 2026-01-25 11:49:17 +01:00
iridium34 ec37f6b421 Add seeders for Calculationpresets and Printertypes, and register them in DatabaseSeeder 2026-01-25 08:06:00 +01:00
iridium34 0356063015 Add Calculationpresets and Calculator modules with CRUD functionality, migrations, and UI components. 2026-01-24 13:23:03 +01:00
iridium34 fd61f14ffe Add Printers and Printertypes modules with CRUD functionality, migrations, and UI components. 2026-01-24 11:23:37 +01:00
iridium34 563b0e750e Add Spareparts module with CRUD functionality and UI components. 2026-01-24 10:15:45 +01:00
iridium34 af0cf8bed9 - Add CSP headers in guest.blade.php for enhanced security.
- Update Vite config with proper server settings, including CORS configuration for `ddev.site` domains.
- Upgrade dependencies in `package-lock.json`, including versions for Rollup and TailwindCSS packages.
2026-01-21 04:25:01 +01:00
iridium34 c7671b93b1 Refactored Filament Livewire components and views. Introduced separate CreateFilament component with route-based navigation. Simplified and cleaned up code by removing legacy modals and unused properties. Updated migrations, table layouts, and styles for consistency. 2025-12-15 01:20:04 +01:00
iridium34 4759df9077 Added Extruder Livewire components with Create, Edit, Show, and Index. Introduced corresponding routes, views, and navigation updates. Enhanced Buildplate and Manufacturer views for improved linking and consistency. 2025-12-14 04:33:55 +01:00
iridium34 95f0154235 Refactored Manufacturer and Buildplate Livewire components. Introduced create, edit, and show components with route-based navigation. Updated views for consistency and cleaned up unused modals and legacy code. Adjusted styles and table layouts. 2025-12-14 02:30:52 +01:00
iridium34 ac812ed142 Refactored Color Livewire components, added CreateColor, EditColor, and ShowColor components. Updated views, navigation, and Tailwind color schemes. Adjusted database migrations for consistency. 2025-12-14 01:39:16 +01:00
iridium34 7e79d1d034 Renamed and reorganized Livewire components, namespaces, and views for improved file structure and clarity. Introduced filaments.show and filaments.edit routes. Updated database migrations and navigation routes accordingly. Upgraded dependencies in composer. 2025-12-13 03:10:31 +01:00
iridium34 85b97ed3b1 Removed all controller and view files related to Colors, Filaments, Filament Types, and Manufacturers. 2025-12-12 03:14:07 +01:00
iridium34 3d209903f9 Merge remote-tracking branch 'origin/laravel-12' into laravel-12 2025-12-12 00:35:18 +01:00
iridium34 f464f3940b Expanded and reorganized README with detailed setup, stack, and environment information. 2025-12-12 00:34:57 +01:00
iridium34 395bde3fdd Added Color Variation Jet 400 - 950 2025-11-18 23:51:19 +01:00
iridium34 4dbf69b68f Updated composer.json 2025-11-18 23:44:27 +01:00
iridium34 75800bf6cc Updated Color scheme 2025-11-18 01:40:29 +01:00
iridium34 34bea2b44f Updated Color scheme 2025-11-11 19:29:44 +01:00
iridium34 d96c1c335f Updated tailwindcss 2025-11-10 21:22:31 +01:00
iridium34 e9eb86c30a Updated Buildplate Forms 2025-11-10 21:12:26 +01:00
iridium34 d306b5af84 Updated Buildplate Forms 2025-11-10 21:00:56 +01:00
iridium34 1e951c5109 Updated Buildplate Forms 2025-11-10 20:40:28 +01:00
iridium34 4594853fd2 updated Buildplate View 2025-09-07 12:18:42 +02:00
iridium34 902ffeb0ae created Buildplate View & Route 2025-09-07 11:49:02 +02:00
iridium34 d251a2265a created BuildplateSeeder 2025-09-07 11:41:59 +02:00
iridium34 a92d1f0466 adjusted orders blade 2025-04-23 17:05:59 +02:00
iridium34 9def3cae3e created basic Order Page 2025-04-23 16:38:55 +02:00
iridium34 bd75ace0c6 created Oder Model 2025-04-23 16:29:39 +02:00
iridium34 995f61632b created OrderStatus Model, Table & Seeder 2025-04-23 16:28:02 +02:00
iridium34 71f3a01ed2 adjusted Dashboard 2025-04-23 15:48:00 +02:00
iridium34 dd5892292b created Settings Page 2025-04-23 15:42:46 +02:00
iridium34 b2ac0db2de fixed create filament 2025-04-22 19:50:15 +02:00
iridium34 1f10d68542 fixed filament.blade.php 2025-04-22 19:25:54 +02:00
iridium34 cf81ce810b created Filament View with Livewire 2025-04-22 18:45:56 +02:00
iridium34 77b1b85f1e changed hierachy 2025-04-22 17:51:25 +02:00
iridium34 db33f9db49 createt Manufacturer Livewire Component 2025-04-22 17:50:32 +02:00
iridium34 6160ce6edd fixed Color & Type View and Tables 2025-04-22 17:48:38 +02:00
iridium34 07114a53c6 changed colorset 2025-04-22 15:02:23 +02:00
iridium34 98bd3ec660 reworked and recolored Table Component 2025-03-17 01:36:38 +01:00
iridium34 c642a437da fixed footer text opacity 2025-03-16 02:58:27 +01:00
iridium34 003e600a38 fixed editing and deleting of colors 2025-03-16 02:54:42 +01:00
iridium34 820058dab0 created color search function 2025-03-16 02:11:38 +01:00
iridium34 9b3913b68c fixed Database Error while creating new color 2025-03-16 01:33:15 +01:00
iridium34 990630ab2e published pagination from livewire 2025-03-16 00:47:40 +01:00
iridium34 4af3ba628c adjusted footer padding 2025-03-16 00:42:53 +01:00
iridium34 2f19be09de refactored header.blade 2025-03-16 00:41:01 +01:00
iridium34 78e7338aa8 added modal compatibility 2025-03-15 23:17:40 +01:00
iridium34 2e7f484eba changed livewire component names 2025-03-15 23:16:46 +01:00
iridium34 82b63aa682 fixed routing 2025-03-15 22:57:33 +01:00
Iridium34 dba15d99aa Merge branch 'LivewireViews' into 'laravel-12'
changed app.blade.php

See merge request iridium34/FilamentLaravel!6
2025-03-15 21:54:41 +00:00
Iridium34 5f2ce420c5 Merge branch 'laravel-12' into 'LivewireViews'
# Conflicts:
#   resources/views/components/footer.blade.php
#   resources/views/components/layouts/app.blade.php
#   routes/web.php
2025-03-15 21:54:38 +00:00
iridium34 7f877abf1d Merge branch 'laravel-12' of http://gitlab.aridia.nl/iridium34/FilamentLaravel into laravel-12 2025-03-15 22:51:29 +01:00
iridium34 efb3f34415 changed app.blade.php 2025-03-15 21:08:18 +01:00
Iridium34 05f2ac7edb Merge branch 'DBextention' into 'laravel-12'
Dbextention

See merge request iridium34/FilamentLaravel!5
2025-03-15 19:19:57 +00:00
iridium34 41d9cc6101 fixed migration order 2025-03-15 20:17:23 +01:00
iridium34 fd09629a9f updated migrations with foreign relations 2025-03-15 20:12:59 +01:00
iridium34 e653fbf5fa Updated migrations 2025-03-15 20:05:27 +01:00
iridium34 e9b18c94fc Updated Filament Model 2025-03-15 19:50:53 +01:00
iridium34 d925df623a created Buildplate & Extruder Model 2025-03-15 19:48:37 +01:00
iridium34 a461a23c4b created Seeder for initial Database 2025-03-15 19:21:46 +01:00
iridium34 4c775a1d70 Changed colors.index to Livewire 2025-03-15 03:01:59 +01:00
iridium34 07cd4a5a10 Database Seeder 2025-03-15 01:27:10 +01:00
iridium34 1104d4b82a updated filaments.index 2025-03-11 12:43:34 +01:00
iridium34 5d0784093a changed store & update function in FilamentController for implementation of stocks 2025-03-11 12:27:48 +01:00
iridium34 cbfe637f84 added filamentstock in filaments 2025-03-11 12:23:46 +01:00
iridium34 bca04897da hide unused icons 2025-03-11 12:15:32 +01:00
iridium34 4619da3d1a updated Dashboard -> Filament_count 2025-03-10 23:09:04 +01:00
iridium34 be19ec16d3 updated manufacturer.index 2025-03-10 23:06:06 +01:00
iridium34 91629594cf fixed preselected values 2025-03-10 22:47:31 +01:00
iridium34 c4d7410719 created FilamentCount per Manufacturer 2025-03-10 22:39:15 +01:00
iridium34 9cbcddcb6b Updated Dashboard 2025-03-10 22:17:20 +01:00
iridium34 6a199c3a3c Created FilamentController & Filament Model + Views 2025-03-10 21:47:57 +01:00
iridium34 fbf0a3b6ca UserSeeder 2025-03-10 20:26:08 +01:00
iridium34 e980c6978a Updated Colors.index 2025-03-10 20:13:50 +01:00
iridium34 9826f89806 Added ColorController & Views 2025-03-10 20:02:13 +01:00
iridium34 d8f429385d Fixed Headline 2025-03-10 19:57:10 +01:00
iridium34 0fc10a1fa5 removed old Navbar 2025-03-10 19:48:54 +01:00
iridium34 46ed1d7b7d Update Filaments.index 2025-03-10 19:47:25 +01:00
iridium34 7c5a6a5b84 new Migrations 2025-03-10 19:46:43 +01:00
iridium34 05442e6ad4 Created Manufacturer Model 2025-03-10 19:40:44 +01:00
iridium34 2579d87f36 Updated FilamentType Model 2025-03-10 19:38:23 +01:00
iridium34 271e36823d Created Filament Model 2025-03-10 19:37:59 +01:00
iridium34 4f5e44f753 Created Color Model 2025-03-10 19:37:44 +01:00
iridium34 21f33383ae Created FilamentTypeController & FilamentType Model 2025-03-10 19:28:46 +01:00
iridium34 9fd01ee43a updated headerbar with headeraction option 2025-03-10 16:14:49 +01:00
iridium34 df43c77f87 changed to Flux Headerbar 2025-03-10 15:56:05 +01:00
iridium34 180e144386 integrated livewire/flux 2025-03-10 15:20:37 +01:00
iridium34 3d44fb1070 installes livewire/flux 2025-03-10 15:11:51 +01:00
iridium34 9466fe6fe9 updated to livewire 3 2025-03-10 15:10:41 +01:00
iridium34 14786d2798 updated to tailwind 4.0 2025-03-10 15:07:35 +01:00
iridium34 a9326a490b Install jetstream 2025-03-10 15:07:11 +01:00
iridium34 a8d5d57f6f Initial Install Laravel 12 2025-03-10 13:58:05 +01:00
227 changed files with 10851 additions and 5964 deletions
View File
+2 -3
View File
@@ -2,7 +2,6 @@ APP_NAME=Laravel
APP_ENV=local APP_ENV=local
APP_KEY= APP_KEY=
APP_DEBUG=true APP_DEBUG=true
APP_TIMEZONE=UTC
APP_URL=http://localhost APP_URL=http://localhost
APP_LOCALE=en APP_LOCALE=en
@@ -24,7 +23,7 @@ LOG_LEVEL=debug
DB_CONNECTION=sqlite DB_CONNECTION=sqlite
# DB_HOST=127.0.0.1 # DB_HOST=127.0.0.1
# DB_PORT=3306 # DB_PORT=3306
# DB_DATABASE=laravel # DB_DATABASE=filamentlaravel
# DB_USERNAME=root # DB_USERNAME=root
# DB_PASSWORD= # DB_PASSWORD=
@@ -39,7 +38,7 @@ FILESYSTEM_DISK=local
QUEUE_CONNECTION=database QUEUE_CONNECTION=database
CACHE_STORE=database CACHE_STORE=database
CACHE_PREFIX= # CACHE_PREFIX=
MEMCACHED_HOST=127.0.0.1 MEMCACHED_HOST=127.0.0.1
-2193
View File
File diff suppressed because it is too large Load Diff
+150 -44
View File
@@ -1,66 +1,172 @@
<p align="center"><a href="https://laravel.com" target="_blank"><img src="https://raw.githubusercontent.com/laravel/art/master/logo-lockup/5%20SVG/2%20CMYK/1%20Full%20Color/laravel-logolockup-cmyk-red.svg" width="400" alt="Laravel Logo"></a></p> # FilamentLaravel
<p align="center"> A Laravel 12 application scaffolded with Jetstream and Livewire, built with Vite and Tailwind CSS. This repo includes common localdev conveniences (concurrent processes for PHP server, queue worker, logs, and Vite) and a modern testing setup using Pest.
<a href="https://github.com/laravel/framework/actions"><img src="https://github.com/laravel/framework/workflows/tests/badge.svg" alt="Build Status"></a>
<a href="https://packagist.org/packages/laravel/framework"><img src="https://img.shields.io/packagist/dt/laravel/framework" alt="Total Downloads"></a>
<a href="https://packagist.org/packages/laravel/framework"><img src="https://img.shields.io/packagist/v/laravel/framework" alt="Latest Stable Version"></a>
<a href="https://packagist.org/packages/laravel/framework"><img src="https://img.shields.io/packagist/l/laravel/framework" alt="License"></a>
</p>
## About Laravel If youre new to this codebase, this README helps you get it running locally and understand where things live.
Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experience to be truly fulfilling. Laravel takes the pain out of development by easing common tasks used in many web projects, such as: > Note: The project name in `.env` is `APP_NAME=FilamentApp`. The repository name is `FilamentLaravel`.
- [Simple, fast routing engine](https://laravel.com/docs/routing). ## Stack
- [Powerful dependency injection container](https://laravel.com/docs/container).
- Multiple back-ends for [session](https://laravel.com/docs/session) and [cache](https://laravel.com/docs/cache) storage.
- Expressive, intuitive [database ORM](https://laravel.com/docs/eloquent).
- Database agnostic [schema migrations](https://laravel.com/docs/migrations).
- [Robust background job processing](https://laravel.com/docs/queues).
- [Real-time event broadcasting](https://laravel.com/docs/broadcasting).
Laravel is accessible, powerful, and provides tools required for large, robust applications. - Language: PHP ^8.2
- Framework: Laravel ^12.0
- Jetstream ^5.3
- Sanctum ^4.0
- Livewire ^3.x and Livewire Flux ^2.x
- Frontend tooling: Vite ^6, Tailwind CSS ^4, PostCSS
- Package managers: Composer (PHP), npm (Node)
- Testing: Pest ^3 (with PHPUnit under the hood)
## Learning Laravel ## Requirements
Laravel has the most extensive and thorough [documentation](https://laravel.com/docs) and video tutorial library of all modern web application frameworks, making it a breeze to get started with the framework. - PHP 8.2+
- Composer 2.x
- Node.js 18+ and npm 9+
- A database (MySQL/MariaDB). Defaults from `.env`:
- `DB_HOST=127.0.0.1`, `DB_PORT=3306`, `DB_DATABASE=filamentlaravel`, `DB_USERNAME=root`, `DB_PASSWORD=ServBay.dev`
- Optional services depending on features you use:
- Redis (default client configured: `phpredis`)
- Mail catcher or SMTP server (defaults to `MAIL_MAILER=log`)
You may also try the [Laravel Bootcamp](https://bootcamp.laravel.com), where you will be guided through building a modern Laravel application from scratch. ## Quick start
If you don't feel like reading, [Laracasts](https://laracasts.com) can help. Laracasts contains thousands of video tutorials on a range of topics including Laravel, modern PHP, unit testing, and JavaScript. Boost your skills by digging into our comprehensive video library. 1. Clone and install dependencies
```bash
git clone <your-fork-or-repo-url>
cd FilamentLaravel
composer install
npm install
```
2. Configure environment
```bash
cp .env.example .env # if .env doesnt exist
php artisan key:generate
```
- Update `.env` database credentials as needed.
- Ensure `SESSION_DRIVER=database` (already set) and run migrations (next step) to create the sessions table.
3. Create database and run migrations
```bash
php artisan migrate
```
4. Run the app (all-in-one dev experience)
```bash
composer run dev
```
This starts:
- `php artisan serve` (Laravel app)
- `php artisan queue:listen --tries=1` (queue worker)
- `php artisan pail --timeout=0` (pretty app logs)
- `npm run dev` (Vite)
## Laravel Sponsors Or run them individually:
```bash
php artisan serve
npm run dev
```
We would like to extend our thanks to the following sponsors for funding Laravel development. If you are interested in becoming a sponsor, please visit the [Laravel Partners program](https://partners.laravel.com). 5. Visit the app at the URL shown by `php artisan serve` (defaults to `http://127.0.0.1:8000`). You can also set `APP_URL` in `.env`.
### Premium Partners ## Scripts
- **[Vehikl](https://vehikl.com/)** - Composer
- **[Tighten Co.](https://tighten.co)** - `composer run dev` — concurrently run server, queue worker, logs, and Vite
- **[WebReinvent](https://webreinvent.com/)** - npm
- **[Kirschbaum Development Group](https://kirschbaumdevelopment.com)** - `npm run dev` — start Vite in dev mode
- **[64 Robots](https://64robots.com)** - `npm run build` — build frontend assets for production
- **[Curotec](https://www.curotec.com/services/technologies/laravel/)**
- **[Cyber-Duck](https://cyber-duck.co.uk)**
- **[DevSquad](https://devsquad.com/hire-laravel-developers)**
- **[Jump24](https://jump24.co.uk)**
- **[Redberry](https://redberry.international/laravel/)**
- **[Active Logic](https://activelogic.com)**
- **[byte5](https://byte5.de)**
- **[OP.GG](https://op.gg)**
## Contributing ## Environment variables
Thank you for considering contributing to the Laravel framework! The contribution guide can be found in the [Laravel documentation](https://laravel.com/docs/contributions). See `.env` for all variables. Common ones:
## Code of Conduct - Application
- `APP_NAME` (default: `FilamentApp`)
- `APP_ENV` (`local`, `production`, ...)
- `APP_DEBUG` (true/false)
- `APP_URL` (default: `http://localhost`)
- `APP_LOCALE`, `APP_FALLBACK_LOCALE`
- Logging
- `LOG_CHANNEL` (default: `stack`), `LOG_LEVEL`
- Database (MySQL by default)
- `DB_CONNECTION`, `DB_HOST`, `DB_PORT`, `DB_DATABASE`, `DB_USERNAME`, `DB_PASSWORD`
- Cache/Queue/Session
- `CACHE_STORE=database`
- `QUEUE_CONNECTION=database`
- `SESSION_DRIVER=database`, `SESSION_LIFETIME`
- Redis
- `REDIS_CLIENT=phpredis`, `REDIS_HOST`, `REDIS_PORT`
- Mail
- `MAIL_MAILER=log`, `MAIL_HOST`, `MAIL_PORT`, `MAIL_USERNAME`, `MAIL_PASSWORD`, `MAIL_FROM_*`
- AWS (only if you enable S3, etc.)
- `AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY`, `AWS_DEFAULT_REGION`, `AWS_BUCKET`
- Vite
- `VITE_APP_NAME` (default mirrors `APP_NAME`)
In order to ensure that the Laravel community is welcoming to all, please review and abide by the [Code of Conduct](https://laravel.com/docs/contributions#code-of-conduct). ## Project structure (selected)
## Security Vulnerabilities - `app/` — application code (models, controllers, policies, jobs, etc.)
- `bootstrap/` — framework bootstrap files
- `config/` — application configuration
- `database/` — migrations, factories, seeders
- `public/` — public web root (entry: `public/index.php`)
- `resources/` — Blade views, CSS, JS
- `resources/css/app.css` — Tailwind entry
- `resources/js/app.js` — JS entry (referenced by Vite)
- `resources/views/...` — Blade templates (includes Livewire components)
- `routes/`
- `web.php` — web routes
- `api.php` — API routes
- `tests/` — test suite (Pest)
- `vite.config.js` — Vite configuration
- `artisan` — Laravel CLI
- `composer.json` / `package.json` — dependencies and scripts
If you discover a security vulnerability within Laravel, please send an e-mail to Taylor Otwell via [taylor@laravel.com](mailto:taylor@laravel.com). All security vulnerabilities will be promptly addressed. ## Development notes
- Vite HMR refresh is enabled via `laravel-vite-plugin` with inputs `resources/css/app.css` and `resources/js/app.js`.
- Sessions, cache, and queue default to database-backed stores. Ensure migrations are run.
- Jetstream is installed. The chosen Jetstream stack (Livewire vs Inertia) isnt explicitly declared here — Livewire is present. See `composer.json` and `resources/views` for details.
## Testing
Run the test suite:
```bash
php artisan test
# or
./vendor/bin/pest
```
You can create tests under `tests/` using Pests syntax.
## Deployment
- Build frontend assets:
```bash
npm run build
```
- Ensure `APP_ENV=production`, `APP_DEBUG=false`, correct `APP_URL`, and proper cache/queue/mail configurations.
- Run database migrations on deploy:
```bash
php artisan migrate --force
```
### Docker (optional)
Laravel Sail is included as a dev dependency. If you prefer Docker, you can set up Sail. This repository does not include a prepared Sail config in this README.
## Entry points
- HTTP: `public/index.php` (served via the web server or `php artisan serve`)
- CLI: `artisan`
- Frontend dev server: `npm run dev` (Vite)
## TODOs / Unknowns
- Production deployment target and steps (server, PaaS, container registry) — TODO
- Domain and HTTPS/TLS configuration — TODO
- Mail provider and credentials for nonlog mailers — TODO
- Storage driver(s) for user uploads (local vs S3) — TODO
- Background jobs in production (e.g., Supervisor, Horizon) — TODO
- Any seeded demo data or default admin user — TODO
## License ## License
The Laravel framework is open-sourced software licensed under the [MIT license](https://opensource.org/licenses/MIT). This project is open-sourced software licensed under the MIT license. See `composer.json` for the declared license.
+37
View File
@@ -0,0 +1,37 @@
<?php
namespace App\Livewire\Buildplate;
use App\Models\Buildplate as BuildplateModel;
use App\Models\Manufacturer as Manufacturer;
use Livewire\Attributes\Title;
use Livewire\Component;
use Livewire\WithPagination;
#[title('Buildplates')]
class Buildplate extends Component
{
use WithPagination;
public $search ='';
public function create(){
return $this->redirectRoute('buildplate.create', navigate: true);
}
public function edit($id){
return $this->redirectRoute('buildplate.edit', $id, navigate: true);
}
public function show($id){
return $this->redirectRoute('buildplate.show', $id, navigate: true);
}
public function delete($id){
BuildplateModel::destroy($id);
}
public function render()
{
return view('livewire.buildplate.index', [
'buildplates' => BuildplateModel::search('name', $this->search)->paginate(10),
]);
}
}
@@ -0,0 +1,43 @@
<?php
namespace App\Livewire\Buildplate;
use App\Models\Buildplate as Model;
use Livewire\Attributes\Title;
use Livewire\Attributes\Validate;
use Livewire\Component;
#[title('Buildplates')]
class CreateBuildplate extends Component
{
public Model $buildplate ;
public string $name = '';
public string $description = '';
public int $manufacturer_id = 0;
public string $temp_max = '';
#[Validate('required')]
public function save(){
$this->validate([
'name' => ['required', 'string', 'max:255'],
'description' => ['nullable', 'string', 'max:255'],
'manufacturer_id' => ['required', 'integer'],
'temp_max' => ['required', 'integer']
]);
$buildplate = new Model();
$buildplate->name = $this->name;
$buildplate->description = $this->description;
$buildplate->manufacturer_id = $this->manufacturer_id;
$buildplate->temp_max = $this->temp_max;
$buildplate->save();
return $this->redirectRoute('buildplate.show', $buildplate->id , navigate: true);
}
public function render()
{
return view('livewire.buildplate.create', [
]);
}
}
@@ -0,0 +1,51 @@
<?php
namespace App\Livewire\Buildplate;
use App\Models\Buildplate as Model;
use Livewire\Attributes\Title;
use Livewire\Component;
#[title('Buildplates')]
class EditBuildplate extends Component
{
public Model $buildplate ;
public string $name = '';
public string $description = '';
public int $manufacturer_id = 0;
public string $temp_max = '';
public function mount(Model $buildplate){
$this->buildplate = $buildplate;
$this->name = $buildplate->name;
$this->description = $buildplate->description;
$this->manufacturer_id = $buildplate->manufacturer_id;
$this->temp_max = $buildplate->temp_max;
}
public function save(){
$this->validate([
'name' => ['required', 'string', 'max:255'],
'description' => ['nullable', 'string', 'max:255'],
'manufacturer_id' => ['required', 'integer'],
'temp_max' => ['required', 'integer']
]);
$this->buildplate->update([
'name' => $this->name,
'description' => $this->description,
'manufacturer_id' => $this->manufacturer_id,
'temp_max' => $this->temp_max
]);
return $this->redirectRoute('livewire.buildplate.show', $this->buildplate->id, navigate: true);
}
public function cancel(){
return $this->redirectRoute('buildplate.index', navigate: true);
}
public function render()
{
return view('livewire.buildplate.edit', [
]);
}
}
@@ -0,0 +1,27 @@
<?php
namespace App\Livewire\Buildplate;
use App\Models\Buildplate as Model;
use Livewire\Attributes\Title;
use Livewire\Component;
#[title('Buildplates')]
class ShowBuildplate extends Component
{
public Model $buildplate ;
public function back(){
return $this->redirectRoute('buildplate.index', navigate: true);
}
public function edit($id){
return $this->redirectRoute('buildplate.edit', $id, navigate: true);
}
public function render()
{
return view('livewire.buildplate.show', [
]);
}
}
@@ -0,0 +1,43 @@
<?php
namespace App\Livewire\Calculationpreset;
use Illuminate\Support\Facades\Auth;
use Livewire\Component;
use App\Models\Calculationpreset as Model;
use Livewire\WithPagination;
use Livewire\Attributes\title;
#[title('Calculationpreset')]
class Calculationpreset extends Component
{
use WithPagination;
public Model $calculationpreset ;
public $search = '';
public function create(){
return $this->redirectRoute('calculationpresets.create', navigate: true);
}
public function show($id){
return $this->redirectRoute('calculationpresets.show', $id);
}
public function edit($id){
return $this->redirectRoute('calculationpresets.edit', $id);
}
public function delete($id){
@Auth::check();
Model::destroy($id);
}
public function render()
{
return view('livewire.calculationpreset.index', [
'calculationpresets' => Model::search('name', $this->search)->paginate(25)
]);
}
}
@@ -0,0 +1,55 @@
<?php
namespace App\Livewire\Calculationpreset;
use Livewire\Attributes\Validate;
use Livewire\Component;
use App\Models\Calculationpreset as Model;
use Livewire\Attributes\title;
#[title('Create Calculationpreset')]
class CreateCalculationpreset extends Component
{
public Model $calculationpreset ;
public string $name = '';
public string $description = '';
public float $price_kwh = 0;
public float $factor_printer = 0;
public float $factor_maintenance = 0;
public float $factor_price = 0;
#[Validate('required')]
public function save(){
$this->validate([
'name' => ['required', 'string', 'max:255'],
'description' => ['nullable', 'string', 'max:255'],
'price_kwh' => ['required', 'numeric'],
'factor_printer' => ['nullable', 'numeric'],
'factor_maintenance' => ['nullable', 'numeric'],
'factor_price' => ['nullable', 'numeric']
]);
$calculationpreset = new Model();
$calculationpreset->name = $this->name;
$calculationpreset->description = $this->description;
$calculationpreset->price_kwh = $this->price_kwh;
$calculationpreset->factor_printer = $this->factor_printer;
$calculationpreset->factor_maintenance = $this->factor_maintenance;
$calculationpreset->factor_price = $this->factor_price;
$calculationpreset->save();
return $this->redirectRoute('calculationpresets.show', $calculationpreset->id, navigate: true);
}
public function cancel(){
return $this->redirectRoute('calculationpresets.index', navigate: true);
}
public function render()
{
return view('livewire.calculationpreset.create', [
]);
}
}
@@ -0,0 +1,64 @@
<?php
namespace App\Livewire\Calculationpreset;
use Livewire\Attributes\Validate;
use Livewire\Component;
use App\Models\Calculationpreset as Model;
use Livewire\Attributes\title;
#[title('Edit Calculationpreset')]
class EditCalculationpreset extends Component
{
public Model $calculationpreset ;
public string $name = '';
public string $description = '';
public float $price_kwh = 0;
public float $factor_printer = 0;
public float $factor_maintenance = 0;
public float $factor_price = 0;
#[Validate('required')]
public function save(){
$this->validate([
'name' => ['required', 'string', 'max:255'],
'description' => ['nullable', 'string', 'max:255'],
'price_kwh' => ['required', 'numeric'],
'factor_printer' => ['nullable', 'numeric'],
'factor_maintenance' => ['nullable', 'numeric'],
'factor_price' => ['nullable', 'numeric']
]);
$this->calculationpreset->update([
'name' => $this->name,
'description' => $this->description,
'price_kwh' => $this->price_kwh,
'factor_printer' => $this->factor_printer,
'factor_maintenance' => $this->factor_maintenance,
'factor_price' => $this->factor_price
]);
return $this->redirectRoute('calculationpresets.show', $this->calculationpreset->id, navigate: true);
}
public function cancel(){
return $this->redirectRoute('calculationpresets.index', navigate: true);
}
public function mount(Model $calculationpreset){
$this->calculationpreset = $calculationpreset;
$this->name = $calculationpreset->name;
$this->description = $calculationpreset->description;
$this->price_kwh = $calculationpreset->price_kwh;
$this->factor_printer = $calculationpreset->factor_printer;
$this->factor_maintenance = $calculationpreset->factor_maintenance;
$this->factor_price = $calculationpreset->factor_price;
}
public function render()
{
return view('livewire.calculationpreset.create', [
]);
}
}
@@ -0,0 +1,29 @@
<?php
namespace App\Livewire\Calculationpreset;
use Livewire\Component;
use App\Models\Calculationpreset as Model;
use Livewire\Attributes\title;
#[title('Show Calculationpreset')]
class ShowCalculationpreset extends Component
{
public Model $calculationpreset ;
public function back(){
return redirect()->route('calculationpresets.index');
}
public function edit($id){
return redirect()->route('calculationpresets.edit', $id);
}
public function render()
{
return view('livewire.calculationpreset.show', [
]);
}
}
+78
View File
@@ -0,0 +1,78 @@
<?php
namespace App\Livewire\Calculator;
use Illuminate\Support\Facades\Auth;
use Livewire\Component;
use App\Models\Calculationpreset as Model;
use Livewire\WithPagination;
use Livewire\Attributes\title;
use App\Models\Filament;
use App\Models\FilamentType;
use App\Models\Manufacturer;
use App\Models\Color;
#[title('Calculator')]
class Calculator extends Component
{
use WithPagination;
public string $selection = '1';
public float $time = 0;
public string $timeunit = 'h';
public float $additionalcost = 0;
public string $additionalcostunit = 'per Piece';
public int $countonplate = 0;
public int $selcountonplate = 0;
public string $search_type = '';
public string $search_manufacturer = '';
public string $search_name = '';
public string $search_color = '';
public array $selectedFilaments = []; // [filament_id => amount_g]
public function toggleFilament($filamentId)
{
if (isset($this->selectedFilaments[$filamentId])) {
unset($this->selectedFilaments[$filamentId]);
} else {
$this->selectedFilaments[$filamentId] = 0;
}
}
public function render()
{
$filaments = Filament::query()
->where(function ($query) {
$query->when($this->search_type, function ($query) {
$query->whereHas('type', function ($q) {
$q->where('name', $this->search_type);
});
})
->when($this->search_manufacturer, function ($query) {
$query->whereHas('manufacturer', function ($q) {
$q->where('name', 'like', '%' . $this->search_manufacturer . '%');
});
})
->when($this->search_name, function ($query) {
$query->where('name', 'like', '%' . $this->search_name . '%');
})
->when($this->search_color, function ($query) {
$query->whereHas('color', function ($q) {
$q->where('name', 'like', '%' . $this->search_color . '%');
});
});
})
->orWhereIn('id', array_keys($this->selectedFilaments))
->with(['type', 'manufacturer', 'color'])
->get();
return view('livewire.calculator', [
'presets' => \App\Models\Calculationpreset::all(),
'calculationpreset' => \App\Models\Calculationpreset::find($this->selection),
'filaments' => $filaments,
'filamenttypes' => FilamentType::all(),
]);
}
}
+39
View File
@@ -0,0 +1,39 @@
<?php
namespace App\Livewire\Color;
use App\Models\Color as ColorModel;
use Livewire\Attributes\title;
use Livewire\Component;
use Livewire\WithPagination;
#[title('Colors')]
class Color extends Component
{
use WithPagination;
public $search ='';
public function create(){
return $this->redirectRoute('color.create', navigate: true);
}
public function edit($id){
return $this->redirectRoute('color.edit', $id, navigate: true);
}
public function show($id){
return $this->redirectRoute('color.show', $id, navigate: true);
}
public function delete($id){
ColorModel::destroy($id);
}
public function render()
{
return view('livewire.color.index', [
'colors' => ColorModel::search('name', $this->search)->paginate(10)
]);
}
}
+43
View File
@@ -0,0 +1,43 @@
<?php
namespace App\Livewire\Color;
use App\Models\Color as Model;
use Livewire\Attributes\title;
use Livewire\Attributes\Validate;
use Livewire\Component;
#[title('Colors')]
class CreateColor extends Component
{
public Model $color ;
public string $name = '';
public string $hex = '';
#[Validate('required')]
public function save(){
$this->validate([
'name' => ['required', 'string', 'max:255'],
'hex' => ['required', 'string', 'size:6', 'regex:/^[0-9A-F]{6}$/'],
]);
$color = new Model();
$color->name = $this->name;
$color->hex = $this->hex;
$color->save();
return $this->redirectRoute('color.show', $color->id, navigate: true);
}
public function cancel(){
return $this->redirectRoute('color.index', navigate: true);
}
public function render()
{
return view('livewire.color.create', [
]);
}
}
+48
View File
@@ -0,0 +1,48 @@
<?php
namespace App\Livewire\Color;
use App\Models\Color as Model;
use Livewire\Attributes\title;
use Livewire\Attributes\Validate;
use Livewire\Component;
#[title('Colors')]
class EditColor extends Component
{
public Model $color;
public string $name = '';
public string $hex = '';
public function mount(Model $color){
$this->color = $color;
$this->name = $color->name;
$this->hex = $color->hex;
}
#[Validate('required')]
public function save(){
$this->validate([
'name' => ['required', 'string', 'max:255'],
'hex' => ['required', 'string', 'size:6', 'regex:/^[0-9A-F]{6}$/'],
]);
$this->color->update([
'name' => $this->name,
'hex' => $this->hex,
]);
return $this->redirectRoute('color.show', $this->color->id, navigate: true);
}
public function cancel(){
return $this->redirectRoute('color.index', navigate: true);
}
public function render()
{
return view('livewire.color.edit', [
]);
}
}
+31
View File
@@ -0,0 +1,31 @@
<?php
namespace App\Livewire\Color;
use App\Models\Color as Model;
use Livewire\Attributes\title;
use Livewire\Component;
#[title('Colors')]
class ShowColor extends Component
{
public Model $color;
public function mount(Model $color){
$this->color = $color;
}
public function edit($id){
return $this->redirectRoute('color.edit', $id, navigate: true);
}
public function back(){
return $this->redirectRoute('color.index', navigate: true);
}
public function render()
{
return view('livewire.color.show', [
]);
}
}
+18
View File
@@ -0,0 +1,18 @@
<?php
namespace App\Livewire;
use Livewire\Component;
use App\Models\Manufacturer;
use Livewire\Attributes\title;
#[title('Dashboard')]
class Dashboard extends Component
{
public function render()
{
return view('livewire.dashboard', [
'manufacturers' => Manufacturer::all()->sortBy('filament_count')->reverse()
]);
}
}
+50
View File
@@ -0,0 +1,50 @@
<?php
namespace App\Livewire\Extruder;
use App\Models\Extruder as Model;
use Livewire\Attributes\Title;
use Livewire\Attributes\Validate;
use Livewire\Component;
#[title('Extruders')]
class CreateExtruder extends Component
{
public Model $extruder ;
public string $name = '';
public string $description = '';
public int $manufacturer_id = 0;
public string $diameter = '';
public string $temp_max = '';
#[Validate('required')]
public function save(){
$this->validate([
'name' => ['required', 'string', 'max:255'],
'description' => ['nullable', 'string', 'max:255'],
'manufacturer_id' => ['required', 'integer'],
'diameter' => ['required', 'string', 'max:4'],
'temp_max' => ['required', 'integer']
]);
$extruder = new Model();
$extruder->name = $this->name;
$extruder->description = $this->description;
$extruder->manufacturer_id = $this->manufacturer_id;
$extruder->diameter = $this->diameter;
$extruder->temp_max = $this->temp_max;
$extruder->save();
return $this->redirectRoute('extruder.show', $extruder->id , navigate: true);
}
public function cancel(){
return $this->redirectRoute('extruder.index', navigate: true);
}
public function render()
{
return view('livewire.extruder.create', [
]);
}
}
+55
View File
@@ -0,0 +1,55 @@
<?php
namespace App\Livewire\Extruder;
use App\Models\Extruder as Model;
use Livewire\Attributes\Title;
use Livewire\Component;
#[title('Extruders')]
class EditExtruder extends Component
{
public Model $extruder ;
public string $name = '';
public string $description = '';
public int $manufacturer_id = 0;
public string $diameter = '';
public string $temp_max = '';
public function mount(Model $extruder){
$this->extruder = $extruder;
$this->name = $extruder->name;
$this->description = $extruder->description;
$this->manufacturer_id = $extruder->manufacturer_id;
$this->diameter = $extruder->diameter;
$this->temp_max = $extruder->temp_max;
}
public function save(){
$this->validate([
'name' => ['required', 'string', 'max:255'],
'description' => ['nullable', 'string', 'max:255'],
'manufacturer_id' => ['required', 'integer'],
'diameter' => ['required', 'string', 'max:4'],
'temp_max' => ['required', 'integer']
]);
$this->extruder->update([
'name' => $this->name,
'description' => $this->description,
'manufacturer_id' => $this->manufacturer_id,
'diameter' => $this->diameter,
'temp_max' => $this->temp_max
]);
return $this->redirectRoute('extruder.show', $this->extruder->id, navigate: true);
}
public function cancel(){
return $this->redirectRoute('extruder.index', navigate: true);
}
public function render()
{
return view('livewire.extruder.edit', [
]);
}
}
+36
View File
@@ -0,0 +1,36 @@
<?php
namespace App\Livewire\Extruder;
use App\Models\Extruder as Model;
use Livewire\Attributes\Title;
use Livewire\Component;
use Livewire\WithPagination;
#[title('Extruders')]
class Extruder extends Component
{
use WithPagination;
public $search ='';
public function create(){
return $this->redirectRoute('extruder.create', navigate: true);
}
public function edit($id){
return $this->redirectRoute('extruder.edit', $id, navigate: true);
}
public function show($id){
return $this->redirectRoute('extruder.show', $id, navigate: true);
}
public function delete($id){
Model::destroy($id);
}
public function render()
{
return view('livewire.extruder.index', [
'extruders' => Model::search('name', $this->search)->paginate(10),
]);
}
}
+27
View File
@@ -0,0 +1,27 @@
<?php
namespace App\Livewire\Extruder;
use App\Models\Extruder as Model;
use Livewire\Attributes\Title;
use Livewire\Component;
#[title('Extruders')]
class ShowExtruder extends Component
{
public Model $extruder ;
public function back(){
return $this->redirectRoute('extruder.index', navigate: true);
}
public function edit($id){
return $this->redirectRoute('extruder.edit', $id, navigate: true);
}
public function render()
{
return view('livewire.extruder.show', [
]);
}
}
+66
View File
@@ -0,0 +1,66 @@
<?php
namespace App\Livewire\Filament;
use Livewire\Attributes\Validate;
use Livewire\Component;
use App\Models\Filament as Model;
use Livewire\Attributes\title;
#[title('Create Filament')]
class CreateFilament extends Component
{
public Model $filament ;
public string $name = '';
public string $description = '';
public int $color_id = 0;
public int $manufacturer_id = 0;
public int $filament_type_id = 0;
public int $weight = 1000;
public string $diameter = '1.75';
public float $price = 0;
public int $temp_min = 0;
public int $temp_max = 0;
#[Validate('required')]
public function save(){
$this->validate([
'name' => ['required', 'string', 'max:255'],
'description' => ['nullable', 'string', 'max:255'],
'color_id' => ['required', 'integer'],
'manufacturer_id' => ['required', 'integer'],
'filament_type_id' => ['required', 'integer'],
'weight' => ['required', 'integer'],
'diameter' => ['required', 'string', 'max:4'],
'price' => ['required', 'numeric'],
'temp_min' => ['required', 'integer'],
'temp_max' => ['required', 'integer']
]);
$filament = new Model();
$filament->name = $this->name;
$filament->description = $this->description;
$filament->color_id = $this->color_id;
$filament->manufacturer_id = $this->manufacturer_id;
$filament->filament_type_id = $this->filament_type_id;
$filament->weight = $this->weight;
$filament->diameter = $this->diameter;
$filament->price = $this->price;
$filament->temp_min = $this->temp_min;
$filament->temp_max = $this->temp_max;
$filament->save();
return $this->redirectRoute('filaments.show', $filament->id, navigate: true);
}
public function cancel(){
return $this->redirectRoute('filaments.index', navigate: true);
}
public function render()
{
return view('livewire.filament.create', [
]);
}
}
+80
View File
@@ -0,0 +1,80 @@
<?php
namespace App\Livewire\Filament;
use Livewire\Attributes\Validate;
use Livewire\Component;
use App\Models\Filament as Model;
use Livewire\Attributes\title;
#[title('Create Filament')]
class EditFilament extends Component
{
public Model $filament ;
public string $name = '';
public string $description = '';
public int $color_id = 0;
public int $manufacturer_id = 0;
public int $filament_type_id = 0;
public int $weight = 1000;
public string $diameter = '1.75';
public float $price = 0;
public int $temp_min = 0;
public int $temp_max = 0;
#[Validate('required')]
public function save(){
$this->validate([
'name' => ['required', 'string', 'max:255'],
'description' => ['nullable', 'string', 'max:255'],
'color_id' => ['required', 'integer'],
'manufacturer_id' => ['required', 'integer'],
'filament_type_id' => ['required', 'integer'],
'weight' => ['required', 'integer'],
'diameter' => ['required', 'string', 'max:4'],
'price' => ['required', 'numeric'],
'temp_min' => ['required', 'integer'],
'temp_max' => ['required', 'integer']
]);
$this->filament->update([
'name' => $this->name,
'description' => $this->description,
'color_id' => $this->color_id,
'manufacturer_id' => $this->manufacturer_id,
'filament_type_id' => $this->filament_type_id,
'weight' => $this->weight,
'diameter' => $this->diameter,
'price' => $this->price,
'temp_min' => $this->temp_min,
'temp_max' => $this->temp_max
]);
return $this->redirectRoute('filaments.show', $this->filament->id, navigate: true);
}
public function cancel(){
return $this->redirectRoute('filaments.index', navigate: true);
}
public function mount(Model $filament){
$this->filament = $filament;
$this->name = $filament->name;
$this->description = $filament->description;
$this->color_id = $filament->color_id;
$this->manufacturer_id = $filament->manufacturer_id;
$this->filament_type_id = $filament->filament_type_id;
$this->weight = $filament->weight;
$this->diameter = $filament->diameter;
$this->price = $filament->price;
$this->temp_min = $filament->temp_min;
$this->temp_max = $filament->temp_max;
}
public function render()
{
return view('livewire.filament.create', [
]);
}
}
+43
View File
@@ -0,0 +1,43 @@
<?php
namespace App\Livewire\Filament;
use Livewire\Component;
use App\Models\Filament as Model;
use App\Models\Color as Color;
use App\Models\FilamentType as Type;
use App\Models\Manufacturer as Manufacturer;
use Livewire\WithPagination;
use Livewire\Attributes\title;
use Livewire\Attributes\Validate;
use Flux\Flux;
use Illuminate\Support\Facades\Auth;
#[title('Filaments')]
class Filament extends Component
{
use WithPagination;
public Model $filament ;
public $search = '';
public function create(){
return $this->redirectRoute('filaments.create', navigate: true);
}
public function show($id){
return $this->redirectRoute('filaments.show', $id);
}
public function edit($id){
return $this->redirectRoute('filaments.edit', $id);
}
public function render()
{
return view('livewire.filament.index', [
'filaments' => Model::search('name', $this->search)->paginate(25)
]);
}
}
+29
View File
@@ -0,0 +1,29 @@
<?php
namespace App\Livewire\Filament;
use Livewire\Component;
use App\Models\Filament as Model;
use Livewire\Attributes\title;
#[title('Show Filament')]
class ShowFilament extends Component
{
public Model $filament ;
public function back(){
return redirect()->route('filaments.index');
}
public function edit($id){
return redirect()->route('filaments.edit', $id);
}
public function render()
{
return view('livewire.filament.show', [
]);
}
}
@@ -0,0 +1,40 @@
<?php
namespace App\Livewire\Manufacturer;
use App\Models\Manufacturer as Model;
use Livewire\Attributes\title;
use Livewire\Attributes\Validate;
use Livewire\Component;
#[title('Manufacturer List')]
class CreateManufacturer extends Component{
public Model $manufacturer ;
public string $name = '';
public string $description = '';
public string $website = '';
#[Validate('required')]
public function save(){
$this->validate([
'name' => ['required', 'string', 'max:255'],
'description' => ['nullable', 'string'],
'website' => ['nullable', 'string', 'max:255']
]);
$manufacturer = new Model();
$manufacturer->name = $this->name;
$manufacturer->description = $this->description;
$manufacturer->website = $this->website;
$manufacturer->save();
return redirect()->route('manufacturer.index');
}
public function render()
{
return view('livewire.manufacturer.create', [
]);
}
}
@@ -0,0 +1,52 @@
<?php
namespace App\Livewire\Manufacturer;
use App\Models\Manufacturer as Model;
use Livewire\Attributes\title;
use Livewire\Attributes\Validate;
use Livewire\Component;
#[title('Manufacturer List')]
class EditManufacturer extends Component{
public Model $manufacturer ;
public string $name = '';
public string $description = '';
public string $website = '';
public function mount(Model $manufacturer){
$this->manufacturer = $manufacturer;
$this->name = $manufacturer->name;
$this->description = $manufacturer->description;
$this->website = $manufacturer->website;
}
#[Validate('required')]
public function save(){
$this->validate([
'name' => ['required', 'string', 'max:255'],
'description' => ['nullable', 'string'],
'website' => ['nullable', 'string', 'max:255']
]);
$this->manufacturer->update([
'name' => $this->name,
'description' => $this->description,
'website' => $this->website
]);
return $this->redirectRoute('manufacturer.show', $this->manufacturer->id, navigate: true);
}
public function cancel(){
return $this->redirectRoute('manufacturer.index', navigate: true);
}
public function render()
{
return view('livewire.manufacturer.edit', [
]);
}
}
@@ -0,0 +1,36 @@
<?php
namespace App\Livewire\Manufacturer;
use App\Models\Manufacturer as Model;
use Livewire\Attributes\title;
use Livewire\Component;
use Livewire\WithPagination;
#[title('Manufacturer List')]
class Manufacturer extends Component{
use WithPagination;
public $search ='';
public function create(){
return $this->redirectRoute('manufacturer.create', navigate: true);
}
public function edit($id){
return $this->redirectRoute('manufacturer.edit', $id, navigate: true);
}
public function show($id){
return $this->redirectRoute('manufacturer.show', $id, navigate: true);
}
public function delete($id){
Model::destroy($id);
}
public function render()
{
return view('livewire.manufacturer.index', [
'manufacturers' => Model::search('name', $this->search)->paginate(10)
]);
}
}
@@ -0,0 +1,26 @@
<?php
namespace App\Livewire\Manufacturer;
use App\Models\Manufacturer as Model;
use Livewire\Attributes\title;
use Livewire\Component;
#[title('Manufacturer List')]
class ShowManufacturer extends Component{
public Model $manufacturer ;
public function edit($id){
return $this->redirectRoute('manufacturer.edit', $id, navigate: true);
}
public function back(){
return $this->redirectRoute('manufacturer.index', navigate: true);
}
public function render()
{
return view('livewire.manufacturer.show', [
]);
}
}
+27
View File
@@ -0,0 +1,27 @@
<?php
namespace App\Livewire\Orders;
use Livewire\Component;
use Livewire\WithPagination;
use Livewire\Attributes\title;
use App\Models\Order;
use App\Models\OrderStatus;
#[title('Orders')]
class Orders extends Component
{
use WithPagination;
public $search = '';
public function render()
{
return view('livewire.orders.orders',[
'orders' => Order::latest()->paginate(10),
'order_statuses' => OrderStatus::all()
]);
}
}
+46
View File
@@ -0,0 +1,46 @@
<?php
namespace App\Livewire\Printer;
use Livewire\Attributes\Validate;
use Livewire\Component;
use App\Models\Printer as Model;
use Livewire\Attributes\title;
#[title('Create Printertype')]
class CreatePrinter extends Component
{
public Model $printer ;
public string $name = '';
public string $description = '';
public int $printertype_id = 0;
#[Validate('required')]
public function save(){
$this->validate([
'name' => ['required', 'string', 'max:255'],
'description' => ['nullable', 'string', 'max:255'],
'printertype_id' => ['required', 'integer'],
]);
$printer = new Model();
$printer->name = $this->name;
$printer->description = $this->description;
$printer->printertype_id = $this->printertype_id;
$printer->save();
return $this->redirectRoute('printers.show', $printer->id, navigate: true);
}
public function cancel(){
return $this->redirectRoute('printers.index', navigate: true);
}
public function render()
{
return view('livewire.printer.create', [
]);
}
}
+52
View File
@@ -0,0 +1,52 @@
<?php
namespace App\Livewire\Printer;
use Livewire\Attributes\Validate;
use Livewire\Component;
use App\Models\Printer as Model;
use Livewire\Attributes\title;
#[title('Edit Printer')]
class EditPrinter extends Component
{
public Model $printer ;
public string $name = '';
public string $description = '';
public int $printertype_id = 0;
#[Validate('required')]
public function save(){
$this->validate([
'name' => ['required', 'string', 'max:255'],
'description' => ['nullable', 'string', 'max:255'],
'printertype_id' => ['required', 'integer'],
]);
$this->printertype->update([
'name' => $this->name,
'description' => $this->description,
'printertype_id' => $this->printertype_id,
]);
return $this->redirectRoute('printers.show', $this->printer->id, navigate: true);
}
public function cancel(){
return $this->redirectRoute('printers.index', navigate: true);
}
public function mount(Model $printer){
$this->printer = $printer;
$this->name = $printer->name;
$this->description = $printer->description;
$this->printertype_id = $printer->printertype_id;
}
public function render()
{
return view('livewire.printer.create', [
]);
}
}
+44
View File
@@ -0,0 +1,44 @@
<?php
namespace App\Livewire\Printer;
use Illuminate\Support\Facades\Auth;
use Livewire\Component;
use App\Models\Printer as Model;
use App\Models\Manufacturer as Manufacturer;
use Livewire\WithPagination;
use Livewire\Attributes\title;
#[title('Printer')]
class Printer extends Component
{
use WithPagination;
public Model $printer ;
public $search = '';
public function create(){
return $this->redirectRoute('printers.create', navigate: true);
}
public function show($id){
return $this->redirectRoute('printers.show', $id);
}
public function edit($id){
return $this->redirectRoute('printers.edit', $id);
}
public function delete($id){
@Auth::check();
Model::destroy($id);
}
public function render()
{
return view('livewire.printer.index', [
'printers' => Model::search('name', $this->search)->paginate(25)
]);
}
}
+29
View File
@@ -0,0 +1,29 @@
<?php
namespace App\Livewire\Printer;
use Livewire\Component;
use App\Models\Printer as Model;
use Livewire\Attributes\title;
#[title('Show Printer')]
class ShowPrinter extends Component
{
public Model $printer ;
public function back(){
return redirect()->route('printers.index');
}
public function edit($id){
return redirect()->route('printers.edit', $id);
}
public function render()
{
return view('livewire.printer.show', [
]);
}
}
@@ -0,0 +1,58 @@
<?php
namespace App\Livewire\Printertype;
use Livewire\Attributes\Validate;
use Livewire\Component;
use App\Models\Printertype as Model;
use Livewire\Attributes\title;
#[title('Create Printertype')]
class CreatePrintertype extends Component
{
public Model $printertype ;
public string $name = '';
public string $description = '';
public int $manufacturer_id = 0;
public int $temp_max = 0;
public int $bed_size_x = 0;
public int $bed_size_y = 0;
public float $price = 0;
#[Validate('required')]
public function save(){
$this->validate([
'name' => ['required', 'string', 'max:255'],
'description' => ['nullable', 'string', 'max:255'],
'manufacturer_id' => ['required', 'integer'],
'temp_max' => ['required', 'integer'],
'bed_size_x' => ['nullable', 'numeric'],
'bed_size_y' => ['nullable', 'numeric'],
'price' => ['nullable', 'numeric']
]);
$printertype = new Model();
$printertype->name = $this->name;
$printertype->description = $this->description;
$printertype->manufacturer_id = $this->manufacturer_id;
$printertype->temp_max = $this->temp_max;
$printertype->bed_size_x = $this->bed_size_x;
$printertype->bed_size_y = $this->bed_size_y;
$printertype->price = $this->price;
$printertype->save();
return $this->redirectRoute('printertypes.show', $printertype->id, navigate: true);
}
public function cancel(){
return $this->redirectRoute('printertypes.index', navigate: true);
}
public function render()
{
return view('livewire.printertype.create', [
]);
}
}
@@ -0,0 +1,68 @@
<?php
namespace App\Livewire\Printertype;
use Livewire\Attributes\Validate;
use Livewire\Component;
use App\Models\Printertype as Model;
use Livewire\Attributes\title;
#[title('Edit Printertype')]
class EditPrintertype extends Component
{
public Model $printertype ;
public string $name = '';
public string $description = '';
public int $manufacturer_id = 0;
public int $temp_max = 0;
public int $bed_size_x = 0;
public int $bed_size_y = 0;
public float $price = 0;
#[Validate('required')]
public function save(){
$this->validate([
'name' => ['required', 'string', 'max:255'],
'description' => ['nullable', 'string', 'max:255'],
'manufacturer_id' => ['required', 'integer'],
'temp_max' => ['required', 'integer'],
'bed_size_x' => ['nullable', 'numeric'],
'bed_size_y' => ['nullable', 'numeric'],
'price' => ['nullable', 'numeric']
]);
$this->printertype->update([
'name' => $this->name,
'description' => $this->description,
'manufacturer_id' => $this->manufacturer_id,
'temp_max' => $this->temp_max,
'bed_size_x' => $this->bed_size_x,
'bed_size_y' => $this->bed_size_y,
'price' => $this->price
]);
return $this->redirectRoute('printertypes.show', $this->printertype->id, navigate: true);
}
public function cancel(){
return $this->redirectRoute('printertypes.index', navigate: true);
}
public function mount(Model $printertype){
$this->printertype = $printertype;
$this->name = $printertype->name;
$this->description = $printertype->description;
$this->manufacturer_id = $printertype->manufacturer_id;
$this->temp_max = $printertype->temp_max;
$this->bed_size_x = $printertype->bed_size_x;
$this->bed_size_y = $printertype->bed_size_y;
$this->price = $printertype->price;
}
public function render()
{
return view('livewire.printertype.create', [
]);
}
}
+44
View File
@@ -0,0 +1,44 @@
<?php
namespace App\Livewire\Printertype;
use Illuminate\Support\Facades\Auth;
use Livewire\Component;
use App\Models\Printertype as Model;
use App\Models\Manufacturer as Manufacturer;
use Livewire\WithPagination;
use Livewire\Attributes\title;
#[title('Printertypes')]
class Printertype extends Component
{
use WithPagination;
public Model $printertype ;
public $search = '';
public function create(){
return $this->redirectRoute('printertypes.create', navigate: true);
}
public function show($id){
return $this->redirectRoute('printertypes.show', $id);
}
public function edit($id){
return $this->redirectRoute('printertypes.edit', $id);
}
public function delete($id){
@Auth::check();
Model::destroy($id);
}
public function render()
{
return view('livewire.printertype.index', [
'printertypes' => Model::search('name', $this->search)->paginate(25)
]);
}
}
@@ -0,0 +1,29 @@
<?php
namespace App\Livewire\Printertype;
use Livewire\Component;
use App\Models\Printertype as Model;
use Livewire\Attributes\title;
#[title('Show Printertype')]
class ShowPrintertype extends Component
{
public Model $printertype ;
public function back(){
return redirect()->route('printertypes.index');
}
public function edit($id){
return redirect()->route('printertypes.edit', $id);
}
public function render()
{
return view('livewire.printertype.show', [
]);
}
}
+15
View File
@@ -0,0 +1,15 @@
<?php
namespace App\Livewire\Settings;
use Livewire\Component;
use Livewire\Attributes\title;
#[title('Settings')]
class Settings extends Component
{
public function render()
{
return view('livewire.settings.settings');
}
}
@@ -0,0 +1,46 @@
<?php
namespace App\Livewire\Sparepart;
use Livewire\Attributes\Validate;
use Livewire\Component;
use App\Models\Sparepart as Model;
use Livewire\Attributes\title;
#[title('Create Sparepart')]
class CreateSparepart extends Component
{
public Model $sparepart ;
public string $name = '';
public string $description = '';
public int $manufacturer_id = 0;
#[Validate('required')]
public function save(){
$this->validate([
'name' => ['required', 'string', 'max:255'],
'description' => ['nullable', 'string', 'max:255'],
'manufacturer_id' => ['required', 'integer'],
]);
$sparepart = new Model();
$sparepart->name = $this->name;
$sparepart->description = $this->description;
$sparepart->manufacturer_id = $this->manufacturer_id;
$sparepart->save();
return $this->redirectRoute('spareparts.show', $sparepart->id, navigate: true);
}
public function cancel(){
return $this->redirectRoute('spareparts.index', navigate: true);
}
public function render()
{
return view('livewire.sparepart.create', [
]);
}
}
+52
View File
@@ -0,0 +1,52 @@
<?php
namespace App\Livewire\Sparepart;
use Livewire\Attributes\Validate;
use Livewire\Component;
use App\Models\Sparepart as Model;
use Livewire\Attributes\title;
#[title('Edit Sparepart')]
class EditSparepart extends Component
{
public Model $sparepart ;
public string $name = '';
public string $description = '';
public int $manufacturer_id = 0;
#[Validate('required')]
public function save(){
$this->validate([
'name' => ['required', 'string', 'max:255'],
'description' => ['nullable', 'string', 'max:255'],
'manufacturer_id' => ['required', 'integer'],
]);
$this->sparepart->update([
'name' => $this->name,
'description' => $this->description,
'manufacturer_id' => $this->manufacturer_id
]);
return $this->redirectRoute('spareparts.show', $this->sparepart->id, navigate: true);
}
public function cancel(){
return $this->redirectRoute('spareparts.index', navigate: true);
}
public function mount(Model $sparepart){
$this->sparepart = $sparepart;
$this->name = $sparepart->name;
$this->description = $sparepart->description;
$this->manufacturer_id = $sparepart->manufacturer_id;
}
public function render()
{
return view('livewire.sparepart.create', [
]);
}
}
+29
View File
@@ -0,0 +1,29 @@
<?php
namespace App\Livewire\Sparepart;
use Livewire\Component;
use App\Models\Sparepart as Model;
use Livewire\Attributes\title;
#[title('Show Sparepart')]
class ShowSparepart extends Component
{
public Model $sparepart ;
public function back(){
return redirect()->route('spareparts.index');
}
public function edit($id){
return redirect()->route('spareparts.edit', $id);
}
public function render()
{
return view('livewire.sparepart.show', [
]);
}
}
+44
View File
@@ -0,0 +1,44 @@
<?php
namespace App\Livewire\Sparepart;
use Illuminate\Support\Facades\Auth;
use Livewire\Component;
use App\Models\Sparepart as Model;
use App\Models\Manufacturer as Manufacturer;
use Livewire\WithPagination;
use Livewire\Attributes\title;
#[title('Spareparts')]
class Sparepart extends Component
{
use WithPagination;
public Model $sparepart ;
public $search = '';
public function create(){
return $this->redirectRoute('spareparts.create', navigate: true);
}
public function show($id){
return $this->redirectRoute('spareparts.show', $id);
}
public function edit($id){
return $this->redirectRoute('spareparts.edit', $id);
}
public function delete($id){
@Auth::check();
Model::destroy($id);
}
public function render()
{
return view('livewire.sparepart.index', [
'spareparts' => Model::search('name', $this->search)->paginate(25)
]);
}
}
+49
View File
@@ -0,0 +1,49 @@
<?php
namespace App\Livewire\Type;
use App\Models\FilamentType;
use Flux\Flux;
use Illuminate\Support\Facades\Auth;
use Livewire\Attributes\title;
use Livewire\Attributes\Validate;
use Livewire\Component;
use Livewire\WithPagination;
#[title('Types')]
class CreateType extends Component
{
use WithPagination;
// Validation
#[Validate('required')]
public $name = '';
public $description = '';
public $search ='';
public function save() {
@Auth::check();
// Validate
$this->validate();
$type = new FilamentType();
$type->name = $this->name;
$type->description = $this->description;
$type->save();
return $this->redirectRoute('type.show', $type->id, navigate: true);
}
public function cancel(){
return $this->redirectRoute('type.index', navigate: true);
}
public function render()
{
return view('livewire.type.create', [
]);
}
}
+54
View File
@@ -0,0 +1,54 @@
<?php
namespace App\Livewire\Type;
use App\Models\FilamentType as Model;
use Livewire\Attributes\title;
use Livewire\Attributes\Validate;
use Livewire\Component;
#[title('Types')]
class EditType extends Component
{
public Model $type;
public string $name = '';
public string $description = '';
public function mount(Model $type)
{
$this->type = $type;
$this->name = $type->name;
$this->description = $type->description;
}
// Validation
#[Validate('required')]
public function save()
{
$this->validate([
'type.name' => ['required', 'string', 'max:255'],
'type.description' => ['nullable', 'string'],
]);
$this->type->update([
'name' => $this->name,
'description' => $this->description,
]);
return $this->redirectRoute('type.show', $this->type->id, navigate: true);
}
public function cancel()
{
return $this->redirectRoute('type.index', navigate: true);
}
public function render()
{
return view('livewire.type.edit', [
]);
}
}
+36
View File
@@ -0,0 +1,36 @@
<?php
namespace App\Livewire\Type;
use App\Models\FilamentType;
use Flux\Flux;
use Illuminate\Support\Facades\Auth;
use Livewire\Attributes\title;
use Livewire\Attributes\Validate;
use Livewire\Component;
use Livewire\WithPagination;
#[title('Types')]
class ShowType extends Component
{
public FilamentType $type;
public function back(){
return $this->redirectRoute('type.index', navigate: true);
}
public function edit($id){
return $this->redirectRoute('type.edit', $id, navigate: true);
}
public function mount(FilamentType $type){
$this->type = $type;
}
public function render()
{
return view('livewire.type.show', [
]);
}
}
+49
View File
@@ -0,0 +1,49 @@
<?php
namespace App\Livewire\Type;
use App\Models\FilamentType;
use Flux\Flux;
use Illuminate\Support\Facades\Auth;
use Livewire\Attributes\title;
use Livewire\Attributes\Validate;
use Livewire\Component;
use Livewire\WithPagination;
#[title('Types')]
class Type extends Component
{
use WithPagination;
public $search = '';
// Validation
#[Validate('required')]
public function create()
{
return $this->redirectRoute('type.create', navigate: true);
}
public function edit($id)
{
return $this->redirectRoute('type.edit', $id, navigate: true);
}
public function show($id)
{
return $this->redirectRoute('type.show', $id, navigate: true);
}
public function delete($id){
@Auth::check();
FilamentType::destroy($id);
}
public function render()
{
return view('livewire.type.index', [
'types' => FilamentType::search('name', $this->search)->paginate(10)
]);
}
}
+30
View File
@@ -0,0 +1,30 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class Buildplate extends Model
{
// Buildplate Model
protected $table = 'buildplates';
protected $fillable = [
'name',
'description',
'manufacturer_id',
'temp_max',
'amount'
];
public function filament()
{
return $this->hasMany(Filament::class);
}
public function manufacturer()
{
return $this->belongsTo(Manufacturer::class);
}
}
+20
View File
@@ -0,0 +1,20 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class Calculationpreset extends Model
{
// Calculationpreset Model
protected $table = 'calculatorpresets';
protected $primaryKey = 'id';
protected $fillable = [
'name',
'description',
'price_kwh',
'factor_printer',
'factor_maintenance',
'factor_price'
];
}
+19
View File
@@ -0,0 +1,19 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class Color extends Model
{
// Color Model
protected $table = 'colors';
protected $primaryKey = 'id';
protected $fillable = [
'name',
'hex'
];
}
+25
View File
@@ -0,0 +1,25 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class Extruder extends Model
{
// Extruder Model
protected $table = 'extruders';
protected $fillable = [
'name',
'description',
'manufacturer_id',
'diameter',
'temp_max'
];
public function manufacturer()
{
return $this->belongsTo(Manufacturer::class);
}
}
+49
View File
@@ -0,0 +1,49 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class Filament extends Model
{
// Filament Model
protected $table = 'filaments';
protected $primaryKey = 'id';
protected $fillable = [
'name',
'description',
'filament_type_id',
'manufacturer_id',
'color_id',
'weight',
'diameter',
'price',
'finish',
'image',
'stock',
'temp_min',
'temp_max',
'buildplate_id',
'extruder_id'
];
// Filament belongs to a type
public function type()
{
return $this->belongsTo(FilamentType::class, 'filament_type_id');
}
// Filament belongs to a manufacturer
public function manufacturer()
{
return $this->belongsTo(Manufacturer::class);
}
// Filament belongs to a color
public function color()
{
return $this->belongsTo(Color::class);
}
}
+22
View File
@@ -0,0 +1,22 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class FilamentType extends Model
{
protected $table = 'filament_types';
protected $primaryKey = 'id';
protected $fillable = [
'name',
'description',
];
// FilamentType has many filaments
public function filaments()
{
return $this->hasMany(Filament::class);
}
}
+31
View File
@@ -0,0 +1,31 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class Manufacturer extends Model
{
// Manufacturer Model
protected $table = 'manufacturers';
protected $fillable = [
'name',
'description',
'website',
'logo',
'filament_count'
];
// Manufacturer has many filaments
public function filaments()
{
return $this->hasMany(Filament::class);
}
// Manufacturer has many filament type
public function filamentTypes()
{
return $this->hasMany(FilamentType::class);
}
}
+23
View File
@@ -0,0 +1,23 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class Order extends Model
{
// Order Model
protected $table = 'orders';
protected $fillable = [
'user_id',
'items',
'total_price',
'order_status_id'
];
public function filament()
{
return $this->belongsTo(Filament::class);
}
}
+16
View File
@@ -0,0 +1,16 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class OrderStatus extends Model
{
// The table associated with the model.
protected $table = 'order_statuses';
// The attributes that are mass assignable.
protected $fillable = [
'name'
];
}
+21
View File
@@ -0,0 +1,21 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class Printer extends Model
{
// Printer Model
protected $table = 'printers';
protected $primaryKey = 'id';
protected $fillable = [
'name',
'description',
'printertype_id'
];
public function printertype()
{
return $this->belongsTo(Printertype::class);
}
}
+25
View File
@@ -0,0 +1,25 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class Printertype extends Model
{
// Printertype Model
protected $table = 'printertypes';
protected $primaryKey = 'id';
protected $fillable = [
'name',
'description',
'bed_size_x',
'bed_size_y',
'temp_min',
'temp_max',
'price',
];
public function manufacturer()
{
return $this->belongsTo(Manufacturer::class);
}
}
+20
View File
@@ -0,0 +1,20 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class Sparepart extends Model
{
// Sparepart Model
protected $table = 'spareparts';
protected $primaryKey = 'id';
protected $fillable = [
'name',
'description',
];
public function manufacturer()
{
return $this->belongsTo(Manufacturer::class);
}
}
+6 -1
View File
@@ -3,6 +3,7 @@
namespace App\Providers; namespace App\Providers;
use Illuminate\Support\ServiceProvider; use Illuminate\Support\ServiceProvider;
use Illuminate\Database\Eloquent\Builder;
class AppServiceProvider extends ServiceProvider class AppServiceProvider extends ServiceProvider
{ {
@@ -19,6 +20,10 @@ class AppServiceProvider extends ServiceProvider
*/ */
public function boot(): void public function boot(): void
{ {
// // Search
Builder::macro('search', function ($field, $string) {
return $string ? $this->where($field, 'like', '%' . $string . '%') : $this;
});
} }
} }
@@ -3,6 +3,7 @@
namespace App\Providers; namespace App\Providers;
use App\Actions\Jetstream\DeleteUser; use App\Actions\Jetstream\DeleteUser;
use Illuminate\Support\Facades\Vite;
use Illuminate\Support\ServiceProvider; use Illuminate\Support\ServiceProvider;
use Laravel\Jetstream\Jetstream; use Laravel\Jetstream\Jetstream;
@@ -24,6 +25,8 @@ class JetstreamServiceProvider extends ServiceProvider
$this->configurePermissions(); $this->configurePermissions();
Jetstream::deleteUsersUsing(DeleteUser::class); Jetstream::deleteUsersUsing(DeleteUser::class);
Vite::prefetch(concurrency: 3);
} }
/** /**
Executable → Regular
+5 -2
View File
@@ -1,6 +1,7 @@
#!/usr/bin/env php #!/usr/bin/env php
<?php <?php
use Illuminate\Foundation\Application;
use Symfony\Component\Console\Input\ArgvInput; use Symfony\Component\Console\Input\ArgvInput;
define('LARAVEL_START', microtime(true)); define('LARAVEL_START', microtime(true));
@@ -9,7 +10,9 @@ define('LARAVEL_START', microtime(true));
require __DIR__.'/vendor/autoload.php'; require __DIR__.'/vendor/autoload.php';
// Bootstrap Laravel and handle the command... // Bootstrap Laravel and handle the command...
$status = (require_once __DIR__.'/bootstrap/app.php') /** @var Application $app */
->handleCommand(new ArgvInput); $app = require_once __DIR__.'/bootstrap/app.php';
$status = $app->handleCommand(new ArgvInput);
exit($status); exit($status);
+10 -8
View File
@@ -6,21 +6,23 @@
"keywords": ["laravel", "framework"], "keywords": ["laravel", "framework"],
"license": "MIT", "license": "MIT",
"require": { "require": {
"php": "^8.2", "php": "^8.4",
"laravel/framework": "^11.31", "laravel/framework": "^12.0",
"laravel/jetstream": "^5.3", "laravel/jetstream": "^5.3",
"laravel/sanctum": "^4.0", "laravel/sanctum": "^4.0",
"laravel/tinker": "^2.9", "laravel/tinker": "^2.10.1",
"livewire/flux": "^2.0",
"livewire/livewire": "^3.0" "livewire/livewire": "^3.0"
}, },
"require-dev": { "require-dev": {
"fakerphp/faker": "^1.23", "fakerphp/faker": "^1.23",
"laravel/pail": "^1.1", "laravel/pail": "^1.2.2",
"laravel/pint": "^1.13", "laravel/pint": "^1.13",
"laravel/sail": "^1.26", "laravel/sail": "^1.41",
"mockery/mockery": "^1.6", "mockery/mockery": "^1.6",
"nunomaduro/collision": "^8.1", "nunomaduro/collision": "^8.6",
"phpunit/phpunit": "^11.0.1" "pestphp/pest": "^3.7",
"pestphp/pest-plugin-laravel": "^3.1"
}, },
"autoload": { "autoload": {
"psr-4": { "psr-4": {
@@ -52,7 +54,7 @@
], ],
"dev": [ "dev": [
"Composer\\Config::disableProcessTimeout", "Composer\\Config::disableProcessTimeout",
"npx concurrently -c \"#93c5fd,#c4b5fd,#fb7185,#fdba74\" \"php artisan serve --host=0.0.0.0 --port=${LARAVEL_PORT_NUMBER}\" \"php artisan queue:listen --tries=1\" \"php artisan pail --timeout=0\" \"npm run dev\" --names=server,queue,logs,vite" "npx concurrently -c \"#93c5fd,#c4b5fd,#fb7185,#fdba74\" \"php artisan serve\" \"php artisan queue:listen --tries=1\" \"npm run dev\" --names=server,queue,logs,vite"
] ]
}, },
"extra": { "extra": {
Generated
+2266 -964
View File
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -65,7 +65,7 @@ return [
| |
*/ */
'timezone' => env('APP_TIMEZONE', 'UTC'), 'timezone' => 'UTC',
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
+1 -1
View File
@@ -24,7 +24,7 @@ return [
| |
| Here you may define all of the cache "stores" for your application as | Here you may define all of the cache "stores" for your application as
| well as their drivers. You may even define multiple stores for the | well as their drivers. You may even define multiple stores for the
| same cache driver to group types of items stored in your caches. | same cache driver to group type of items stored in your caches.
| |
| Supported drivers: "array", "database", "file", "memcached", | Supported drivers: "array", "database", "file", "memcached",
| "redis", "dynamodb", "octane", "null" | "redis", "dynamodb", "octane", "null"
+1
View File
@@ -148,6 +148,7 @@ return [
'options' => [ 'options' => [
'cluster' => env('REDIS_CLUSTER', 'redis'), 'cluster' => env('REDIS_CLUSTER', 'redis'),
'prefix' => env('REDIS_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_').'_database_'), 'prefix' => env('REDIS_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_').'_database_'),
'persistent' => env('REDIS_PERSISTENT', false),
], ],
'default' => [ 'default' => [
+1 -1
View File
@@ -32,7 +32,7 @@ return [
| |
*/ */
'lifetime' => env('SESSION_LIFETIME', 120), 'lifetime' => (int) env('SESSION_LIFETIME', 120),
'expire_on_close' => env('SESSION_EXPIRE_ON_CLOSE', false), 'expire_on_close' => env('SESSION_EXPIRE_ON_CLOSE', false),
@@ -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
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('filament_types', function (Blueprint $table) {
$table->id();
$table->string('name');
$table->string('description');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('filament_types');
}
};
@@ -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
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('colors', function (Blueprint $table) {
$table->id();
$table->string('name')->required();
$table->string('hex')->required();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('color');
}
};
@@ -0,0 +1,32 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('manufacturers', function (Blueprint $table) {
$table->id();
$table->string('name')->required();
$table->string('description')->nullable();
$table->string('website')->nullable();
$table->string('logo')->nullable();
$table->integer('filament_count')->default(0);
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('manufacturer');
}
};
@@ -0,0 +1,37 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('filaments', function (Blueprint $table) {
$table->id();
$table->string('name');
$table->string('description')->nullable();
$table->foreignId('color_id')->constrained('colors')->onUpdate('cascade')->onDelete('cascade');
$table->foreignId('manufacturer_id')->constrained('manufacturers')->onUpdate('cascade')->onDelete('cascade');
$table->foreignId('filament_type_id')->constrained('filament_types')->onUpdate('cascade')->onDelete('cascade');
$table->integer('weight');
$table->decimal('diameter', 10, 2);
$table->decimal('price', 10, 2)->nullable();
$table->integer('temp_min')->nullable();
$table->integer('temp_max')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('filaments');
}
};
@@ -0,0 +1,32 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('extruders', function (Blueprint $table) {
$table->id();
$table->string('name');
$table->string('description')->nullable();
$table->foreignId('manufacturer_id')->constrained();
$table->string('diameter')->required();
$table->integer('temp_max')->required();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('extruders');
}
};
@@ -0,0 +1,31 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('buildplates', function (Blueprint $table) {
$table->id();
$table->string('name');
$table->string('description');
$table->foreignId('manufacturer_id')->constrained('manufacturers');
$table->integer('temp_max');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('buildplate');
}
};
@@ -0,0 +1,28 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('order_statuses', function (Blueprint $table) {
$table->id();
$table->string('name');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('order_statuses');
}
};
@@ -0,0 +1,31 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('orders', function (Blueprint $table) {
$table->id();
$table->foreignId('user_id')->constrained();
$table->foreignId('order_status_id')->constrained();
$table->json('items');
$table->integer('total_price');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('orders');
}
};
@@ -0,0 +1,30 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('spareparts', function (Blueprint $table) {
$table->id();
$table->string('name');
$table->string('description')->nullable();
$table->foreignId('manufacturer_id')->constrained('manufacturers')->onUpdate('cascade')->onDelete('cascade');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('spareparts');
}
};
@@ -0,0 +1,34 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('printertypes', function (Blueprint $table) {
$table->id();
$table->string('name');
$table->string('description')->nullable();
$table->foreignId('manufacturer_id')->constrained('manufacturers')->onUpdate('cascade')->onDelete('cascade');
$table->string('temp_max')->nullable();
$table->decimal('bed_size_x', 5, 2)->default(0);
$table->decimal('bed_size_y', 5, 2)->default(0);
$table->decimal('price', 10, 2)->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('printertypes');
}
};
@@ -0,0 +1,30 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('printers', function (Blueprint $table) {
$table->id();
$table->string('name');
$table->string('description')->nullable();
$table->foreignId('printertype_id')->constrained('printertypes')->onUpdate('cascade')->onDelete('cascade');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('printers');
}
};
@@ -0,0 +1,33 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('calculatorpresets', function (Blueprint $table) {
$table->id();
$table->string('name');
$table->string('description')->nullable();
$table->decimal('price_kwh', 10, 2);
$table->decimal('factor_printer', 10, 2);
$table->decimal('factor_maintenance', 10, 2);
$table->decimal('factor_price', 10, 2);
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('calculatorpresets');
}
};
+26
View File
@@ -0,0 +1,26 @@
<?php
namespace Database\Seeders;
use Illuminate\Database\Console\Seeds\WithoutModelEvents;
use Illuminate\Database\Seeder;
use App\Models\Buildplate as Type;
class BuildplateSeeder extends Seeder
{
/**
* Run the database seeds.
*/
public function run(): void
{
// Create Predefined Filament Types
$buildplates = [
['name' => 'SuperTrack', 'description' => 'Standard BuildPlate.', 'manufacturer_id' => 1, 'temp_max' => '250'],
['name' => 'Smooth PEI', 'description' => 'Standard BuildPlate.', 'manufacturer_id' => 1, 'temp_max' => '250'],
];
foreach ($buildplates as $buildplate) {
Type::create($buildplate);
}
}
}
@@ -0,0 +1,28 @@
<?php
namespace Database\Seeders;
use Illuminate\Database\Console\Seeds\WithoutModelEvents;
use Illuminate\Database\Seeder;
class CalculationpresetSeeder extends Seeder
{
/**
* Run the database seeds.
*/
public function run(): void
{
// Seed Calculation Presets
$calculationpresets = [
['name' => 'Standard', 'price_kwh' => 0.30, 'factor_printer' => 0.20, 'factor_maintenance' => 0.20, 'factor_price' => 200],
['name' => 'Friends', 'price_kwh' => 0.30, 'factor_printer' => 0.20, 'factor_maintenance' => 0.20, 'factor_price' => 150],
['name' => 'Extra', 'price_kwh' => 0.30, 'factor_printer' => 0.20, 'factor_maintenance' => 0.20, 'factor_price' => 250],
['name' => 'Production', 'price_kwh' => 0.30, 'factor_printer' => 0.20, 'factor_maintenance' => 0.20, 'factor_price' => 100],
];
foreach ($calculationpresets as $preset) {
\App\Models\Calculationpreset::create($preset);
}
}
}
+38
View File
@@ -0,0 +1,38 @@
<?php
namespace Database\Seeders;
use Illuminate\Database\Console\Seeds\WithoutModelEvents;
use Illuminate\Database\Seeder;
use App\Models\Color;
class ColorSeeder extends Seeder
{
/**
* Run the database seeds.
*/
public function run(): void
{
// Seed predefined Colors
$colors = [
['name' => 'Red', 'hex' => 'FF0000'],
['name' => 'Green', 'hex' => '00FF00'],
['name' => 'Blue', 'hex' => '0000FF'],
['name' => 'Yellow', 'hex' => 'FFFF00'],
['name' => 'Orange', 'hex' => 'FFA500'],
['name' => 'Purple', 'hex' => '800080'],
['name' => 'Pink', 'hex' => 'FFC0CB'],
['name' => 'Brown', 'hex' => 'A52A2A'],
['name' => 'Gray', 'hex' => '808080'],
['name' => 'Black', 'hex' => '000000'],
['name' => 'White', 'hex' => 'FFFFFF'],
['name' => 'Gold', 'hex' => 'FFD700'],
['name' => 'Silver', 'hex' => 'C0C0C0'],
['name' => 'Cyan', 'hex' => '00FFFF']
];
foreach ($colors as $color) {
Color::create($color);
}
}
}
+22 -6
View File
@@ -3,9 +3,12 @@
namespace Database\Seeders; namespace Database\Seeders;
use App\Models\User; use App\Models\User;
// use Illuminate\Database\Console\Seeds\WithoutModelEvents;
use Illuminate\Database\Seeder; use Illuminate\Database\Seeder;
use Illuminate\Database\Console\Seeds\WithoutModelEvents;
use Database\Seeders\ColorSeeder;
use Database\Seeders\ManufacturerSeeder;
use Database\Seeders\FilamentTypeSeeder;
use Database\Seeders\OrderStatusSeeder;
class DatabaseSeeder extends Seeder class DatabaseSeeder extends Seeder
{ {
/** /**
@@ -13,11 +16,24 @@ class DatabaseSeeder extends Seeder
*/ */
public function run(): void public function run(): void
{ {
// User::factory(10)->create(); User::factory(10)->create();
User::factory()->create([ User::create([
'name' => 'Test User', 'name' => 'Admin',
'email' => 'test@example.com', 'email' => 'admin@local',
'password' => bcrypt('password')
]); ]);
$this ->call([
ColorSeeder::class,
ManufacturerSeeder::class,
FilamentTypeSeeder::class,
OrderStatusSeeder::class,
BuildplateSeeder::class,
CalculationpresetSeeder::class,
PrintertypeSeeder::class,
FilamentSeeder::class,
]);
} }
} }
+26
View File
@@ -0,0 +1,26 @@
<?php
namespace Database\Seeders;
use Illuminate\Database\Console\Seeds\WithoutModelEvents;
use Illuminate\Database\Seeder;
class FilamentSeeder extends Seeder
{
/**
* Run the database seeds.
*/
public function run(): void
{
// Seed predefined Filaments
$filaments = [
['name' => 'Bambu PLA Basic', 'manufacturer_id' => 1, 'filament_type_id' => 1, 'color_id' => 10, 'temp_max' => 230, 'temp_min' => 180, 'price' => 19.99, 'weight' => 1000, 'diameter' => '1.75'],
['name' => 'Bambu PLA Basic', 'manufacturer_id' => 1, 'filament_type_id' => 1, 'color_id' => 11, 'temp_max' => 230, 'temp_min' => 180, 'price' => 19.99, 'weight' => 1000, 'diameter' => '1.75'],
];
foreach ($filaments as $filament) {
\App\Models\Filament::create($filament);
}
}
}
+26
View File
@@ -0,0 +1,26 @@
<?php
namespace Database\Seeders;
use Illuminate\Database\Console\Seeds\WithoutModelEvents;
use Illuminate\Database\Seeder;
use App\Models\FilamentType as Type;
class FilamentTypeSeeder extends Seeder
{
/**
* Run the database seeds.
*/
public function run(): void
{
// Create Predefined Filament Types
$filamentTypes = [
['name' => 'PLA', 'description' => 'Standard filament type.'],
['name' => 'PETG', 'description' => 'Premium filament type.'],
];
foreach ($filamentTypes as $filamentType) {
Type::create($filamentType);
}
}
}
+28
View File
@@ -0,0 +1,28 @@
<?php
namespace Database\Seeders;
use Illuminate\Database\Console\Seeds\WithoutModelEvents;
use Illuminate\Database\Seeder;
use App\Models\Manufacturer;
class ManufacturerSeeder extends Seeder
{
/**
* Run the database seeds.
*/
public function run(): void
{
// Create predefined Manufacturers
$manufacturers = [
['name' => 'Bambulab', 'description' => 'Bambulab is a manufacturer of high quality products.', 'website' => 'https://bambulab.com', 'logo' => ''],
['name' => 'Sunlu', 'description' => 'Sunlu is a manufacturer of high quality products.', 'website' => 'https://sunlu.com', 'logo' => '']
];
foreach ($manufacturers as $manufacturer) {
Manufacturer::create($manufacturer);
}
}
}
+27
View File
@@ -0,0 +1,27 @@
<?php
namespace Database\Seeders;
use Illuminate\Database\Console\Seeds\WithoutModelEvents;
use Illuminate\Database\Seeder;
use App\Models\OrderStatus;
class OrderStatusSeeder extends Seeder
{
/**
* Run the database seeds.
*/
public function run(): void
{
// Define Order Statuses
$orderStatuses = [
['name' => 'Ordered'],
['name' => 'Shipped'],
['name' => 'Delivered']
];
foreach ($orderStatuses as $orderStatus) {
OrderStatus::create($orderStatus);
}
}
}
+27
View File
@@ -0,0 +1,27 @@
<?php
namespace Database\Seeders;
use App\Models\Printertype;
use Illuminate\Database\Console\Seeds\WithoutModelEvents;
use Illuminate\Database\Seeder;
class PrintertypeSeeder extends Seeder
{
/**
* Run the database seeds.
*/
public function run(): void
{
// Create Predefined Printer Types
$printertypes = [
['name' => 'Bambulab P1S', 'manufacturer_id' => 1, 'description' => 'Standard printer type.', 'temp_max' => '300', 'bed_size_x' => '25.6', 'bed_size_y' => '25.6', 'price' => 559],
['name' => 'Bambulab P2S', 'manufacturer_id' => 1, 'description' => 'Standard printer type.', 'temp_max' => '300', 'bed_size_x' => '25.6', 'bed_size_y' => '25.6', 'price' => 749],
];
foreach ($printertypes as $printertype) {
Printertype::create($printertype);
}
}
}
-1
View File
@@ -1 +0,0 @@
MIT: https://spdx.org/licenses/MIT.html
+1151 -1675
View File
File diff suppressed because it is too large Load Diff
+5 -4
View File
@@ -7,13 +7,14 @@
}, },
"devDependencies": { "devDependencies": {
"@tailwindcss/forms": "^0.5.7", "@tailwindcss/forms": "^0.5.7",
"@tailwindcss/postcss": "^4.1.17",
"@tailwindcss/typography": "^0.5.10", "@tailwindcss/typography": "^0.5.10",
"autoprefixer": "^10.4.16", "@tailwindcss/vite": "^4.1.17",
"axios": "^1.7.4", "axios": "^1.7.4",
"concurrently": "^9.0.1", "concurrently": "^9.0.1",
"laravel-vite-plugin": "^1.0", "laravel-vite-plugin": "^1.2.0",
"postcss": "^8.4.32", "postcss": "^8.4.32",
"tailwindcss": "^3.4.0", "tailwindcss": "^4.1.17",
"vite": "^6.0" "vite": "^6.0.11"
} }
} }
+1 -2
View File
@@ -1,6 +1,5 @@
export default { export default {
plugins: { plugins: {
tailwindcss: {}, '@tailwindcss/postcss': {},
autoprefixer: {},
}, },
}; };
+5 -2
View File
@@ -1,5 +1,6 @@
<?php <?php
use Illuminate\Foundation\Application;
use Illuminate\Http\Request; use Illuminate\Http\Request;
define('LARAVEL_START', microtime(true)); define('LARAVEL_START', microtime(true));
@@ -13,5 +14,7 @@ if (file_exists($maintenance = __DIR__.'/../storage/framework/maintenance.php'))
require __DIR__.'/../vendor/autoload.php'; require __DIR__.'/../vendor/autoload.php';
// Bootstrap Laravel and handle the request... // Bootstrap Laravel and handle the request...
(require_once __DIR__.'/../bootstrap/app.php') /** @var Application $app */
->handleRequest(Request::capture()); $app = require_once __DIR__.'/../bootstrap/app.php';
$app->handleRequest(Request::capture());
+137 -3
View File
@@ -1,6 +1,140 @@
@tailwind base; @import 'tailwindcss';
@tailwind components; @import '../../vendor/livewire/flux/dist/flux.css';
@tailwind utilities;
@plugin '@tailwindcss/forms';
@plugin '@tailwindcss/typography';
@source '../../vendor/laravel/framework/src/Illuminate/Pagination/resources/views/*.blade.php';
@source '../../vendor/laravel/jetstream/**/*.blade.php';
@theme {
--font-sans: Inter, ui-sans-serif, system-ui, sans-serif, 'Apple Color Emoji',
'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
--color-jet: #33312e;
--color-pumpkin: #FE7F2D;
--color-olivine: #A1C181;
--color-cornflower: #8ecae6;
--color-pacific: #219ebc;
--color-elephant: #023047;
--color-selective: #ffb703;
--color-gold-drop: #fb8500;
--color-jet-50: #f6f5f5;
--color-jet-100: #e8e6e5;
--color-jet-200: #d3d0ce;
--color-jet-300: #b5afab;
--color-jet-400: #8f8781;
--color-jet-500: #746c66;
--color-jet-600: #635e57;
--color-jet-700: #53504b;
--color-jet-800: #484542;
--color-jet-900: #3f3d3a;
--color-jet-950: #33312e;
--color-pumpkin-50: #fff6ed;
--color-pumpkin-100: #ffebd4;
--color-pumpkin-200: #ffd2a9;
--color-pumpkin-300: #ffb272;
--color-pumpkin-400: #FE7F2D;
--color-pumpkin-500: #fd6412;
--color-pumpkin-600: #ee4a08;
--color-pumpkin-700: #c53509;
--color-pumpkin-800: #9c2b10;
--color-pumpkin-900: #7e2610;
--color-pumpkin-950: #440f06;
--color-olivine-50: #f3f7ee;
--color-olivine-100: #e4edda;
--color-olivine-200: #ccdeb8;
--color-olivine-300: #a1c181;
--color-olivine-400: #8cb16a;
--color-olivine-500: #6f964c;
--color-olivine-600: #55763a;
--color-olivine-700: #435b30;
--color-olivine-800: #384a2a;
--color-olivine-900: #324027;
--color-olivine-950: #182211;
--color-cornflower-50: #f2f9fd;
--color-cornflower-100: #e5f1f9;
--color-cornflower-200: #c5e3f2;
--color-cornflower-300: #8ecae6;
--color-cornflower-400: #58b2d8;
--color-cornflower-500: #3298c5;
--color-cornflower-600: #237ba6;
--color-cornflower-700: #1d6187;
--color-cornflower-800: #1c5370;
--color-cornflower-900: #1c465e;
--color-cornflower-950: #132d3e;
--color-pacific-50: #eefbfd;
--color-pacific-100: #d5f3f8;
--color-pacific-200: #b0e7f1;
--color-pacific-300: #7ad5e6;
--color-pacific-400: #3cb9d4;
--color-pacific-500: #219ebc;
--color-pacific-600: #1e7e9c;
--color-pacific-700: #1f657f;
--color-pacific-800: #215569;
--color-pacific-900: #204659;
--color-pacific-950: #102e3c;
--color-elephant-50: #effaff;
--color-elephant-100: #ddf5ff;
--color-elephant-200: #b4edff;
--color-elephant-300: #72e0ff;
--color-elephant-400: #27d2ff;
--color-elephant-500: #00bdfc;
--color-elephant-600: #0098d9;
--color-elephant-700: #0079af;
--color-elephant-800: #006690;
--color-elephant-900: #035477;
--color-elephant-950: #023047;
--color-selective-50: #fffeea;
--color-selective-100: #fff9c5;
--color-selective-200: #fff485;
--color-selective-300: #ffe746;
--color-selective-400: #ffd71b;
--color-selective-500: #ffb703;
--color-selective-600: #e28b00;
--color-selective-700: #bb6202;
--color-selective-800: #984b08;
--color-selective-900: #7c3e0b;
--color-selective-950: #481f00;
--color-gold-drop-50: #fffbec;
--color-gold-drop-100: #fff5d3;
--color-gold-drop-200: #ffe8a5;
--color-gold-drop-300: #ffd56d;
--color-gold-drop-400: #ffb732;
--color-gold-drop-500: #ff9f0a;
--color-gold-drop-600: #fb8500;
--color-gold-drop-700: #cc6302;
--color-gold-drop-800: #a14c0b;
--color-gold-drop-900: #82400c;
--color-gold-drop-950: #461e04;
}
/*
The default border color has changed to `currentColor` in Tailwind CSS v4,
so we've added these compatibility styles to make sure everything still
looks the same as it did with Tailwind CSS v3.
If we ever want to remove these styles, we need to add an explicit border
color utility to any element that depends on these defaults.
*/
@layer base {
*,
::after,
::before,
::backdrop,
::file-selector-button {
border-color: var(--color-gray-200, currentColor);
}
}
[x-cloak] { [x-cloak] {
display: none; display: none;
@@ -13,7 +13,7 @@
<!-- Token Name --> <!-- Token Name -->
<div class="col-span-6 sm:col-span-4"> <div class="col-span-6 sm:col-span-4">
<x-label for="name" value="{{ __('Token Name') }}" /> <x-label for="name" value="{{ __('Token Name') }}" />
<x-input id="name" type="text" class="mt-1 block w-full" wire:model="createApiTokenForm.name" autofocus /> <x-input id="name" type="text" class="mt-1 block w-full" wire:model.live="createApiTokenForm.name" autofocus />
<x-input-error for="name" class="mt-2" /> <x-input-error for="name" class="mt-2" />
</div> </div>
@@ -25,8 +25,8 @@
<div class="mt-2 grid grid-cols-1 md:grid-cols-2 gap-4"> <div class="mt-2 grid grid-cols-1 md:grid-cols-2 gap-4">
@foreach (Laravel\Jetstream\Jetstream::$permissions as $permission) @foreach (Laravel\Jetstream\Jetstream::$permissions as $permission)
<label class="flex items-center"> <label class="flex items-center">
<x-checkbox wire:model="createApiTokenForm.permissions" :value="$permission"/> <x-checkbox wire:model.live="createApiTokenForm.permissions" :value="$permission"/>
<span class="ms-2 text-sm text-gray-600">{{ $permission }}</span> <span class="ms-2 text-sm text-gray-600 dark:text-gray-400">{{ $permission }}</span>
</label> </label>
@endforeach @endforeach
</div> </div>
@@ -64,7 +64,7 @@
<div class="space-y-6"> <div class="space-y-6">
@foreach ($this->user->tokens->sortBy('name') as $token) @foreach ($this->user->tokens->sortBy('name') as $token)
<div class="flex items-center justify-between"> <div class="flex items-center justify-between">
<div class="break-all"> <div class="break-all dark:text-white">
{{ $token->name }} {{ $token->name }}
</div> </div>
@@ -105,7 +105,7 @@
</div> </div>
<x-input x-ref="plaintextToken" type="text" readonly :value="$plainTextToken" <x-input x-ref="plaintextToken" type="text" readonly :value="$plainTextToken"
class="mt-4 bg-gray-100 px-4 py-2 rounded font-mono text-sm text-gray-500 w-full break-all" class="mt-4 bg-gray-100 px-4 py-2 rounded-sm font-mono text-sm text-gray-500 w-full break-all"
autofocus autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" autofocus autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"
@showing-token-modal.window="setTimeout(() => $refs.plaintextToken.select(), 250)" @showing-token-modal.window="setTimeout(() => $refs.plaintextToken.select(), 250)"
/> />
@@ -128,8 +128,8 @@
<div class="grid grid-cols-1 md:grid-cols-2 gap-4"> <div class="grid grid-cols-1 md:grid-cols-2 gap-4">
@foreach (Laravel\Jetstream\Jetstream::$permissions as $permission) @foreach (Laravel\Jetstream\Jetstream::$permissions as $permission)
<label class="flex items-center"> <label class="flex items-center">
<x-checkbox wire:model="updateApiTokenForm.permissions" :value="$permission"/> <x-checkbox wire:model.live="updateApiTokenForm.permissions" :value="$permission"/>
<span class="ms-2 text-sm text-gray-600">{{ $permission }}</span> <span class="ms-2 text-sm text-gray-600 dark:text-gray-400">{{ $permission }}</span>
</label> </label>
@endforeach @endforeach
</div> </div>
+1 -1
View File
@@ -1,6 +1,6 @@
<x-app-layout> <x-app-layout>
<x-slot name="header"> <x-slot name="header">
<h2 class="font-semibold text-xl text-gray-800 leading-tight"> <h2 class="font-semibold text-xl text-gray-800 dark:text-gray-200 leading-tight">
{{ __('API Tokens') }} {{ __('API Tokens') }}
</h2> </h2>
</x-slot> </x-slot>

Some files were not shown because too many files have changed in this diff Show More