diff --git a/app/Enums/Customers/Civility.php b/app/Enums/Customers/Civility.php new file mode 100644 index 00000000..a0527c07 --- /dev/null +++ b/app/Enums/Customers/Civility.php @@ -0,0 +1,59 @@ +name => 'Un poulet', + self::mme->name => 'Une poule', + ]; + + /** + * Get picture + * + * @return string + */ + public function picture(): string + { + return match ($this) { + self::m => Vite::asset("resources/assets/images/club/game-points/chicken.png"), + self::mme => Vite::asset("resources/assets/images/club/game-points/hen.png"), + }; + } + + /** + * Get autocomplete + * + * @return string + */ + public function autoComplete(): string + { + return match ($this) { + self::m => 'Monsieur', + self::mme => 'Madame', + }; + } + + /** + * Get i18n Label + * + * @return string + */ + public function transLabel(): string + { + return __($this->label()); + } +} diff --git a/app/Enums/Customers/LivingStatus.php b/app/Enums/Customers/LivingStatus.php new file mode 100644 index 00000000..3ce58168 --- /dev/null +++ b/app/Enums/Customers/LivingStatus.php @@ -0,0 +1,38 @@ +name => 'Adolescent/Étudiant', + self::youngAdult->name => 'Jeune actif sans enfant', + self::parent->name => 'Parents', + self::parentAlone->name => 'Adulte sans enfant', + self::elder->name => 'Grand-parent', + ]; + + /** + * Get i18n Label + * + * @return string + */ + public function transLabel(): string + { + return __($this->label()); + } +} diff --git a/resources/sass/club/club.scss b/resources/sass/club/club.scss index 2acaa4c6..a61a39cc 100644 --- a/resources/sass/club/club.scss +++ b/resources/sass/club/club.scss @@ -19,6 +19,8 @@ @import "./pages/home"; // * PARTIALS +@import "./partials/form-customer-info"; +@import "./partials/form-customer-sponsorship"; @import "./partials/card-discount"; @import "./partials/card-club-departaimant"; @import "./partials/card-club-favorite"; diff --git a/resources/sass/club/partials/_form-customer-info.scss b/resources/sass/club/partials/_form-customer-info.scss new file mode 100644 index 00000000..f3189325 --- /dev/null +++ b/resources/sass/club/partials/_form-customer-info.scss @@ -0,0 +1,22 @@ +.form-customer-info { + .img-civility { + width: 4.1875rem; + height: 4.5rem; + filter: saturate(100%) contrast(65%) brightness(80%) sepia(100%) hue-rotate(157deg); + } + + .form-check-input, .form-control { + background-color: $secondary-text-emphasis-dark; + color: $color-primary; + } + + .label, label { + display: flex; + align-items: center; + font-weight: 600; + } + + .form-check .label, label { + display: inherit; + } +} diff --git a/resources/sass/club/partials/_form-customer-sponsorship.scss b/resources/sass/club/partials/_form-customer-sponsorship.scss new file mode 100644 index 00000000..c954a511 --- /dev/null +++ b/resources/sass/club/partials/_form-customer-sponsorship.scss @@ -0,0 +1,12 @@ +.form-customer-sponsorship { + .img-civility { + width: 4.1875rem; + height: 4.5rem; + filter: saturate(100%) contrast(65%) brightness(80%) sepia(100%) hue-rotate(157deg); + } + + .form-check-input, .form-control { + background-color: $secondary-text-emphasis-dark; + color: $color-primary; + } +} diff --git a/resources/views/club/pages/customers/index.blade.php b/resources/views/club/pages/customers/index.blade.php index 03573c91..a4d341d2 100644 --- a/resources/views/club/pages/customers/index.blade.php +++ b/resources/views/club/pages/customers/index.blade.php @@ -100,9 +100,20 @@ {{-- Mobile Departaimant complete collection --}} -
+
@include('club.pages.customers.partials.card-club-departaimant')
+ +
+
+ @include('club.pages.customers.partials.customer-info-form') +
+
+
+
+ @include('club.pages.customers.partials.customer-sponsorship-form') +
+
@endsection diff --git a/resources/views/club/pages/customers/partials/customer-info-form.blade.php b/resources/views/club/pages/customers/partials/customer-info-form.blade.php new file mode 100644 index 00000000..edb348bd --- /dev/null +++ b/resources/views/club/pages/customers/partials/customer-info-form.blade.php @@ -0,0 +1,201 @@ +
+ @php + $columns = [ + 'label' => 'col-sm-4 col-md-2', + 'input' => 'col-sm-7 offset-sm-1 col-md-4 offset-md-0', + ]; + @endphp +
+ {{ __('Mes informations personelles') }} + + {{-- CIVILITY --}} +
{{ __('Civilité') }}
+
+ @foreach (\App\Enums\Customers\Civility::all() as $civilityEnum) +
+ {{ $civilityEnum->transLabel() }} +
+ + +
+
+ @endforeach + @foreach ($errors->get('civility') as $message) +
{{ $message }}
+ @endforeach +
+ + {{-- LASTNAME --}} + +
+ + @foreach ($errors->get('lastname') as $message) +
{{ $message }}
+ @endforeach +
+ + {{-- FIRSTNAME --}} + +
+ + @foreach ($errors->get('firstname') as $message) +
{{ $message }}
+ @endforeach +
+ + {{-- PSEUDO --}} + +
+ + @foreach ($errors->get('username') as $message) +
{{ $message }}
+ @endforeach +
+ + {{-- EMAIL --}} + +
+ + @foreach ($errors->get('email') as $message) +
{{ $message }}
+ @endforeach +
+ + {{-- ADDRESS --}} + +
+ + @foreach ($errors->get('address') as $message) +
{{ $message }}
+ @endforeach +
+ + {{-- ADDRESS 2 --}} + +
+ + @foreach ($errors->get('address2') as $message) +
{{ $message }}
+ @endforeach +
+ + {{-- POSTCODE --}} + +
+ + @foreach ($errors->get('postal_code') as $message) +
{{ $message }}
+ @endforeach +
+ + {{-- CITY --}} + +
+ + @foreach ($errors->get('city') as $message) +
{{ $message }}
+ @endforeach +
+ + {{-- LIVING STATUS --}} +
{{ __('Civilité') }}
+
+ @foreach (\App\Enums\Customers\LivingStatus::all() as $livingStatus) +
+
+ + +
+
+ @endforeach + @foreach ($errors->get('living_status') as $message) +
{{ $message }}
+ @endforeach +
+ +
+
+ {{ __('Mes poussins (enfants)') }} +
+
+
{{ __('Poussin 1') }}
+ +
+ + @foreach ($errors->get('birthday.0') as $message) +
{{ $message }}
+ @endforeach +
+
+ +
+
+
+
+ +
+ {{ __('Mes préférences') }} + + {{-- NEWSLETTER --}} +
+
+ + +
+
+ + {{-- CGU --}} +
+
+ + +
+
+ + {{-- CGV --}} +
+
+ + +
+
+
+ +
+
+ +
+
+
diff --git a/resources/views/club/pages/customers/partials/customer-sponsorship-form.blade.php b/resources/views/club/pages/customers/partials/customer-sponsorship-form.blade.php new file mode 100644 index 00000000..f2dfa734 --- /dev/null +++ b/resources/views/club/pages/customers/partials/customer-sponsorship-form.blade.php @@ -0,0 +1,59 @@ +
+ +
+ {{ __('Mes parrainages') }} +
+
+
+ {{ __('Filleul 1') }} + {{ __('Parrainage accepté') }} + + + +50 + + pts + +
+ +
+ + @foreach ($errors->get('email.0') as $message) +
{{ $message }}
+ @endforeach +
+
+
+
+ {{ __('Filleul 2') }} + {{ __('Parrainage en cours') }} + + + +50 + + pts + +
+ +
+ + @foreach ($errors->get('email.0') as $message) +
{{ $message }}
+ @endforeach +
+
+
+
+ +
+
+ + + + + + +
+
+