diff --git a/website/database/seeders/ConfigOptionSeeder.php b/website/database/seeders/ConfigOptionSeeder.php index 8b7641f..012c553 100644 --- a/website/database/seeders/ConfigOptionSeeder.php +++ b/website/database/seeders/ConfigOptionSeeder.php @@ -580,10 +580,16 @@ class ConfigOptionSeeder extends Seeder $gen14PciNvme->plans()->syncWithoutDetaching($gen14PciNvmePlans); // ─── Dedicated 14th Gen — LFF Drive Bays ──────────────────────── + // New shape (Option B): two options per group — Drive Selection (radio, + // PER-DRIVE cost) + Drive Quantity (stepper). Total = drive × quantity, + // computed in the frontend. Per-drive economics keep the catalog short + // and let us add a new size or interface (SAS) without exploding into + // 4-N more flat-radio rows. SAS HDD/SSD variants offer a 12 Gb/s + // dual-port path for customers running clustered storage / HA pairs. $gen14Lff = PlanConfigGroup::updateOrCreate( ['name' => 'Dedicated 14th Gen — LFF Drive Bays'], [ - 'description' => 'Pick a starter drive configuration for the 3.5" LFF bays — HDDs or SSDs (in 3.5" carriers). Customers needing a heterogeneous setup (mixed sizes per bay, hot spares, etc.) can request a custom layout via the post-order ticket flow.', + 'description' => 'Pick a drive type, then choose how many to populate. SATA covers the price-sensitive cases; SAS variants add 12 Gb/s + dual-port for clustered storage workloads. Mixed-size setups via post-order ticket.', 'mode' => 'preset', 'service_type' => 'dedicated', 'is_active' => true, @@ -591,45 +597,30 @@ class ConfigOptionSeeder extends Seeder ], ); - $gen14LffOption = $this->seedRadioOption($gen14Lff, 'LFF Drive Bays', false, 1); - $this->seedValues($gen14LffOption, [ + $gen14LffDriveOption = $this->seedRadioOption($gen14Lff, 'Drive Selection', false, 1); + $this->seedValues($gen14LffDriveOption, [ ['label' => 'No drives — configure via ticket', 'value' => 'none', 'monthly' => 0, 'is_default' => true], - ['label' => '2× 4 TB SATA HDD', 'value' => '2x4tb-hdd', 'monthly' => 24.00], - ['label' => '4× 4 TB SATA HDD', 'value' => '4x4tb-hdd', 'monthly' => 48.00], - ['label' => '2× 8 TB SATA HDD', 'value' => '2x8tb-hdd', 'monthly' => 40.00], - ['label' => '4× 8 TB SATA HDD', 'value' => '4x8tb-hdd', 'monthly' => 80.00], - ['label' => '8× 8 TB SATA HDD', 'value' => '8x8tb-hdd', 'monthly' => 160.00], - ['label' => '12× 8 TB SATA HDD', 'value' => '12x8tb-hdd', 'monthly' => 240.00], - ['label' => '2× 12 TB Enterprise HDD', 'value' => '2x12tb-hdd', 'monthly' => 90.00], - ['label' => '4× 12 TB Enterprise HDD', 'value' => '4x12tb-hdd', 'monthly' => 180.00], - ['label' => '8× 12 TB Enterprise HDD', 'value' => '8x12tb-hdd', 'monthly' => 360.00], - ['label' => '12× 12 TB Enterprise HDD', 'value' => '12x12tb-hdd', 'monthly' => 540.00], - ['label' => '2× 20 TB Enterprise HDD', 'value' => '2x20tb-hdd', 'monthly' => 110.00], - ['label' => '4× 20 TB Enterprise HDD', 'value' => '4x20tb-hdd', 'monthly' => 220.00], - ['label' => '8× 20 TB Enterprise HDD', 'value' => '8x20tb-hdd', 'monthly' => 440.00], - ['label' => '12× 20 TB Enterprise HDD', 'value' => '12x20tb-hdd', 'monthly' => 660.00], - ['label' => '2× 24 TB Enterprise HDD', 'value' => '2x24tb-hdd', 'monthly' => 150.00], - ['label' => '4× 24 TB Enterprise HDD', 'value' => '4x24tb-hdd', 'monthly' => 300.00], - ['label' => '8× 24 TB Enterprise HDD', 'value' => '8x24tb-hdd', 'monthly' => 600.00], - ['label' => '12× 24 TB Enterprise HDD', 'value' => '12x24tb-hdd', 'monthly' => 900.00], - ['label' => '2× 480 GB SATA SSD (LFF carrier)', 'value' => '2x480gb-ssd-lff', 'monthly' => 20.00], - ['label' => '4× 480 GB SATA SSD (LFF carrier)', 'value' => '4x480gb-ssd-lff', 'monthly' => 40.00], - ['label' => '8× 480 GB SATA SSD (LFF carrier)', 'value' => '8x480gb-ssd-lff', 'monthly' => 80.00], - ['label' => '12× 480 GB SATA SSD (LFF carrier)', 'value' => '12x480gb-ssd-lff', 'monthly' => 120.00], - ['label' => '2× 1.92 TB SATA SSD (LFF carrier)', 'value' => '2x1920gb-ssd-lff', 'monthly' => 36.00], - ['label' => '4× 1.92 TB SATA SSD (LFF carrier)', 'value' => '4x1920gb-ssd-lff', 'monthly' => 72.00], - ['label' => '8× 1.92 TB SATA SSD (LFF carrier)', 'value' => '8x1920gb-ssd-lff', 'monthly' => 144.00], - ['label' => '12× 1.92 TB SATA SSD (LFF carrier)', 'value' => '12x1920gb-ssd-lff', 'monthly' => 216.00], - ['label' => '2× 3.84 TB SATA SSD (LFF carrier)', 'value' => '2x3840gb-ssd-lff', 'monthly' => 90.00], - ['label' => '4× 3.84 TB SATA SSD (LFF carrier)', 'value' => '4x3840gb-ssd-lff', 'monthly' => 180.00], - ['label' => '8× 3.84 TB SATA SSD (LFF carrier)', 'value' => '8x3840gb-ssd-lff', 'monthly' => 360.00], - ['label' => '12× 3.84 TB SATA SSD (LFF carrier)', 'value' => '12x3840gb-ssd-lff', 'monthly' => 540.00], - ['label' => '2× 7.68 TB SAS SSD (LFF carrier)', 'value' => '2x7680gb-ssd-lff', 'monthly' => 200.00], - ['label' => '4× 7.68 TB SAS SSD (LFF carrier)', 'value' => '4x7680gb-ssd-lff', 'monthly' => 400.00], - ['label' => '8× 7.68 TB SAS SSD (LFF carrier)', 'value' => '8x7680gb-ssd-lff', 'monthly' => 800.00], - ['label' => '12× 7.68 TB SAS SSD (LFF carrier)', 'value' => '12x7680gb-ssd-lff', 'monthly' => 1200.00], + ['label' => '4 TB SATA HDD', 'value' => 'sata-hdd-4tb', 'monthly' => 12.00], + ['label' => '8 TB SATA HDD', 'value' => 'sata-hdd-8tb', 'monthly' => 20.00], + ['label' => '12 TB Enterprise SATA HDD', 'value' => 'sata-hdd-12tb', 'monthly' => 45.00], + ['label' => '20 TB Enterprise SATA HDD', 'value' => 'sata-hdd-20tb', 'monthly' => 55.00], + ['label' => '24 TB Enterprise SATA HDD', 'value' => 'sata-hdd-24tb', 'monthly' => 75.00], + ['label' => '12 TB Enterprise SAS HDD', 'value' => 'sas-hdd-12tb', 'monthly' => 50.00], + ['label' => '16 TB Enterprise SAS HDD', 'value' => 'sas-hdd-16tb', 'monthly' => 55.00], + ['label' => '480 GB SATA SSD (LFF carrier)', 'value' => 'sata-ssd-480gb-lff', 'monthly' => 10.00], + ['label' => '1.92 TB SATA SSD (LFF carrier)', 'value' => 'sata-ssd-1920gb-lff', 'monthly' => 18.00], + ['label' => '3.84 TB SATA SSD (LFF carrier)', 'value' => 'sata-ssd-3840gb-lff', 'monthly' => 45.00], + ['label' => '7.68 TB SATA SSD (LFF carrier)', 'value' => 'sata-ssd-7680gb-lff', 'monthly' => 100.00], + ['label' => '1.92 TB SAS SSD (LFF carrier)', 'value' => 'sas-ssd-1920gb-lff', 'monthly' => 40.00], + ['label' => '3.84 TB SAS SSD (LFF carrier)', 'value' => 'sas-ssd-3840gb-lff', 'monthly' => 80.00], + ['label' => '7.68 TB SAS SSD (LFF carrier)', 'value' => 'sas-ssd-7680gb-lff', 'monthly' => 200.00], ]); + // monthly_price = 0 on the stepper itself — actual cost is computed in + // the frontend as drive_selection.monthly_price × quantity. The route + // filter clamps max_qty down to chassis bay_count at request time. + $this->seedQuantityOption($gen14Lff, 'Drive Quantity', 0, 12, 'drives', 0.00, 2); + $gen14LffPlanSlugs = ['r440-4lff', 'r540-8lff', 'r740xd-12lff']; $gen14LffPlans = Plan::query()->whereIn('slug', $gen14LffPlanSlugs)->pluck('id'); $gen14Lff->plans()->syncWithoutDetaching($gen14LffPlans); @@ -638,7 +629,7 @@ class ConfigOptionSeeder extends Seeder $gen14Sff = PlanConfigGroup::updateOrCreate( ['name' => 'Dedicated 14th Gen — SFF Drive Bays'], [ - 'description' => 'Pick a starter drive configuration for the 2.5" SFF bays. Mixed-size setups via post-order ticket.', + 'description' => 'Pick a 2.5" drive type, then set quantity. SAS SSD variants add 12 Gb/s + dual-port for HA / clustered storage. Mixed-size setups via post-order ticket.', 'mode' => 'preset', 'service_type' => 'dedicated', 'is_active' => true, @@ -646,18 +637,20 @@ class ConfigOptionSeeder extends Seeder ], ); - $gen14SffOption = $this->seedRadioOption($gen14Sff, 'SFF Drive Bays', false, 1); - $this->seedValues($gen14SffOption, [ + $gen14SffDriveOption = $this->seedRadioOption($gen14Sff, 'Drive Selection', false, 1); + $this->seedValues($gen14SffDriveOption, [ ['label' => 'No drives — configure via ticket', 'value' => 'none', 'monthly' => 0, 'is_default' => true], - ['label' => '2× 480 GB SATA SSD', 'value' => '2x480gb-ssd', 'monthly' => 20.00], - ['label' => '4× 480 GB SATA SSD', 'value' => '4x480gb-ssd', 'monthly' => 40.00], - ['label' => '2× 1.92 TB SATA SSD', 'value' => '2x1920gb-ssd', 'monthly' => 36.00], - ['label' => '4× 1.92 TB SATA SSD', 'value' => '4x1920gb-ssd', 'monthly' => 72.00], - ['label' => '8× 1.92 TB SATA SSD', 'value' => '8x1920gb-ssd', 'monthly' => 144.00], - ['label' => '16× 1.92 TB SATA SSD', 'value' => '16x1920gb-ssd', 'monthly' => 288.00], - ['label' => '24× 1.92 TB SATA SSD', 'value' => '24x1920gb-ssd', 'monthly' => 432.00], + ['label' => '480 GB SATA SSD', 'value' => 'sata-ssd-480gb', 'monthly' => 10.00], + ['label' => '1.92 TB SATA SSD', 'value' => 'sata-ssd-1920gb', 'monthly' => 18.00], + ['label' => '3.84 TB SATA SSD', 'value' => 'sata-ssd-3840gb', 'monthly' => 45.00], + ['label' => '7.68 TB SATA SSD', 'value' => 'sata-ssd-7680gb', 'monthly' => 100.00], + ['label' => '1.92 TB SAS SSD', 'value' => 'sas-ssd-1920gb', 'monthly' => 40.00], + ['label' => '3.84 TB SAS SSD', 'value' => 'sas-ssd-3840gb', 'monthly' => 80.00], + ['label' => '7.68 TB SAS SSD', 'value' => 'sas-ssd-7680gb', 'monthly' => 200.00], ]); + $this->seedQuantityOption($gen14Sff, 'Drive Quantity', 0, 24, 'drives', 0.00, 2); + $gen14SffPlanSlugs = ['r640-8sff', 'r740-16sff', 'r740xd-24sff']; $gen14SffPlans = Plan::query()->whereIn('slug', $gen14SffPlanSlugs)->pluck('id'); $gen14Sff->plans()->syncWithoutDetaching($gen14SffPlans); @@ -666,7 +659,7 @@ class ConfigOptionSeeder extends Seeder $gen14Nvme = PlanConfigGroup::updateOrCreate( ['name' => 'Dedicated 14th Gen — NVMe Drive Bays'], [ - 'description' => 'Pick a starter NVMe drive configuration. U.2 bays direct-attach to CPU PCIe lanes — no RAID controller in the data path; software RAID (ZFS / mdraid / btrfs) only.', + 'description' => 'Pick a U.2 NVMe size, then set quantity. Bays direct-attach to CPU PCIe lanes — no RAID controller in the data path; software RAID (ZFS / mdraid / btrfs) only.', 'mode' => 'preset', 'service_type' => 'dedicated', 'is_active' => true, @@ -674,17 +667,16 @@ class ConfigOptionSeeder extends Seeder ], ); - $gen14NvmeOption = $this->seedRadioOption($gen14Nvme, 'NVMe Drive Bays', false, 1); - $this->seedValues($gen14NvmeOption, [ + $gen14NvmeDriveOption = $this->seedRadioOption($gen14Nvme, 'Drive Selection', false, 1); + $this->seedValues($gen14NvmeDriveOption, [ ['label' => 'No drives — configure via ticket', 'value' => 'none', 'monthly' => 0, 'is_default' => true], - ['label' => '2× 1 TB U.2 NVMe', 'value' => '2x1tb-nvme', 'monthly' => 44.00], - ['label' => '4× 1 TB U.2 NVMe', 'value' => '4x1tb-nvme', 'monthly' => 88.00], - ['label' => '2× 2 TB U.2 NVMe', 'value' => '2x2tb-nvme', 'monthly' => 96.00], - ['label' => '4× 2 TB U.2 NVMe', 'value' => '4x2tb-nvme', 'monthly' => 192.00], - ['label' => '8× 2 TB U.2 NVMe', 'value' => '8x2tb-nvme', 'monthly' => 384.00], - ['label' => '16× 2 TB U.2 NVMe', 'value' => '16x2tb-nvme', 'monthly' => 768.00], + ['label' => '1.92 TB U.2 NVMe', 'value' => 'u2-nvme-1920gb', 'monthly' => 30.00], + ['label' => '3.84 TB U.2 NVMe', 'value' => 'u2-nvme-3840gb', 'monthly' => 70.00], + ['label' => '7.68 TB U.2 NVMe', 'value' => 'u2-nvme-7680gb', 'monthly' => 150.00], ]); + $this->seedQuantityOption($gen14Nvme, 'Drive Quantity', 0, 24, 'drives', 0.00, 2); + $gen14NvmePlanSlugs = ['r640-10nvme', 'r740xd-24nvme']; $gen14NvmePlans = Plan::query()->whereIn('slug', $gen14NvmePlanSlugs)->pluck('id'); $gen14Nvme->plans()->syncWithoutDetaching($gen14NvmePlans); diff --git a/website/resources/ts/Components/Marketing/Dedicated/DedicatedConfigurator/BuildSummary.vue b/website/resources/ts/Components/Marketing/Dedicated/DedicatedConfigurator/BuildSummary.vue index 3e62c0d..4e61084 100644 --- a/website/resources/ts/Components/Marketing/Dedicated/DedicatedConfigurator/BuildSummary.vue +++ b/website/resources/ts/Components/Marketing/Dedicated/DedicatedConfigurator/BuildSummary.vue @@ -1,11 +1,18 @@ + + + + diff --git a/website/resources/ts/Components/Marketing/Dedicated/DedicatedConfigurator/index.vue b/website/resources/ts/Components/Marketing/Dedicated/DedicatedConfigurator/index.vue index ea39e9e..c33dffb 100644 --- a/website/resources/ts/Components/Marketing/Dedicated/DedicatedConfigurator/index.vue +++ b/website/resources/ts/Components/Marketing/Dedicated/DedicatedConfigurator/index.vue @@ -1,7 +1,15 @@