Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat - Variant Generation #1488

Merged
merged 34 commits into from
Jan 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
8811b15
WIP
alecritson Jan 17, 2024
e62e68a
WIP
alecritson Jan 17, 2024
dd15034
WIP
alecritson Jan 18, 2024
146e11e
WIP
alecritson Jan 18, 2024
0f539b9
WIP
alecritson Jan 18, 2024
262b6a6
WIP
alecritson Jan 18, 2024
d32ac88
WIP
alecritson Jan 19, 2024
a73dda8
WIP
alecritson Jan 19, 2024
4c15fd7
Translations
alecritson Jan 22, 2024
7c56f3d
Translations
alecritson Jan 22, 2024
e330011
WIP
alecritson Jan 22, 2024
1121b63
UI Updates
alecritson Jan 23, 2024
dd63c1b
Tweaks
alecritson Jan 23, 2024
bde355a
Tweaks
alecritson Jan 23, 2024
e0e8252
Tweak test
alecritson Jan 23, 2024
08e58fd
Merge branch '1.x' into feat/variant-editing
alecritson Jan 23, 2024
4320643
Handle removing all options
alecritson Jan 23, 2024
2455275
WIP
alecritson Jan 23, 2024
401a15b
Fix wording
alecritson Jan 23, 2024
282f8d7
UI Tweaks
alecritson Jan 24, 2024
0faa1f4
Drop unique constraint
alecritson Jan 24, 2024
3c31c97
compile
alecritson Jan 24, 2024
d699ca0
WIP Sorting
alecritson Jan 24, 2024
397f57a
disable configuring by default
alecritson Jan 24, 2024
6e5b89c
UI Tweaks
alecritson Jan 24, 2024
02c8e26
Merge branch '1.x' into feat/variant-editing
alecritson Jan 24, 2024
674d23e
dark mode fixes
alecritson Jan 24, 2024
74842a9
Add remove shared label
alecritson Jan 25, 2024
74cb4e1
Clean up array
alecritson Jan 25, 2024
46b043d
Change to checkbox
alecritson Jan 25, 2024
56e5002
Feat - Variant resource editing (#1504)
alecritson Jan 29, 2024
e340cb5
Move support actions to actions
alecritson Jan 29, 2024
9621c6f
Merge branch 'feat/variant-editing' of github.com:lunarphp/lunar into…
alecritson Jan 29, 2024
2087140
Merge branch '1.x' into feat/variant-editing
alecritson Jan 29, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/admin/resources/css/index.css
Original file line number Diff line number Diff line change
@@ -1 +1 @@
@import '../../vendor/filament/filament/resources/css/theme.css';
@import '../../vendor/filament/filament/resources/css/theme.css';
2,058 changes: 2,057 additions & 1 deletion packages/admin/resources/dist/lunar-panel.css

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions packages/admin/resources/dist/lunar-panel.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 21 additions & 0 deletions packages/admin/resources/lang/en/components.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,4 +93,25 @@
],
],
],

'product-options-list' => [
'add-option' => [
'label' => 'Add Option',
],
'delete-option' => [
'label' => 'Delete Option',
],
'remove-shared-option' => [
'label' => 'Remove Shared Option',
],
'add-value' => [
'label' => 'Add Another Value',
],
'name' => [
'label' => 'Name',
],
'values' => [
'label' => 'Values',
],
],
];
71 changes: 0 additions & 71 deletions packages/admin/resources/lang/en/product.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,83 +87,12 @@
],
'identifiers' => [
'label' => 'Product Identifiers',
'form' => [
'sku' => [
'label' => 'SKU',
],
'gtin' => [
'label' => 'Global Trade Item Number (GTIN)',
],
'mpn' => [
'label' => 'Manufacturer Part Number (MPN)',
],
'ean' => [
'label' => 'UPC/EAN',
],
],
],
'inventory' => [
'label' => 'Inventory',
'form' => [
'stock' => [
'label' => 'In Stock',
],
'backorder' => [
'label' => 'On Backorder',
],
'purchasable' => [
'label' => 'Purchasability',
'options' => [
'always' => 'Always',
'in_stock' => 'In Stock',
'backorder' => 'Backorder Only',
],
],
'unit_quantity' => [
'label' => 'Unit Quantity',
'helper_text' => 'How many individual items make up 1 unit.',
],
'min_quantity' => [
'label' => 'Minimum Quantity',
'helper_text' => 'The minimum quantity of a product variant that can be bought in a single purchase.',
],
'quantity_increment' => [
'label' => 'Quantity Increment',
'helper_text' => 'The product variant must be purchased in multiples of this quantity.',
],
],
],
'shipping' => [
'label' => 'Shipping',
'form' => [
'shippable' => [
'label' => 'Shippable',
],
'length_value' => [
'label' => 'Length',
],
'length_unit' => [
'label' => 'Length Unit',
],
'width_value' => [
'label' => 'Width',
],
'width_unit' => [
'label' => 'Width Unit',
],
'height_value' => [
'label' => 'Height',
],
'height_unit' => [
'label' => 'Height Unit',
],
'weight_value' => [
'label' => 'Weight',
],
'weight_unit' => [
'label' => 'Weight Unit',
],
],
],
],

Expand Down
88 changes: 88 additions & 0 deletions packages/admin/resources/lang/en/productoption.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,92 @@
],
],

'widgets' => [
'product-options' => [
'notifications' => [
'save-variants' => [
'success' => [
'title' => 'Product Variants Saved',
],
],
],
'actions' => [
'cancel' => [
'label' => 'Cancel',
],
'save-options' => [
'label' => 'Save Options',
],
'add-shared-option' => [
'label' => 'Add Shared Option',
'form' => [
'product_option' => [
'label' => 'Product Option',
],
'no_shared_components' => [
'label' => 'No shared options are available.',
],
],
],
'add-restricted-option' => [
'label' => 'Add Option',
],
],
'options-list' => [
'empty' => [
'heading' => 'There are no product options configured',
'description' => 'Add a shared or restricted product option to start generating some variants.',
],
],
'options-table' => [
'title' => 'Product Options',
'configure-options' => [
'label' => 'Configure Options',
],
'table' => [
'option' => [
'label' => 'Option',
],
'values' => [
'label' => 'Values',
],
],
],
'variants-table' => [
'title' => 'Product Variants',
'actions' => [
'create' => [
'label' => 'Create Variant',
],
'edit' => [
'label' => 'Edit',
],
'delete' => [
'label' => 'Delete',
],
],
'empty' => [
'heading' => 'No Variants Configured',
],
'table' => [
'new' => [
'label' => 'NEW',
],
'option' => [
'label' => 'Option',
],
'sku' => [
'label' => 'SKU',
],
'price' => [
'label' => 'Price',
],
'stock' => [
'label' => 'Stock',
],
],
],
],
],

];
102 changes: 102 additions & 0 deletions packages/admin/resources/lang/en/productvariant.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
<?php

return [
'label' => 'Product Variant',
'plural_label' => 'Product Variants',
'pages' => [
'edit' => [
'title' => 'Basic Information',
],
'media' => [
'title' => 'Media',
'form' => [
'no_selection' => [
'label' => 'You do not currently have an image selected for this variant.',
],
'no_media_available' => [
'label' => 'There is currently no media available on this product.',
],
'images' => [
'label' => 'Primary Image',
'helper_text' => 'Select the product image which represents this variant.',
],
],
],
'identifiers' => [
'title' => 'Identifiers',
],
'inventory' => [
'title' => 'Inventory',
],
'shipping' => [
'title' => 'Shipping',
],
],
'form' => [
'sku' => [
'label' => 'SKU',
],
'gtin' => [
'label' => 'Global Trade Item Number (GTIN)',
],
'mpn' => [
'label' => 'Manufacturer Part Number (MPN)',
],
'ean' => [
'label' => 'UPC/EAN',
],
'stock' => [
'label' => 'In Stock',
],
'backorder' => [
'label' => 'On Backorder',
],
'purchasable' => [
'label' => 'Purchasability',
'options' => [
'always' => 'Always',
'in_stock' => 'In Stock',
'backorder' => 'Backorder Only',
],
],
'unit_quantity' => [
'label' => 'Unit Quantity',
'helper_text' => 'How many individual items make up 1 unit.',
],
'min_quantity' => [
'label' => 'Minimum Quantity',
'helper_text' => 'The minimum quantity of a product variant that can be bought in a single purchase.',
],
'quantity_increment' => [
'label' => 'Quantity Increment',
'helper_text' => 'The product variant must be purchased in multiples of this quantity.',
],
'shippable' => [
'label' => 'Shippable',
],
'length_value' => [
'label' => 'Length',
],
'length_unit' => [
'label' => 'Length Unit',
],
'width_value' => [
'label' => 'Width',
],
'width_unit' => [
'label' => 'Width Unit',
],
'height_value' => [
'label' => 'Height',
],
'height_unit' => [
'label' => 'Height Unit',
],
'weight_value' => [
'label' => 'Weight',
],
'weight_unit' => [
'label' => 'Weight Unit',
],
],
];
11 changes: 11 additions & 0 deletions packages/admin/resources/lang/en/widgets.php
Original file line number Diff line number Diff line change
Expand Up @@ -104,4 +104,15 @@
],
],
],
'variant_switcher' => [
'label' => 'Switch Variant',
'table' => [
'sku' => [
'label' => 'SKU',
],
'values' => [
'label' => 'Values',
],
],
],
];
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<div>
@livewire(\Lunar\Admin\Filament\Widgets\Products\VariantSwitcherTable::class, [
'record' => $record,
])
</div>
Loading
Loading