Skip to content

Commit

Permalink
Discounts - Update discounts features
Browse files Browse the repository at this point in the history
  • Loading branch information
mckenziearts committed Apr 18, 2024
1 parent 8783f44 commit a180a54
Show file tree
Hide file tree
Showing 59 changed files with 1,060 additions and 1,721 deletions.
2 changes: 0 additions & 2 deletions packages/admin/config/components/customer.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@
'customers.addresses' => Components\Customers\Addresses::class,
'customers.orders' => Components\Customers\Orders::class,
'customers.profile' => Components\Customers\Profile::class,

'modals.delete-customer' => Livewire\Modals\DeleteCustomer::class,
],

];
13 changes: 4 additions & 9 deletions packages/admin/config/components/discount.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
declare(strict_types=1);

use Shopper\Livewire;
use Shopper\Livewire\Components;

return [

Expand All @@ -13,7 +12,9 @@
|--------------------------------------------------------------------------
*/

'pages' => [],
'pages' => [
'discount-index' => Livewire\Pages\Discount\Index::class,
],

/*
|--------------------------------------------------------------------------
Expand All @@ -22,13 +23,7 @@
*/

'components' => [
'discounts.browse' => Components\Discounts\Browse::class,
'discounts.create' => Components\Discounts\Create::class,
'discounts.edit' => Components\Discounts\Edit::class,

'modals.delete-discount' => Livewire\Modals\DeleteDiscount::class,
'modals.discount-products' => Livewire\Modals\DiscountProducts::class,
'modals.discount-customers' => Livewire\Modals\DiscountCustomers::class,
'slide-overs.discount-form' => Livewire\SlideOvers\DiscountForm::class,
],

];
2 changes: 0 additions & 2 deletions packages/admin/config/components/review.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@

'components' => [
'slide-overs.review-detail' => Livewire\SlideOvers\ReviewDetail::class,

'modals.delete-review' => Livewire\Modals\DeleteReview::class,
],

];
46 changes: 13 additions & 33 deletions packages/admin/public/shopper.css
Original file line number Diff line number Diff line change
Expand Up @@ -4533,6 +4533,10 @@ html {
flex: none;
}

.flex-shrink-0 {
flex-shrink: 0;
}

.shrink-0 {
flex-shrink: 0;
}
Expand Down Expand Up @@ -4802,14 +4806,14 @@ html {
flex-wrap: wrap;
}

.items-start {
align-items: flex-start;
}

.\!items-start {
align-items: flex-start !important;
}

.items-start {
align-items: flex-start;
}

.items-end {
align-items: flex-end;
}
Expand Down Expand Up @@ -5414,11 +5418,6 @@ html {
border-color: rgb(147 197 253 / var(--tw-border-opacity));
}

.border-primary-400 {
--tw-border-opacity: 1;
border-color: rgb(96 165 250 / var(--tw-border-opacity));
}

.border-primary-500 {
--tw-border-opacity: 1;
border-color: rgb(59 130 246 / var(--tw-border-opacity));
Expand Down Expand Up @@ -6154,6 +6153,11 @@ html {
font-family: ui-serif, Georgia, Cambria, "Times New Roman", Times, serif;
}

.\!text-sm {
font-size: 0.875rem !important;
line-height: 1.25rem !important;
}

.text-2xl {
font-size: 1.5rem;
line-height: 2rem;
Expand Down Expand Up @@ -6189,11 +6193,6 @@ html {
line-height: 1rem;
}

.\!text-sm {
font-size: 0.875rem !important;
line-height: 1.25rem !important;
}

.font-black {
font-weight: 900;
}
Expand Down Expand Up @@ -6475,11 +6474,6 @@ html {
color: rgb(255 255 255 / var(--tw-text-opacity));
}

.text-yellow-300 {
--tw-text-opacity: 1;
color: rgb(253 224 71 / var(--tw-text-opacity));
}

.text-yellow-400 {
--tw-text-opacity: 1;
color: rgb(250 204 21 / var(--tw-text-opacity));
Expand Down Expand Up @@ -9399,11 +9393,6 @@ svg {
border-color: rgba(var(--gray-300), var(--tw-border-opacity));
}

.hover\:border-primary-300:hover {
--tw-border-opacity: 1;
border-color: rgb(147 197 253 / var(--tw-border-opacity));
}

.hover\:bg-custom-400\/10:hover {
background-color: rgba(var(--c-400), 0.1);
}
Expand Down Expand Up @@ -10524,11 +10513,6 @@ svg {
color: rgba(var(--gray-200), var(--tw-text-opacity));
}

:is(.dark .group:hover .dark\:group-hover\:text-gray-300) {
--tw-text-opacity: 1;
color: rgba(var(--gray-300), var(--tw-text-opacity));
}

:is(.dark .group:hover .dark\:group-hover\:text-gray-400) {
--tw-text-opacity: 1;
color: rgba(var(--gray-400), var(--tw-text-opacity));
Expand Down Expand Up @@ -10597,10 +10581,6 @@ svg {
margin-left: 1rem;
}

.sm\:ml-auto {
margin-left: auto;
}

.sm\:ms-auto {
margin-inline-start: auto;
}
Expand Down
12 changes: 9 additions & 3 deletions packages/admin/resources/lang/en/pages/discounts.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,19 @@
'description' => 'Create & Manage discount and promotions codes that apply at checkout or customers orders.',

'actions' => [
'create' => 'Create code',
'create' => 'Create discount',
'update' => 'Update code :code',
],

'empty_message' => 'No discount found...',
'search' => 'Search discount code',
'name_helptext' => 'Customers will enter this discount code at checkout.',
'percentage' => 'Percentage',
'percentage_description' => 'Discount applied in %',
'fixed_amount' => 'Fixed amount',
'fixed_amount_description' => 'Discount in whole numbers',
'configuration_description' => 'The discount code applies from the moment you press the publish button, and remains active if not modified.',
'condition_description' => 'The discount code applies to all products if not modified.',
'applies_to' => 'Applies To',
'entire_order' => 'Entire order',
'specific_products' => 'Specific products',
Expand All @@ -33,9 +37,11 @@
'select_customers' => 'Select customers',
'usage_limits' => 'Usage limits',
'usage_label' => 'Limit number of times this discount can be used in total',
'usage_label_description' => 'This limit applies to all customers, not individually.',
'usage_value' => 'Usage limit value',
'limit_one_per_user' => 'Limit to one use per customer',
'active_dates' => 'Active dates',
'active_dates_description' => 'The dates on which the discount will be available to users.',
'start_date' => 'Start date',
'choose_start_date' => 'Choose start date period',
'end_date' => 'End date',
Expand Down Expand Up @@ -68,7 +74,7 @@
'active_from_to' => 'Active from :start to :end',
'one_per_customer' => 'one per customer',

'add_message' => 'Discount code :code created successfully!',
'update_message' => 'Discount code :code updated successfully!',
'save' => 'Discount code :code save successfully!',
'total_use' => 'Redemptions',

];
5 changes: 5 additions & 0 deletions packages/admin/resources/lang/en/words.php
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,8 @@
'selection' => 'Selection',
'sign_in_as' => 'Signed in as',
'general' => 'General',
'configuration' => 'Configuration',
'conditions' => 'Conditions',
'slug_description' => 'Use to generate the right url format for your store',

'seo' => [
Expand All @@ -174,5 +176,8 @@
],

'other' => ' other(s)',
'feature' => 'Feature',
'feature_enabled' => 'You must enable :feature to activate this section.',
'amount' => 'Amount',

];
12 changes: 9 additions & 3 deletions packages/admin/resources/lang/fr/pages/discounts.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,11 @@
'search' => 'Rechercher un code de réduction',
'name_helptext' => 'Les clients saisiront ce code de réduction lors du paiement.',
'percentage' => 'Pourcentage',
'fixed_amount' => 'Montant fix',
'percentage_description' => 'Remise appliquée en %',
'fixed_amount' => 'Montant fixe',
'fixed_amount_description' => 'Réduction en nombres entiers',
'configuration_description' => "Le code de réduction s'applique à partir du moment où vous appuyez sur le bouton de publication et reste actif s'il n'est pas modifié.",
'condition_description' => "Le code de réduction s'applique à tous les produits s'il n'est pas modifié.",
'applies_to' => 'S\'applique à',
'entire_order' => 'Toute la commande',
'specific_products' => 'Produits spécifiques',
Expand All @@ -33,9 +37,11 @@
'select_customers' => 'Sélectionnez des clients',
'usage_limits' => 'Limites d\'utilisation',
'usage_label' => 'Limiter le nombre de fois que ce coupon peut être utilisée au total',
'usage_label_description' => "Cette limite s'applique à tous les clients, pas individuellement.",
'usage_value' => 'Valeur limite d\'utilisation',
'limit_one_per_user' => 'Limité à une utilisation par client',
'active_dates' => 'Dates actives',
'active_dates_description' => 'Les dates durant lesquelles la remise sera utilisable pour les utilisateurs.',
'start_date' => 'Date de début',
'choose_start_date' => 'Choisissez la date de début',
'end_date' => 'Date de fin',
Expand Down Expand Up @@ -68,7 +74,7 @@
'active_from_to' => 'Actif de :start à :end',
'one_per_customer' => 'un par client',

'add_message' => 'Code de réduction :code créé avec succès!',
'update_message' => 'Code de réduction :code mis à jour avec succès!',
'save' => 'Code de réduction :code enregistré avec succès!',
'total_use' => 'Utilisations',

];
7 changes: 6 additions & 1 deletion packages/admin/resources/lang/fr/words.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
'category' => 'Catégorie',
'attribute' => 'Attribut',
'attributes' => 'Attributs',
'discount' => 'Coupon',
'discount' => 'Remise',
'review' => 'Avis',
'account' => 'Compte',
'users' => 'Utilisateurs',
Expand Down Expand Up @@ -163,6 +163,8 @@
'selection' => 'Séléction',
'sign_in_as' => 'Connecté avec',
'general' => 'Général',
'configuration' => 'Configuration',
'conditions' => 'Conditions',
'slug_description' => 'Utiliser pour la génération de bon format url sur votre boutique',

'seo' => [
Expand All @@ -173,5 +175,8 @@
],

'other' => ' autre(s)',
'feature' => 'Fonctionnalité',
'feature_enabled' => 'Vous devez activé la fonctionnalité :feature pour activer cette section.',
'amount' => 'Montant',

];
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<div class="rounded-lg bg-yellow-50 p-4">
<div class="flex">
<div class="shrink-0">
<x-heroicon-s-exclamation-triangle
class="h-5 w-5 text-yellow-400"
aria-hidden="true"
/>
</div>
<div class="ml-3">
<h3 class="text-sm font-medium text-yellow-800">{{ __('Attention needed') }}</h3>
<div class="mt-2 text-sm text-yellow-700">
<p>
{{ __('shopper::words.feature_enabled', ['feature' => \Illuminate\Support\Str::title($getFeature())]) }}
</p>
</div>
</div>
</div>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,7 @@ class="shopper scroll-smooth min-h-screen antialiased"
<link rel="stylesheet" href="https://rsms.me/inter/inter.css"/>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Figtree:ital,wght@0,300..900;1,300..900&display=swap"
rel="stylesheet">
<link rel="stylesheet" href="https://unpkg.com/tippy.js@6/dist/tippy.css"/>
<link href="https://fonts.googleapis.com/css2?family=Figtree:ital,wght@0,300..900;1,300..900&display=swap" rel="stylesheet">

@stack('styles')

Expand Down
11 changes: 9 additions & 2 deletions packages/admin/resources/views/components/learn-more.blade.php
Original file line number Diff line number Diff line change
@@ -1,13 +1,20 @@
<div class="flex justify-center text-center my-10">
<div class="bg-gray-50 dark:bg-gray-800 overflow-hidden ring-1 ring-gray-200 dark:ring-gray-700 shadow rounded-lg flex items-center">
<div class="p-3 flex items-center justify-center shrink-0 border-r border-gray-200 dark:border-gray-700">
<x-untitledui-info-circle class="w-5 h-5 text-gray-500 dark:text-gray-400" />
<x-untitledui-info-circle
class="w-5 h-5 text-gray-400 dark:text-gray-500"
aria-hidden="true"
/>
</div>
<div class="px-4 py-3 bg-white dark:bg-gray-800 text-gray-500 dark:text-gray-400 text-sm leading-5">
{{ __('shopper::components.learn_more') }}
<a href="https://laravelshopper.dev/docs/2.x/{{ $link }}" target="_blank" class="ml-1 inline-flex items-center text-primary-600 hover:text-primary-500 transition-colors duration-150 ease-in-out">
{{ $name }}
<x-untitledui-arrow-circle-broken-right class="w-5 h-5 ml-2 text-gray-500 dark:text-gray-400" stroke-width="1.5" />
<x-untitledui-arrow-circle-broken-right
class="w-5 h-5 ml-2 text-gray-400 dark:text-gray-500"
stroke-width="1.5"
aria-hidden="true"
/>
</a>
</div>
</div>
Expand Down
Loading

0 comments on commit a180a54

Please sign in to comment.