diff --git a/app/Http/Controllers/Admin/ContentController.php b/app/Http/Controllers/Admin/ContentController.php index 3b90c41..91f48d8 100644 --- a/app/Http/Controllers/Admin/ContentController.php +++ b/app/Http/Controllers/Admin/ContentController.php @@ -89,6 +89,15 @@ class ContentController extends Controller // Offline / Maintenance Mode 'shop_offline_title', 'shop_offline_message', + + // 3D Print Kostprijscalculator Tarieven + 'calc_filament_price_kg', + 'calc_electricity_kwh', + 'calc_printer_wattage', + 'calc_machine_hourly_rate', + 'calc_handling_flat', + 'calc_default_markup', + 'calc_failure_rate', ]; // Handle checkbox toggles that aren't present if unchecked diff --git a/app/Http/Controllers/Admin/ProductController.php b/app/Http/Controllers/Admin/ProductController.php index 75e2933..71d0e53 100644 --- a/app/Http/Controllers/Admin/ProductController.php +++ b/app/Http/Controllers/Admin/ProductController.php @@ -5,6 +5,7 @@ namespace App\Http\Controllers\Admin; use App\Http\Controllers\Controller; use App\Models\Category; use App\Models\Product; +use App\Services\PriceCalculatorService; use Illuminate\Http\JsonResponse; use Illuminate\Http\RedirectResponse; use Illuminate\Http\Request; @@ -171,6 +172,25 @@ class ProductController extends Controller ]); } + /** + * Calculate 3D printing cost price and suggested retail price. + */ + public function calculatePrice(Request $request, PriceCalculatorService $calculator): JsonResponse + { + $weight = (float) $request->input('weight_grams', 80); + $hours = (float) $request->input('print_time_hours', 4.0); + $colors = (int) $request->input('color_count', 1); + $material = (string) $request->input('material', 'pla'); + $markup = $request->filled('markup_percent') ? (float) $request->input('markup_percent') : null; + + $result = $calculator->calculate($weight, $hours, $colors, $material, $markup); + + return response()->json([ + 'success' => true, + 'data' => $result, + ]); + } + /** * Sanitize and filter gallery images. * diff --git a/app/Services/MakerWorldService.php b/app/Services/MakerWorldService.php index a3cda62..b2c16d6 100644 --- a/app/Services/MakerWorldService.php +++ b/app/Services/MakerWorldService.php @@ -653,19 +653,14 @@ class MakerWorldService $dimensions = is_array($design['dimensions']) ? implode(' x ', $design['dimensions']) : (string) $design['dimensions']; } - // Calculate a smart suggested retail price - // Base starting price of 9.95, + ~0.08 per gram + 1.25 per print hour - $suggestedPrice = 14.95; - if ($weightGrams || $printTimeHours) { - $cost = 5.0; - if ($weightGrams) { - $cost += ($weightGrams * 0.07); - } - if ($printTimeHours) { - $cost += ($printTimeHours * 1.50); - } - $suggestedPrice = round(max(9.95, $cost * 1.6), 2); + // Calculate a smart suggested retail price using the 3D Printing Cost Calculator + $colorCount = 1; + if (! empty($profile['filaments']) && is_array($profile['filaments'])) { + $colorCount = max(1, min(4, count($profile['filaments']))); } + $calculator = app(PriceCalculatorService::class); + $calcResult = $calculator->calculate($weightGrams ?: 85, $printTimeHours ?: 4.0, $colorCount); + $suggestedPrice = $calcResult['suggested_price']; // Creator and MakerWorld URL $authorName = $design['designCreator']['name'] ?? $design['designCreator']['handle'] ?? 'MakerWorld Creator'; diff --git a/app/Services/PriceCalculatorService.php b/app/Services/PriceCalculatorService.php new file mode 100644 index 0000000..62a2a4f --- /dev/null +++ b/app/Services/PriceCalculatorService.php @@ -0,0 +1,160 @@ + 1.00, // 0% extra waste for single-color + 2 => 1.15, // +15% purge tower & poop waste + 3 => 1.25, // +25% purge tower & poop waste + 4 => 1.35, // +35% purge tower & poop waste + ]; + + /** + * Material base multipliers relative to standard PLA. + */ + public const MATERIAL_MULTIPLIERS = [ + 'pla' => 1.00, + 'petg' => 1.20, + 'silk' => 1.30, + 'tpu' => 1.40, + ]; + + /** + * Calculate comprehensive 3D printing costs and suggested retail price. + * + * @param float|int|null $weightGrams Model weight in grams + * @param float|int|null $printTimeHours Printing duration in hours + * @param int $colorCount Number of filament colors (1 to 4) + * @param string $material Material code ('pla', 'petg', 'silk', 'tpu') + * @param float|null $customMarkupPercent Optional override for markup percentage (e.g. 60%) + * @return array Detailed calculation breakdown + */ + public function calculate( + float|int|null $weightGrams = 80, + float|int|null $printTimeHours = 4.0, + int $colorCount = 1, + string $material = 'pla', + ?float $customMarkupPercent = null + ): array { + $weight = max(1.0, (float) ($weightGrams ?: 80)); + $hours = max(0.2, (float) ($printTimeHours ?: 4.0)); + $colors = max(1, min(4, $colorCount)); + $matCode = strtolower(trim($material)) ?: 'pla'; + + // 1. Settings / Rates configuration + $filamentPriceKg = (float) Setting::get('calc_filament_price_kg', 20.00); // € 20 / kg + $electricityPriceKwh = (float) Setting::get('calc_electricity_kwh', 0.35); // € 0.35 / kWh + $printerWattage = (int) Setting::get('calc_printer_wattage', 150); // 150 W average Bambu Lab + $machineHourlyRate = (float) Setting::get('calc_machine_hourly_rate', 0.50); // € 0.50 / uur afschrijving & nozzle/bed slijtage + $handlingFlat = (float) Setting::get('calc_handling_flat', 1.50); // € 1.50 voorbereiding, supports & verpakking + $failureRate = (float) Setting::get('calc_failure_rate', 5.0); // 5% faalkans opslag + $markupPercent = $customMarkupPercent !== null ? $customMarkupPercent : (float) Setting::get('calc_default_markup', 65.0); // 65% winstmarge + $vatPercent = 21.0; // 21% btw + + // 2. Multipliers + $colorWasteMult = self::COLOR_WASTE_MULTIPLIERS[$colors] ?? 1.00; + $matMult = self::MATERIAL_MULTIPLIERS[$matCode] ?? 1.00; + + // 3. Material cost (includes multi-color purge tower waste) + $effectiveWeight = round($weight * $colorWasteMult, 1); + $materialCost = ($effectiveWeight / 1000.0) * ($filamentPriceKg * $matMult); + + // 4. Electricity cost + $kw = $printerWattage / 1000.0; + $kwhUsed = $hours * $kw; + $electricityCost = $kwhUsed * $electricityPriceKwh; + + // 5. Machine wear & depreciation + $machineCost = $hours * $machineHourlyRate; + + // 6. Multi-color handling fee (extra setup for loading AMS spools) + $colorHandlingCost = max(0, $colors - 1) * 0.50; + + // 7. Handling / labor + $handlingCost = $handlingFlat + $colorHandlingCost; + + // 8. Direct production cost + $subtotalCost = $materialCost + $electricityCost + $machineCost + $handlingCost; + + // 9. Failure rate risk buffer + $failureCost = $subtotalCost * ($failureRate / 100.0); + + // 10. Net cost price (direct production cost + risk) + $totalCostPrice = $subtotalCost + $failureCost; + + // 11. Margin & Retail price excl. VAT + $profitAmount = $totalCostPrice * ($markupPercent / 100.0); + $priceExclVat = $totalCostPrice + $profitAmount; + + // 12. VAT (21%) & Consumer price + $vatAmount = $priceExclVat * ($vatPercent / 100.0); + $consumerPriceExact = $priceExclVat + $vatAmount; + + // 13. Smart commercial rounding (.95 / .50) + $suggestedRetailPrice = $this->smartRound($consumerPriceExact); + + return [ + 'inputs' => [ + 'weight_grams' => $weight, + 'print_time_hours' => $hours, + 'color_count' => $colors, + 'material' => $matCode, + 'markup_percent' => $markupPercent, + ], + 'rates' => [ + 'filament_price_kg' => $filamentPriceKg, + 'electricity_price_kwh' => $electricityPriceKwh, + 'machine_hourly_rate' => $machineHourlyRate, + 'handling_flat' => $handlingFlat, + 'failure_rate_percent' => $failureRate, + ], + 'breakdown' => [ + 'effective_weight_grams' => $effectiveWeight, + 'purge_waste_grams' => round($effectiveWeight - $weight, 1), + 'material_cost' => round($materialCost, 2), + 'electricity_cost' => round($electricityCost, 2), + 'machine_cost' => round($machineCost, 2), + 'handling_cost' => round($handlingCost, 2), + 'failure_cost' => round($failureCost, 2), + 'total_cost_price' => round($totalCostPrice, 2), + 'profit_amount' => round($profitAmount, 2), + 'price_excl_vat' => round($priceExclVat, 2), + 'vat_amount' => round($vatAmount, 2), + 'price_incl_vat_exact' => round($consumerPriceExact, 2), + ], + 'suggested_price' => $suggestedRetailPrice, + 'suggested_price_formatted' => '€ '.number_format($suggestedRetailPrice, 2, ',', '.'), + ]; + } + + /** + * Smart commercial rounding to appealing .95 or .50 price points. + */ + protected function smartRound(float $rawPrice): float + { + // Enforce minimum price of 6.95 + if ($rawPrice <= 7.00) { + return 6.95; + } + + $floor = floor($rawPrice); + $fraction = $rawPrice - $floor; + + if ($fraction <= 0.25) { + $rounded = $floor - 0.05; // e.g. 14.10 -> 13.95 or 14.00 -> 13.95, but keep at least floor + + return max(6.95, $floor < $rawPrice ? $floor + 0.50 : $floor - 0.05); + } elseif ($fraction <= 0.70) { + return $floor + 0.50; // e.g. 14.40 -> 14.50 + } else { + return $floor + 0.95; // e.g. 14.80 -> 14.95 + } + } +} diff --git a/public/images/logo-icon.svg b/public/images/logo-icon.svg index d9ce200..60fe76d 100644 --- a/public/images/logo-icon.svg +++ b/public/images/logo-icon.svg @@ -1,70 +1,41 @@ - + - - - - - - - - - - - - - - - - - - - - - - - - + + - + - - + + - - - - - - - + + + + + - - - - - - - + + + + + + + + + + - - - - - - + + + + - - - - - - - + + - diff --git a/public/images/logo.svg b/public/images/logo.svg index bdc8bff..5988b37 100644 --- a/public/images/logo.svg +++ b/public/images/logo.svg @@ -1,105 +1,68 @@ - + - - - - - - - - - - - - - - - - - - - - - - - - + + - + - - + + - - - + + + + + - - + + + + + - - - - - - - - - - + + + + - - - - - - - - - - - + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - + + + + + + + - - - Jouw + + + jouw - - driedee + + driedee - - - .NL + + + + .nl + - diff --git a/resources/views/admin/content/index.blade.php b/resources/views/admin/content/index.blade.php index d1d16f8..bd10c75 100644 --- a/resources/views/admin/content/index.blade.php +++ b/resources/views/admin/content/index.blade.php @@ -6,26 +6,26 @@
-
+
-
+
Shop Content & Stijl CMS
-

Layout & Teksten Beheer

-

- Pas alle teksten, titels, USP's, call-to-actions en de lay-out van jouw webshop direct aan. Wijzigingen zijn onmiddellijk live zichtbaar voor bezoekers! +

Layout & Teksten Beheer

+

+ Pas alle teksten, titels, USP's, call-to-actions, kostprijstarieven en de lay-out van jouw webshop direct aan. Wijzigingen zijn onmiddellijk live zichtbaar!

-
- - +
+ + Bekijk Live Shop
@csrf -
@@ -37,12 +37,12 @@ @csrf -
+
+ +
@@ -123,101 +133,101 @@
-
-
-

Homepage Hero Bovenkant

-

De eerste sectie die bezoekers zien bij het openen van de winkel.

+
+
+

Homepage Hero Bovenkant

+

De eerste sectie die bezoekers zien bij het openen van de winkel.

- +
- +
- + -

Kies een pakkende, speelse titel die meteen duidelijk maakt wat er te koop is.

+

Kies een pakkende, speelse titel die meteen duidelijk maakt wat er te koop is.

- +
-
-
- Primaire Actieknop (Gele knop) +
+
+ Primaire Actieknop (Gele knop)
- - + +
- - + +
-
- Secundaire Actieknop (Lila knop) +
+ Secundaire Actieknop (Lila knop)
- - + +
- - + +
-
- 3 Kwaliteitskenmerken onder de knoppen +
+ 3 Kwaliteitskenmerken onder de knoppen
-
- - - +
+ + +
-
- - - +
+ + +
-
- - - +
+ + +
@@ -229,62 +239,62 @@
-
-
-

Waarom Jouwdriedee? (Voordelen & USP's)

-

De 4 kleurrijke informatieblokken onderaan de homepage.

+
+
+

Waarom Jouwdriedee? (Voordelen & USP's)

+

De 4 kleurrijke informatieblokken onderaan de homepage.

- - + +
- - + +
- - + +
-
+
-
- Voordeel 1 (Paars blok) - - +
+ Voordeel 1 (Paars blok) + +
-
- Voordeel 2 (Geel blok) - - +
+ Voordeel 2 (Geel blok) + +
-
- Voordeel 3 (Groen blok) - - +
+ Voordeel 3 (Groen blok) + +
-
- Voordeel 4 (Blauw blok) - - +
+ Voordeel 4 (Blauw blok) + +
- - + +
@@ -294,105 +304,248 @@
-
-
-

Categorieën & Collecties Sectie

-

Titels van het blok met Fidget Toys, Pokémon en Film & Gaming.

+
+
+

Categorieën & Collecties Sectie

+

Titels van het blok met Fidget Toys, Pokémon en Film & Gaming.

- - + +
- - + +
- - + +
-
-
-

Populaire Modellen (Uitgelichte Prints)

-

Titels van de product-showcase op de homepage.

+
+
+

Populaire Modellen (Uitgelichte Prints)

+

Titels van de product-showcase op de homepage.

- - + +
- - + +
- - + +
- + -
-
-
-

Bovenbalk (Top Announcement Bar)

-

De dunne balk helemaal bovenaan de website voor mededelingen en levertijd.

+
+
+
+
+ + 3D Printing Cost Calculator Standaarden +
+

3D Print Kostprijs Tarieven & Formules

+

+ Deze standaardtarieven worden gebruikt bij het automatisch berekenen van de adviesprijzen voor binnengehaalde MakerWorld modellen en in de interactieve calculator bij het bewerken van een artikel. Gebaseerd op het model van 3dprintingcostcalculator.com/nl. +

-
+
+ +
+ +
+ € + +
+

Gemiddelde inkoop per kg Bambu/eSun PLA+ spool.

+
+ + +
+ +
+ € + +
+

Energietarief inclusief belasting en netbeheer.

+
+ + +
+ +
+ + W +
+

Gemiddeld verbruik Bambu Lab (120 - 180W).

+
+ + +
+ +
+ € + +
+

Voor nozzle-slijtage, riemen, lagers en onderhoud.

+
+ + +
+ +
+ € + +
+

Bedprep, supports verwijderen en inpakdoos.

+
+ + +
+ +
+ + % +
+

Winstmarge bovenop de totale productiekosten.

+
+ + +
+ +
+ + % +
+

Opslag voor mislukte prints of warping risico.

+
+
+ + +
+
+ + Automatische Meerkleurige & Commerciële Afronding +
+

+ Het systeem berekent bij meerkleurige prints (Bambu Lab AMS) automatisch de spoeltoren- en purge-afvalfactor (+15% bij 2 kleuren, +25% bij 3 kleuren, +35% bij 4 kleuren). Alle adviesprijzen worden commercieel afgerond op psychologische webshopprijzen (bijv. € 12,95 of € 24,50) inclusief 21% btw. +

+
+
+
+ + + + +
+
+
+

Bovenbalk (Top Announcement Bar)

+

De dunne balk helemaal bovenaan de website voor mededelingen en levertijd.

+
+ +
-
- +
- +
- +
@@ -401,73 +554,73 @@
- +
-
-
-

Voettekst (Footer Informatie & Contact)

-

Teksten in de donkere voettekst onderaan alle pagina's.

+
+
+

Voettekst (Footer Informatie & Contact)

+

Teksten in de footer onderaan alle pagina's.

- +
- +
- +
- +
- +
- +
@@ -475,51 +628,51 @@
- +
-
-
-

Algemeen & Branding

-

Shopnaam, zoekmachine omschrijving en algemene instellingen.

+
+
+

Algemeen & Branding

+

Shopnaam, zoekmachine omschrijving en algemene instellingen.

- +
- +
- +
-
- +
+ @php $currentTheme = setting('theme_palette', 'default'); @endphp - + @@ -529,80 +682,80 @@
- +
-
-
+
+
-

- +

+ E-mail & SMTP Status

-

Controleer waarom wachtwoordherstel- en registratiemails wel of niet aankomen op Gmail.

+

Controleer waarom wachtwoordherstel- en registratiemails wel of niet aankomen op Gmail.

@php $activeMailer = config('mail.default'); @endphp - + Driver: {{ strtoupper($activeMailer) }}
@if($activeMailer === 'log') -
-
- +
+
+ Belangrijke Oorzaak: MAIL_MAILER staat op 'log'

Momenteel worden uitgaande e-mails (zoals wachtwoord vergeten en welkomstmails) weggeschreven naar de serverlogbestanden en niet via internet naar Gmail verzonden.

- Om echte e-mails te versturen, moet op de server (Coolify Environment Variables) MAIL_MAILER=smtp ingesteld worden met de bijbehorende SMTP-host, poort en wachtwoord. + Om echte e-mails te versturen, moet op de server (Coolify Environment Variables) MAIL_MAILER=smtp ingesteld worden met de bijbehorende SMTP-host, poort en wachtwoord.

@endif
-
-
Huidige Server Mail Instellingen
-
- MAIL_MAILER: - {{ config('mail.default') }} +
+
Huidige Server Mail Instellingen
+
+ MAIL_MAILER: + {{ config('mail.default') }}
-
- MAIL_HOST: - {{ config('mail.mailers.smtp.host') ?: '(geen)' }} +
+ MAIL_HOST: + {{ config('mail.mailers.smtp.host') ?: '(geen)' }}
-
- MAIL_PORT: - {{ config('mail.mailers.smtp.port') ?: '(geen)' }} +
+ MAIL_PORT: + {{ config('mail.mailers.smtp.port') ?: '(geen)' }}
-
- MAIL_USERNAME: - {{ config('mail.mailers.smtp.username') ?: '(geen)' }} +
+ MAIL_USERNAME: + {{ config('mail.mailers.smtp.username') ?: '(geen)' }}
-
- MAIL_FROM_ADDRESS: - {{ config('mail.from.address') }} +
+ MAIL_FROM_ADDRESS: + {{ config('mail.from.address') }}
-
-
Gmail Bezorging Checklist
-
    +
    +
    Gmail Bezorging Checklist
    +
    • - 1. + 1. SMTP Provider: Gebruik een werkende SMTP server (bijv. Brevo, Resend, Mailgun of Versio mail).
    • - 2. - SPF DNS Record: Google vereist een SPF TXT-record op jouwdriedee.nl. + 2. + SPF DNS Record: Google vereist een SPF TXT-record op jouwdriedee.nl.
    • - 3. + 3. DKIM & DMARC: Zonder DKIM plaatst Gmail emails van nieuwe domeinen direct in de Spammap.
    @@ -610,27 +763,27 @@
    -
    -
    - +
    +
    + Direct een Test E-mail Versturen
    -

    +

    Vul hier een e-mailadres in (bijv. je eigen Gmail) om direct te testen of e-mails aankomen en of de verbinding met de mailserver slaagt.

    -
    +
    - +
    -
    +
    -
    +
    - -

    Webshop Offline Modus (Onderhoud)

    + +

    Webshop Offline Modus (Onderhoud)

    -

    +

    Wanneer ingeschakeld, kunnen gewone bezoekers niets bestellen en zien zij direct de grote rode offline banner. Alleen ingelogde beheerders kunnen de website bekijken.

    @@ -663,7 +816,7 @@ type="submit" formaction="{{ route('admin.toggle-offline') }}" formmethod="POST" - class="px-5 py-2.5 rounded-xl {{ setting('shop_offline', '0') === '1' ? 'bg-emerald-500 hover:bg-emerald-400 text-slate-950' : 'bg-rose-600 hover:bg-rose-500 text-white' }} font-black text-xs uppercase tracking-wider transition flex items-center justify-center space-x-2 shrink-0 cursor-pointer shadow-lg" + class="px-5 py-2.5 rounded-xl {{ setting('shop_offline', '0') === '1' ? 'bg-emerald-600 hover:bg-emerald-500 text-white' : 'bg-rose-600 hover:bg-rose-500 text-white' }} font-black text-xs uppercase tracking-wider transition flex items-center justify-center space-x-2 shrink-0 cursor-pointer shadow-sm" > {{ setting('shop_offline', '0') === '1' ? 'Zet Webshop Weer ONLINE' : 'Zet Webshop Nu DIRECT OFFLINE' }} @@ -673,55 +826,55 @@ -
    +
    - Status Webshop Bereikbaarheid - + Status Webshop Bereikbaarheid + {{ setting('shop_offline', '0') === '1' ? 'De webshop is momenteel OFFLINE voor gewone bezoekers.' : 'De webshop is momenteel LIVE en open voor bestellingen.' }}
    - + -

    De grote rode hoofdtitel die bezoekers in beeld krijgen.

    +

    De grote rode hoofdtitel die bezoekers in beeld krijgen.

    - + -

    Uitleg over waarom de webshop tijdelijk offline staat en wanneer klanten terug kunnen komen.

    +

    Uitleg over waarom de webshop tijdelijk offline staat en wanneer klanten terug kunnen komen.

    -
    - Voorvertoning van de Offline Banner: -
    - +
    + Voorvertoning van de Offline Banner: +
    + 🔴 Webshop Tijdelijk Offline

    {{ setting('shop_offline_title', 'Aan deze webshop wordt hard gewerkt! 🛠️') }}

    -

    +

    {{ setting('shop_offline_message', 'Onze 3D printers worden momenteel opnieuw gekalibreerd en we bouwen aan nieuwe toffe prints en functies. We zijn heel snel weer online voor bestellingen!') }}

    @@ -731,14 +884,14 @@
    -
    -
    - +
    +
    + Wijzigingen worden direct live opgeslagen in de database.
    @endsection - diff --git a/resources/views/admin/makerworld/staging.blade.php b/resources/views/admin/makerworld/staging.blade.php index bc04dbf..54641b8 100644 --- a/resources/views/admin/makerworld/staging.blade.php +++ b/resources/views/admin/makerworld/staging.blade.php @@ -3,390 +3,371 @@ @section('title', 'Artikel Beheer (Geïmporteerde Modellen) | Jouwdriedee.nl Beheer') @section('content') -
    -
    +
    - -
    -
    -
    - - Staging & Curation - • - Geïmporteerde Modellen -
    -

    - - - - Artikel Beheer -

    -

    - Beoordeel automatisch binnengehaalde MakerWorld modellen. Stel de gewenste categorie en verkoopprijs in en publiceer ze met 1 klik naar de webshop! -

    + +
    +
    +
    + + Staging & Curation + • + Geïmporteerde Modellen +
    +

    + + + + Artikel Beheer +

    +

    + Beoordeel binnengehaalde MakerWorld modellen. Prijzen zijn automatisch berekend op basis van de 3D-printcalculator (gewicht, printtijd & kleuren). Pas naar wens aan en publiceer met 1 klik! +

    +
    + + + +
    + + + + + +
    +
    + +
    + +
    - -
    - - - Collecties & Auto-Sync - + +
    + +
    - - - Actieve Producten + + + @if(request()->hasAny(['q', 'collection_id'])) + + Wissen + + @endif + + +
    + + {{ $totalStaged }} concepten wachten op beoordeling + +
    +
    + + +
    +
    + + +
    + +
    + @csrf + + +
    + + +
    + +
    + + +
    + + +
    + +
    + @csrf + + +
    +
    + + + @if($stagedProducts->isNotEmpty()) +
    + + Pagina {{ $stagedProducts->currentPage() }} van {{ $stagedProducts->lastPage() }} +
    + @endif + + + @if($stagedProducts->isEmpty()) +
    +
    + +
    +

    Geen concepten in de wachtrij!

    +

    + Alle binnengehaalde modellen zijn al beoordeeld en gepubliceerd, of er zijn nog geen nieuwe modellen toegevoegd aan je gevolgde collecties. +

    +
    + @else +
    + @foreach($stagedProducts as $product) + @php + $printInfo = $product->print_info ?? []; + @endphp +
    + + +
    +
    + {{ $product->name }} - - @if(session('success')) -
    - -
    {{ session('success') }}
    -
    - @endif - - @if(session('error')) -
    - -
    {{ session('error') }}
    -
    - @endif - - - - - -
    -
    - -
    -
    - -
    - -
    - - -
    - -
    - - - - @if(request()->hasAny(['q', 'collection_id'])) - - Filters wissen - - @endif -
    - -
    - - {{ $totalStaged }} concepten wachten op beoordeling - -
    -
    - - -
    -
    - - -
    - -
    - @csrf - - -
    - - -
    - -
    - - -
    - - -
    - -
    - @csrf - - -
    -
    - - - @if($stagedProducts->isNotEmpty()) -
    - - Pagina {{ $stagedProducts->currentPage() }} van {{ $stagedProducts->lastPage() }} -
    - @endif - - - @if($stagedProducts->isEmpty()) -
    -
    - -
    -

    Geen concepten in de wachtrij!

    -

    - Alle binnengehaalde modellen zijn al beoordeeld en gepubliceerd, of er zijn nog geen nieuwe modellen toegevoegd aan je gevolgde collecties. -

    - -
    - @else -
    - @foreach($stagedProducts as $product) - @php - $printInfo = $product->print_info ?? []; - @endphp -
    - - -
    -
    - {{ $product->name }} - - -
    - -
    - - -
    - - Concept - - @if($product->makerworldCollection) - - {{ $product->makerworldCollection->name }} - - @endif -
    - - - - - + +
    +
    - - @if(!empty($product->gallery_images) && count($product->gallery_images) > 0) -
    - Foto's: - - @foreach(array_slice($product->gallery_images, 0, 6) as $galleryPic) - - @endforeach - @if(count($product->gallery_images) > 6) - +{{ count($product->gallery_images) - 6 }} meer - @endif -
    - @endif - - -
    -
    - Printtijd - - {{ $product->print_time_hours ? $product->print_time_hours . ' uur' : '-' }} + +
    + + Concept + + @if($product->makerworldCollection) + + {{ $product->makerworldCollection->name }} -
    -
    - Gewicht - - {{ $product->weight_grams ? $product->weight_grams . ' gram' : '-' }} - -
    -
    - Adviesprijs - - {{ $product->formatted_price }} - -
    + @endif
    - -
    -
    - Maker: {{ $product->makerworld_author ?? 'MakerWorld Maker' }} - #{{ $product->makerworld_id }} -
    + + + + +
    + + + @if(!empty($product->gallery_images) && count($product->gallery_images) > 0) +
    + Foto's: + + @foreach(array_slice($product->gallery_images, 0, 5) as $galleryPic) + + @endforeach + @if(count($product->gallery_images) > 5) + +{{ count($product->gallery_images) - 5 }} meer + @endif +
    + @endif + + +
    +
    + Printtijd + + {{ $product->print_time_hours ? $product->print_time_hours . ' u' : '-' }} + +
    +
    + Gewicht + + {{ $product->weight_grams ? $product->weight_grams . ' g' : '-' }} + +
    +
    + Adviesprijs + + {{ $product->formatted_price }} +
    - @if($product->status === 'published') - -
    -
    -
    - - Gepubliceerd in Webshop -
    - {{ $product->formatted_price }} + +
    +
    + Maker: {{ $product->makerworld_author ?? 'MakerWorld' }} + #{{ $product->makerworld_id }} +
    +
    +
    + + @if($product->status === 'published') + +
    +
    +
    + + In Webshop
    -
    - - - Bewerken - - - - + {{ $product->formatted_price }} +
    + +
    + @else + +
    + @csrf + + +
    + + +
    + +
    + +
    + + +
    + + +
    + +
    - @else - - - @csrf - - -
    - - -
    -
    - -
    - - -
    + +
    + - -
    - - -
    -
    + + + - -
    - - - - - - - -
    - - @endif - - -
    -
    - @endforeach -
    + @endif - -
    - {{ $stagedProducts->links() }} -
    - @endif + + +
    + @endforeach +
    + + +
    + {{ $stagedProducts->links() }} +
    + @endif -
    @endsection - diff --git a/resources/views/admin/products/create.blade.php b/resources/views/admin/products/create.blade.php index ca6bbaf..014a66e 100644 --- a/resources/views/admin/products/create.blade.php +++ b/resources/views/admin/products/create.blade.php @@ -3,16 +3,86 @@ @section('title', 'Nieuw Product Toevoegen | Jouwdriedee Beheer') @section('content') -
    +
    -
    +
    - + Terug naar Producten -

    Nieuw Product Toevoegen

    +

    Nieuw Product Toevoegen

    @@ -20,17 +90,18 @@
    @csrf -
    +
    +
    - - + +
    - - @foreach($categories as $cat)
    + + + +
    +
    +
    + 🖨️ +

    3D Print Kostprijscalculator

    + Automatisch Prijsvoorstel +
    + + +
    + +
    +
    + +
    + +
    + + gram +
    +
    + + +
    + +
    + + uur +
    +
    + + +
    + +
    + +
    +
    + + +
    + + +
    +
    + + +
    +
    + Winstmarge: +
    + + + + +
    +
    + + +
    + 🧵 Materiaal: € + ⚡ Stroom: € + ⚙️ Slijtage: € + Kostprijs: € +
    +
    + + +
    +
    +
    + € +
    +
    + Berekend Prijsvoorstel (incl. 21% btw) +
    + € + op basis van g • u • kleur(en) +
    +
    +
    + + +
    +
    +
    + +
    - - + +
    + € + +
    - - + +
    -
    - +