Merge branch 'hashcode' into 'develop'

feat: ✨ add hashcode column of single optins in index page #31

Closes #31

See merge request ldc-web/projets/crm!24
This commit is contained in:
Vincent BRIDIER 2025-01-16 15:17:39 +00:00
commit d9f44df691
14 changed files with 33 additions and 47 deletions

View file

@ -16,8 +16,8 @@ enum CustomerExportType: int
* Optionnal labels definition
*/
private const LABELS = [
self::singleOptin->name => 'Les single optins uniquement',
self::singleOptin->name => 'Les single-optins uniquement',
self::customer->name => 'Les clients uniquement acceptant de recevoir les newsletters',
self::both->name => 'La totalité des client acceptant de recevoir les newsletters',
self::both->name => 'La totalité des single-optins ainsi que des clients acceptant de recevoir les newsletters',
];
}

View file

@ -2,8 +2,7 @@
@section('title', __('Édition d\'un :model', ['model' => __('models.classes.activity_log')]))
@section('description', __('Édition d\'un :model déjà existant', ['model' => __('models.classes.activity_log')]))
@section('breadcrumb',
request()->route()->getName())
@section('breadcrumb', request()->route()->getName())
@section('content')
<div class="d-flex justify-content-between flex-md-nowrap align-items-center flex-wrap pb-3">

View file

@ -3,8 +3,7 @@
@section('title', sprintf('%s - %s', __('models.classes.answers'), Str::ucfirst(__('création'))))
@section('description', __('Création d\'une :model', ['model' => __('models.classes.answers')]))
@section('metaIndex', 'noindex,nofollow')
@section('breadcrumb',
request()->route()->getName())
@section('breadcrumb', request()->route()->getName())
@section('content')
<div class="card border-0">

View file

@ -3,8 +3,7 @@
@section('title', sprintf('%s - %s', __('models.classes.answers'), Str::ucfirst(__('édition'))))
@section('description', __('Édition d\'une :model', ['model' => __('models.classes.answers')]))
@section('metaIndex', 'noindex,nofollow')
@section('breadcrumb',
request()->route()->getName())
@section('breadcrumb', request()->route()->getName())
@section('content')
<div class="card border-0">

View file

@ -1,14 +1,11 @@
<div class="table-responsive">
<table class="table-hover fix-action m-0 table">
<thead class="border-top-0 border-start-0 border-end-0 border border-2">
@php
$cols = [
@include('bo.modules.table-col-sorter', [
'cols' => [
'answer' => __('Réponse'),
'updated_at' => __('Date d\'ajout en base'),
];
@endphp
@include('bo.modules.table-col-sorter', [
'cols' => $cols,
],
'mobileHide' => ['status'],
'ignore' => ['updated_at'],
])

View file

@ -1,16 +1,13 @@
<div class="table-responsive">
<table class="table-hover fix-action m-0 table">
<thead class="border-top-0 border-start-0 border-end-0 border border-2">
@php
$cols = [
@include('bo.modules.table-col-sorter', [
'cols' => [
'name' => __('Nom'),
'status' => __('Nombre de comptes'),
'optin' => __('Nombre d\'optins'),
'updated_at' => __('Date d\'ajout en base'),
];
@endphp
@include('bo.modules.table-col-sorter', [
'cols' => $cols,
],
'mobileHide' => ['status'],
'ignore' => ['status', 'optin', 'updated_at'],
])
@ -23,8 +20,9 @@
<td class="text-center align-middle">{{ $brandModel->customer_infos_count }}</td>
<td class="text-center align-middle">{{ $brandModel->customer_infos_optin_count }}</td>
<td class="text-center align-middle">
<span
class="badge bg-warning text-bg-warning text-wrap">{{ $brandModel->updated_at->formatLocalized('%d/%m/%Y à %H:%M') }}</span>
<span class="badge bg-warning text-bg-warning text-wrap">
{{ $brandModel->updated_at }}
</span>
</td>
<td class="text-end align-middle">
@can('update', \App\Models\Brand::class)

View file

@ -30,7 +30,7 @@
<fieldset>
<legend>{{ __('La marque concernée') }}</legend>
<div class="input-group mb-3">
<label class="input-group-text" for="exportBrand">{{ __('Les client de la marque') }}</label>
<label class="input-group-text" for="exportBrand">{{ __('Les clients de la marque') }}</label>
<select class="form-select" id="exportBrand" name="brand" required>
<option value="" selected>{{ __('Choissez une marque') }}</option>
@foreach ($brands as $i => $brand)

View file

@ -3,8 +3,7 @@
@section('title', sprintf('%s - %s', __('models.classes.customers'), Str::ucfirst(__('aperçu'))))
@section('description', __('Aperçu d\'un :model', ['model' => __('models.classes.customers')]))
@section('metaIndex', 'noindex,nofollow')
@section('breadcrumb',
request()->route()->getName())
@section('breadcrumb', request()->route()->getName())
@section('content')
<div class="card border-0">

View file

@ -30,7 +30,7 @@
<fieldset>
<legend>{{ __('La marque concernée') }}</legend>
<div class="input-group mb-3">
<label class="input-group-text" for="exportBrand">{{ __('Les client de la marque') }}</label>
<label class="input-group-text" for="exportBrand">{{ __('Les clients de la marque') }}</label>
<select class="form-select" id="exportBrand" name="brand" required>
<option value="" selected>{{ __('Choissez une marque') }}</option>
@foreach ($brands as $i => $brand)

View file

@ -1,14 +1,15 @@
<div class="table-responsive">
<table class="table-hover table text-center">
<thead class="border-top-0 border-start-0 border-end-0 border border-2">
@php
$cols = [
@include('bo.modules.table-col-sorter', [
'cols' => [
'question' => __('Question'),
'brand_id' => __('Marque'),
'answers' => __('Réponses'),
];
@endphp
@include('bo.modules.table-col-sorter', ['cols' => $cols, 'mobileHide' => ['status'], 'ignore' => ['answers']])
],
'mobileHide' => ['status'],
'ignore' => ['answers']
])
</thead>
<tbody>
@if (count($questionModels))

View file

@ -1,17 +1,14 @@
<div class="table-responsive">
<table class="table-hover fix-action m-0 table">
<thead class="border-top-0 border-start-0 border-end-0 border border-2">
@php
$cols = [
@include('bo.modules.table-col-sorter', [
'cols' => [
'name' => __('Nom'),
'brand_id' => __('Marque'),
'bearer_token_date' => __('Date du Bearer token'),
'generateToken' => __('Regénerer un token'),
'created_at' => __('Date de création'),
];
@endphp
@include('bo.modules.table-col-sorter', [
'cols' => $cols,
],
'mobileHide' => ['status'],
'ignore' => ['generateToken'],
])

View file

@ -1,15 +1,13 @@
<div class="table-responsive">
<table class="table-hover fix-action m-0 table">
<thead class="border-top-0 border-start-0 border-end-0 border border-2">
@php
$cols = [
@include('bo.modules.table-col-sorter', [
'cols' => [
'hashcode' => __('Hashcode'),
'email' => __('E-mail'),
'brand_id' => __('Marque'),
'created_at' => __('Date opt-in'),
];
@endphp
@include('bo.modules.table-col-sorter', [
'cols' => $cols,
],
'mobileHide' => ['status'],
'ignore' => ['status', 'optin', 'updated_at'],
])
@ -18,6 +16,7 @@
@if ($singleoptinModels->count())
@foreach ($singleoptinModels as $singleoptinModel)
<tr>
<td class="text-center align-middle">{{ $singleoptinModel->hashcode }}</td>
<td class="text-center align-middle">{{ $singleoptinModel->email }}</td>
<td class="text-center align-middle">{{ $singleoptinModel->brand->name }}</td>
<td class="text-center align-middle">

View file

@ -2,8 +2,7 @@
@section('title', __('Création d\'un :model', ['model' => __('models.classes.user')]))
@section('description', __('Création d\'un tout nouveau :model', ['model' => __('models.classes.user')]))
@section('breadcrumb',
request()->route()->getName())
@section('breadcrumb', request()->route()->getName())
@section('content')
<div class="d-flex justify-content-between flex-md-nowrap align-items-center flex-wrap pb-3">

View file

@ -2,8 +2,7 @@
@section('title', __('Édition d\'un :model', ['model' => __('models.classes.user')]))
@section('description', __('Édition d\'un :model déjà existant', ['model' => __('models.classes.user')]))
@section('breadcrumb',
request()->route()->getName())
@section('breadcrumb', request()->route()->getName())
@section('content')
<div class="d-flex justify-content-between flex-md-nowrap align-items-center flex-wrap pb-3">