Skip to content

Commit

Permalink
Patch beta 03 (#222)
Browse files Browse the repository at this point in the history
* 🗃️ Add new migration and update column to match Laravel 9,10 columns

* Add new Enum class, and update Traits

* 🔧 Add models config and update core default config files

* 🌐 Add new translations words

* Apply refactoring to Models

* Update config and helpers functions

* wip

* Apply refactoring

* ♻️ Remove yoda condition style

* 🌐 Update localization

* fix code formatting

* Update models config file location

* fix php stan error

* Fix PHPStan error

---------

Co-authored-by: mckenziearts <[email protected]>
  • Loading branch information
mckenziearts and mckenziearts authored Sep 25, 2023
1 parent 120d2bd commit 6b736a6
Show file tree
Hide file tree
Showing 128 changed files with 731 additions and 441 deletions.
1 change: 1 addition & 0 deletions packages/admin/config/components.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
| Shops Livewire Components
|--------------------------------------------------------------------------
*/

'attributes.browse' => Components\Attributes\Browse::class,
'attributes.create' => Components\Attributes\Create::class,
'attributes.edit' => Components\Attributes\Edit::class,
Expand Down
58 changes: 0 additions & 58 deletions packages/admin/config/models.php

This file was deleted.

2 changes: 1 addition & 1 deletion packages/admin/config/settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
|--------------------------------------------------------------------------
|
| The menu for the generation of the page settings and layout.
| BladeUIKit Heroicon is the icon used. See https://blade-ui-kit.com/blade-icons?set=1
| BladeUIKit UntitledUI is the icon used. See https://blade-ui-kit.com/blade-icons?set=74
|
*/

Expand Down
51 changes: 51 additions & 0 deletions packages/admin/resources/lang/en/notifications.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,60 @@

return [

'actions' => [
'create' => ':item successfully added',
'update' => ':item successfully updated',
'remove' => ':item successfully removed',
],

'attributes' => [
'remove' => 'The attribute has successfully removed',
'enable' => 'The attribute has successfully enabled',
'disable' => 'The attribute has successfully disabled',
],

'auth' => [
'password' => 'This password does not match our records.',
],

'analytics' => 'Your analytics configurations have been correctly updated',

'store_info' => 'Shop informations have been successfully updated',

'inventory' => [
'removed' => 'Inventory Successfully removed.',
],

'initialize' => 'Store successfully setup, you can now manage everything.',

'legal' => 'Your legal policy has been successfully updated',

'users_roles' => [
'role_added' => 'A role has been successfully created',
'role_deleted' => 'Role deleted successfully.',
'admin_deleted' => 'Admin deleted successfully',
'permission_add' => 'A new permission has been create and add to this role',
'permission_revoke' => 'Permission :permission has been revoked to this role',
'permission_allow' => 'Permission :permission has been given to this role',
'password_changed' => 'You have been successfully updated your password',
'current_password' => 'That is not your current password.',
'profile_update' => 'Your profile have been successfully updated',
'two_factor_enabled' => 'You have successfully enabled two-factor authentication',
'two_factor_disabled' => 'You have successfully disabled two-factor authentication',
'two_factor_generate' => 'You have successfully regenerated your two-factor authentication recovery codes.',
],

'orders' => [
'archived' => 'Order successfully archived',
],

'payment' => [
'add' => 'Your payment method have been correctly added!',
'update' => 'Your payment method have been correctly updated',
],

'products' => [
'remove' => 'The :item has been correctly removed.',
],

];
5 changes: 0 additions & 5 deletions packages/admin/resources/lang/en/pages/brands.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,4 @@

'empty_brand' => 'No brand',

'notifications' => [
'created' => 'Brand successfully added!',
'updated' => 'Brand successfully updated!',
],

];
5 changes: 0 additions & 5 deletions packages/admin/resources/lang/en/pages/categories.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,4 @@
'empty_parent' => 'No parent category',
'parent' => 'in :parent',

'notifications' => [
'created' => 'Category successfully added!',
'updated' => 'Category successfully updated!',
],

];
2 changes: 2 additions & 0 deletions packages/admin/resources/lang/en/pages/products.php
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,8 @@
'empty' => 'No adjustments made to inventory.',
'movement' => 'Quantity Movement',
'initial' => 'Initial inventory',
'add' => 'Manually added',
'remove' => 'Manually removed',
],

'seo' => [
Expand Down
12 changes: 9 additions & 3 deletions packages/admin/resources/lang/en/status.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,15 @@
declare(strict_types=1);

return [

'cancelled' => 'Cancelled',
'completed' => 'Completed',
'paid' => 'Paid',
'partial-refund' => 'Partially refunded',
'pending' => 'Pending',
'registered' => 'Registered',
'paid' => 'Paid',
'completed' => 'Completed',
'cancelled' => 'Cancelled',
'treatment' => 'Treatment',
'refunded' => 'Refunded',
'rejected' => 'Rejected',

];
4 changes: 4 additions & 0 deletions packages/admin/resources/lang/en/words.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
'review' => 'Review',
'account' => 'Account',
'users' => 'Users',
'user' => 'User',
'analytics' => 'Analytics',
'system' => 'System',
'purchased' => 'Purchased',
Expand All @@ -25,6 +26,9 @@
'per_page_items' => 'Per page items',
'not_available' => 'Not available',
'available' => 'Available',
'stock' => 'Stock',
'permission' => 'Permission',
'role' => 'Role',

'payment_method' => 'Payment Method',
'shipping_method' => 'Shipping method',
Expand Down
51 changes: 51 additions & 0 deletions packages/admin/resources/lang/fr/notifications.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,60 @@

return [

'actions' => [
'create' => ':item ajouté avec succès',
'update' => ':item mis à jour avec succès',
'remove' => ':item supprimé(e) avec succès',
],

'attributes' => [
'remove' => 'L\'attribut a été supprimé avec succès',
'enable' => 'L\'attribut a été activé avec succès',
'disable' => 'L\'attribut a été désactivé avec succès',
],

'auth' => [
'password' => 'Ce mot de passe ne correspond pas à nos archives',
],

'analytics' => 'Vos configurations analytiques ont été correctement mises à jour',

'store_info' => 'Les informations sur le magasin ont été mises à jour avec succès',

'inventory' => [
'removed' => 'Inventaire supprimé avec succès',
],

'initialize' => 'Le magasin ayant été configuré avec succès, vous pouvez maintenant tout gérer',

'legal' => 'Votre politique juridique a été mise à jour avec succès',

'users_roles' => [
'role_deleted' => 'Rôle supprimé avec succès',
'role_added' => 'Un nouveau rôle a été ajouté avec succès',
'admin_deleted' => 'Admin supprimé avec succès',
'permission_add' => 'Une nouvelle autorisation a été créée et ajoutée à ce rôle',
'permission_revoke' => 'La permission :permission a été révoquée pour ce rôle',
'permission_allow' => 'La permission :permission a été donnée à ce rôle',
'password_changed' => 'Vous avez mis à jour votre mot de passe avec succès',
'current_password' => 'Ce n\'est pas votre mot de passe actuel',
'profile_update' => 'Votre profil a été mis à jour avec succès',
'two_factor_enabled' => 'Vous avez activé avec succès l\'authentification à deux facteurs',
'two_factor_disabled' => 'Vous avez désactivé avec succès l\'authentification à deux facteurs',
'two_factor_generate' => 'Vous avez régénéré avec succès vos codes de récupération de l\'authentification à deux facteurs',
],

'orders' => [
'archived' => 'Commande archivée avec succès',
],

'payment' => [
'add' => 'Votre méthode de paiement a été correctement ajoutée',
'update' => 'Votre mode de paiement a été correctement mis à jour',
],

'products' => [
'remove' => ':item a été correctement supprimé',
],

];
5 changes: 0 additions & 5 deletions packages/admin/resources/lang/fr/pages/brands.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,4 @@

'empty_brand' => 'Aucune marque',

'notifications' => [
'created' => 'Marque ajoutée avec succès !',
'updated' => 'Marque mise à jour avec succès !',
],

];
5 changes: 0 additions & 5 deletions packages/admin/resources/lang/fr/pages/categories.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,4 @@
'empty_parent' => 'Pas de catégorie parente',
'parent' => 'dans :parent',

'notifications' => [
'created' => 'Catégorie ajoutée avec succès!',
'updated' => 'Catégorie mise à jour avec succès!',
],

];
2 changes: 2 additions & 0 deletions packages/admin/resources/lang/fr/pages/products.php
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,8 @@
'empty' => 'Aucun ajustement n\'a été effectué sur l\'inventaire.',
'movement' => 'Mouvement des quantités',
'initial' => 'Stock initial',
'add' => 'Ajout manuel',
'remove' => 'Retrait manuel',
],

'seo' => [
Expand Down
12 changes: 9 additions & 3 deletions packages/admin/resources/lang/fr/status.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,15 @@
declare(strict_types=1);

return [

'cancelled' => 'Annulé',
'completed' => 'Complète',
'paid' => 'Payé',
'pending' => 'En attente',
'registered' => 'Enregistré',
'paid' => 'Payé',
'completed' => 'Complète',
'cancelled' => 'Annulé',
'treatment' => 'Traitement',
'refunded' => 'Remboursé',
'rejected' => 'Rejeté',
'partial-refund' => 'Remboursement partiel',

];
8 changes: 6 additions & 2 deletions packages/admin/resources/lang/fr/words.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
'review' => 'Avis',
'account' => 'Compte',
'users' => 'Utilisateurs',
'user' => 'Utilisateur',
'analytics' => 'Analytics',
'system' => 'Système',
'purchased' => 'Acheté',
Expand All @@ -25,8 +26,11 @@
'per_page_items' => 'Éléments par page',
'not_available' => 'Indisponible',
'available' => 'Disponible',
'stock' => 'Stock',
'permission' => 'Permission',
'role' => 'Rôle',

'payment_method' => 'Moyen de paiement',
'payment_method' => 'Méthode de paiement',
'shipping_method' => 'Mode de livraison',
'no_shipping' => 'Pas de méthode d\'expédition',
'estimated' => 'Délai de livraison estimé',
Expand All @@ -42,7 +46,7 @@
'to' => 'à',
'of' => 'de',
'results' => 'résultats',
'media' => 'Media',
'media' => 'Média',
'hide' => 'Masquer',
'show' => 'Afficher',

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
</div>
<div class="px-4 py-3 bg-white dark:bg-secondary-800 text-secondary-500 dark:text-secondary-400 text-sm leading-5">
{{ __('shopper::components.learn_more') }}
<a href="https://laravelshopper.dev/{{ $link }}" target="_blank" class="ml-1 inline-flex items-center text-primary-600 hover:text-primary-500 transition-colors duration-150 ease-in-out">
<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-secondary-500 dark:text-secondary-400" stroke-width="1.5" />
</a>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,12 @@ class="mt-4 relative rounded-lg p-2 group hover:bg-white dark:hover:bg-secondary
<span class="absolute bottom-0 right-0 block h-2.5 w-2.5 rounded-full bg-green-400 ring-2 ring-white dark:ring-secondary-700"></span>
</span>
<span class="flex min-w-0 flex-1 flex-col">
<span class="text-secondary-900 dark:text-white text-sm font-medium truncate">{{ $user->full_name }}</span>
<span class="text-secondary-500 dark:text-secondary-400 text-sm truncate">{{ $user->email }}</span>
<span class="text-secondary-900 dark:text-white text-sm font-medium truncate">
{{ $user->full_name }}
</span>
<span class="text-secondary-500 dark:text-secondary-400 text-sm truncate">
{{ $user->email }}
</span>
</span>
</span>
<x-untitledui-dots-vertical class="h-5 w-5 flex-shrink-0 text-secondary-400 group-hover:text-secondary-500 dark:text-secondary-500 dark:group-hover:text-secondary-400" />
Expand Down
12 changes: 6 additions & 6 deletions packages/admin/src/Exports/ProductInventoryExport.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ public function headings(): array
{
return [
'#',
__('Product'),
__('Stock'),
__('Event'),
__('Inventory'),
__('User'),
__('Date'),
__('shopper::words.product'),
__('shopper::words.stock'),
__('shopper::words.event'),
__('shopper::words.location'),
__('shopper::words.user'),
__('shopper::words.date'),
];
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class Devices extends Component
{
public function getSessionsProperty(): Collection
{
if ('database' !== config('session.driver')) {
if (config('session.driver') !== 'database') {
return collect();
}

Expand Down
Loading

0 comments on commit 6b736a6

Please sign in to comment.