HOCO B2B
DesignScreen specificationsBack-office

Administration

Page specs BO-61 to BO-68 and BO-70: users, the roles and permissions matrix, activity log, business settings, reference lists, app versions, data imports, my profile and sessions, and support regions with their WhatsApp numbers.

Administration pages belong to the super admin with the default seed (cahier §3 « Accès total, paramétrage global, rôles, permissions et audit »). Every change made here is audited (AUD-01). The most sensitive changes ask for re-authentication (confirmations).

IDScreenSectionTemplateReleaseDesignBuild
BO-61UsersAdministrationtemplateV1Day 19DSH-12
BO-62Roles & permissions matrixAdministrationbespokeV1Day 19DSH-12
BO-63Activity logAdministrationtemplateV1Day 19DSH-12
BO-64Business settingsAdministrationtemplateV1Day 19DSH-12
BO-65Reference listsAdministrationtemplateV1Day 19DSH-12
BO-66Mobile app versionsAdministrationtemplateV1Day 19DSH-12
BO-67Data importsAdministrationtemplateV1Day 19DSH-12
BO-68My profile & sessionsAdministrationtemplateV1Day 19DSH-12
BO-70Support regions & WhatsApp numbersAdministrationtemplateV1Day 19DSH-12

BO-61 — Users

FieldValue
TemplateList (with drawer)
ReleaseV1
Design dayDay 19 — DES-19
Build taskDSH-12
Route/admin/users (?drawer=)
RequirementsADM-01 · SEC-06 · AUTH-08 · AUTH-06
Permissions requiredusers.view · users.create · users.update (edit, roles, status, password reset) · users.administer (sessions)

Purpose. Manage staff and delegate accounts: create them with roles, deactivate them without deleting their history, reset passwords and revoke sessions (cahier §10). Reseller accounts are managed in the CRM, not here.

Who uses it. Super admin.

Entry points. Administration › Utilisateurs, and links from the activity log (actor).

Layout.

ColumnSource fieldSortableDefault visible
NomdisplayName + avatarYesYes
EmailemailYesYes
TéléphonephoneNoYes
TypeuserType (STAFF / DELEGATE)YesYes
Rôlesroles[] (RoleKey labels)NoYes
Statutstatus (AccountStatus)YesYes
Dernière connexionlastLoginAtYesYes
Sessions activesactiveSessionsYesNo
Créé lecreatedAtYesNo
  • Filters: q, type, role, status.
  • Drawer « Nouvel utilisateur »:
    • Prénom and Nom: required.
    • Email: required for staff, unique.
    • Téléphone: unique, E.164.
    • Rôles: multi-select of the six staff roles, at least one. Delegates are created in BO-18.
    • Langue.
    • Envoyer les accès: by email and/or SMS, with a temporary password.
  • Row actions: « Modifier », « Réinitialiser le mot de passe », « Sessions », « Suspendre » / « Réactiver », « Désactiver ».

Data. admin.users.list, admin.users.create, admin.users.update, admin.users.setStatus, admin.users.resetPassword, admin.users.sessions, admin.roles.list.

Actions.

ActionConfirmation (FR)ReasonAuditEffect
« Créer »——CREATEThe temporary password is sent; it must be changed at first sign-in (BO-01)
Change roles« Modifier les rôles de Karim B. : + Responsable finance ? » (re-authentication)—PERMISSION_CHANGEEffective at the user's next request
« Suspendre »« Suspendre Karim B. ? Ses sessions seront fermées. »RequiredSTATUS_CHANGESessions revoked, sign-in refused
« Désactiver »« Désactiver définitivement ce compte ? L'historique est conservé ; la connexion ne sera plus possible. » (re-authentication)RequiredSTATUS_CHANGEDISABLED, cannot be reactivated (SEC-06)
« Réinitialiser le mot de passe »« Envoyer un mot de passe temporaire à Karim B. ? »—UPDATEThe temporary password is sent; other sessions revoked
Revoke a session« Fermer cette session (Chrome · Windows, il y a 2 h) ? »—UPDATEThat device is signed out

Rules.

  • A user cannot suspend, disable or remove roles from themselves.
  • The last active super admin cannot be suspended, disabled or demoted (409).
  • Disabling keeps every record the user created or validated (orders confirmed, audits).

Real-time. None.

States. A suspended user's row is muted with the reason in a tooltip. An SMS or email sending failure shows « Accès non envoyés — Renvoyer ».

Acceptance criteria.

  • A new user receives the temporary password and must change it at first sign-in.
  • Suspending a user signs them out at their next request.
  • Disabling the last super admin is impossible.
  • Each role change appears in the activity log as PERMISSION_CHANGE with before and after.

BO-62 — Roles & permissions matrix

FieldValue
TemplateBespoke (Settings skeleton with a matrix editor)
ReleaseV1
Design dayDay 19 — DES-19
Build taskDSH-12
Route/admin/roles (?role=COMMERCIAL_ADMIN, ?compare=1)
RequirementsADM-02 · ACL-02 · ACL-04 · ACL-05 · AUD-01
Permissions requiredroles.view (read the matrix) · roles.administer (edit; super admin with the default seed)

Purpose. Edit which actions each role may perform on each module (cahier §3.1 « Les permissions sont gérées par action : voir, créer, modifier, supprimer, valider, exporter et administrer »), with guard rails, a clear view of sensitive permissions, and a diff before saving. The back-office navigation, the visible fields and every API operation follow these permissions (ACL-05).

Who uses it. Super admin. Others with roles.view can read it.

Entry points. Administration › Rôles et permissions.

Layout

  • Left, the roles list: the eight system roles (RoleKey), with label, user count and « Modifié le ».
    • SUPER_ADMIN is marked « Accès total — non modifiable ».
    • DELEGATE and RESELLER are marked « Rôle applicatif — périmètre fixe ». Their permissions are read-only here: their access is defined by the delegate and self scopes.
  • Right, the matrix of the selected role:
    • Rows are the 18 modules (dashboard, crm, field, catalog, pricing, stock, orders, delivery, finance, promotions, loyalty, support, communication, reports, users, roles, audit, settings), with their French labels.
    • Columns are the seven PermissionAction values (Voir, Créer, Modifier, Supprimer, Valider, Exporter, Administrer).
    • A cell is a checkbox. Combinations absent from the permission catalogue (admin.permissions.list) are greyed « — ».
    • Row and column headers have « tout cocher / décocher » toggles.
    • Hover help per cell: what the permission allows, in one sentence, with the main screens. Example: « Valider · Commandes : confirmer, refuser et confirmer pour le revendeur toutes les commandes (BO-41) ; dérogations stock et crédit ».
  • Sensitive permissions carry a warning icon and a legend:
PermissionWhy it is sensitive
orders.validateEvery order needs a person's confirmation (ORD-14); it also allows stock and credit overrides
pricing.view, pricing.updatePurchase prices, margins and price history (ACL-04)
finance.*Financial data, credit limits, credit notes
support.validateAfter-sales resolutions: free replacement orders, credit notes
stock.updateAdjustments and return receptions that move stock
users.*, roles.*, settings.*, audit.*Platform control
*.exportData leaving the system (personal data)
  • « Comparer les rôles » (?compare=1): modules in rows, roles in columns, for one chosen action, or a compact « V C M S Va E A » letter grid per cell. Read-only.
  • Save bar: « 3 permissions ajoutées, 1 retirée · Voir le détail · Annuler · Enregistrer ». « Voir le détail » lists each change with its sensitivity flag.

Actions

ActionEndpointConfirmation (FR)OptimisticAudit
Toggle a cell, row or column— (local until saved)—Local only—
« Enregistrer »admin.roles.updatePermissions with the full set for the role, plus version« Appliquer ces changements au rôle Administrateur commercial (4 utilisateurs) ? + Valider · Retours… ; − Exporter · CRM. Les droits s'appliquent dès la prochaine requête de chaque utilisateur. » A change to a sensitive permission adds « Permission sensible » to the dialog and requires re-authentication.NoPERMISSION_CHANGE (role, added, removed, optional comment)
« Rétablir la configuration par défaut »admin.roles.updatePermissions with the seed set« Rétablir les droits par défaut du rôle ? »NoPERMISSION_CHANGE

Rules

  • Guard rails (also enforced by the server):
    • SUPER_ADMIN always holds every permission. It cannot be edited, and roles.administer cannot be removed from it.
    • DELEGATE and RESELLER permissions are fixed.
    • At least one active user must keep roles.administer and users.administer.
  • Dependencies: any action implies Voir on the same module. Ticking Créer ticks Voir; unticking Voir unticks the row, after a confirmation tooltip.
  • No custom roles in V1: the eight system roles are fixed (RoleKey). There is no « Nouveau rôle ». Users may hold several staff roles, and their permissions are the union.
  • Effect:
    • The server checks permissions on every request, so changes apply at the next call.
    • The back-office shell refreshes me.get on focus and every 5 minutes. Navigation and fields update without a new sign-in (see BO-03).
  • Data scope (zones, assigned resellers, own data) is not a permission and does not appear here (ACL-03).
  • Concurrency: the role carries version. A concurrent edit gets 409 VERSION_CONFLICT and the diff against the newer version.
  • Defaults: the seed shipped with the system is described in Sections visible by role. The authoritative matrix is SRS › Permissions matrix.

Data. admin.roles.list, admin.permissions.list, admin.roles.updatePermissions.

Real-time. None.

States.

  • Read-only mode (roles.view only): the checkboxes are disabled and the save bar is hidden.
  • Unsaved changes: leaving or switching role asks « Abandonner les modifications ? ».
  • Guard-rail refusal: the server message is shown inline on the offending cell.

Acceptance criteria

  • Removing crm.view from Administrateur commercial hides the CRM group for its users within 5 minutes, and the CRM API answers 403 PERMISSION_DENIED for them immediately (cahier §12 « Un utilisateur ne peut pas accéder aux fonctions non autorisées »).
  • Granting pricing.view to a role makes the purchase-price fields appear for its users. Removing it removes them from both the UI and the API responses.
  • Removing orders.validate from every role except super admin leaves the BO-41 queue usable only by the super admin.
  • The super-admin row cannot be changed, and an attempt through the API is refused.
  • Each save creates one PERMISSION_CHANGE audit entry listing the added and removed permissions.
  • Ticking Valider · Commandes also ticks Voir · Commandes.

BO-63 — Activity log

FieldValue
TemplateList (with a detail drawer)
ReleaseV1
Design dayDay 19 — DES-19
Build taskDSH-12
Route/admin/audit
RequirementsAUD-01 · AUD-03 · NFR-08
Permissions requiredaudit.view · audit.export

Purpose. Search the activity journal: logins, creations, modifications, validations, exports, deletions, permission changes and overrides, with user, time and context (cahier §3.1 « Toute action critique est historisée avec utilisateur, date, heure et contexte », §10).

Who uses it. Super admin, and direction on request.

Entry points. Administration › Journal d'activité, and the « Historique » links that open it filtered.

Layout.

ColumnSource fieldSortableDefault visible
Date et heureoccurredAt (seconds)Yes (default descending)Yes
UtilisateurActor, or « Système »YesYes
Applicationapp (ClientApp)YesYes
Actionaction (AuditAction pill)YesYes
ObjetEntity type + business number (link)YesYes
Résumé« Statut : Envoyée → Validée », « Type de client : Détail → Demi-gros »NoYes
MotifreasonNoYes
Adresse IPipNoNo
RequêterequestIdNoNo
  • Filters: actor, action (multi), entityType, entity (number or id), app, from / to (required; default last 7 days; at most 92 days), q.
  • Drawer: every field, and the before/after values as a field table (changed fields highlighted).

Data. admin.audit.list.

Actions. « Exporter » (audit.export) is itself audited EXPORT. The journal is read-only.

Rules.

  • Entries are immutable. Retention follows the policy agreed with HOCO (SEC-08).
  • OVERRIDE entries (order confirmation despite failed controls) carry the failed controls and the reason.

Real-time. None.

States. A range over 92 days is refused with « Période limitée à 92 jours ».

Acceptance criteria.

  • Confirming an order with an override produces VALIDATE and OVERRIDE entries with the actor, the reason and the order number.
  • A customer-type change shows before and after values.
  • Filtering by entity CMD-2026-000158 returns its full history across actors and apps.

BO-64 — Business settings

FieldValue
TemplateSettings
ReleaseV1
Design dayDay 19 — DES-19
Build taskDSH-12
Route/admin/settings (#group)
RequirementsADM-03 · STK-03 · FLD-15 · FIN-05 · PRM-03 · DLV-06
Permissions requiredsettings.view (read) · settings.administer (edit)

Purpose. The business parameters (cahier §8, ADM-03): order minimums, reservation status, GPS tolerance and frequency, credit policy, stacking, payment methods, delivery fees, and the V1 additions. Many are still open decisions, which is why they are settings.

Who uses it. Super admin. Managers read it.

Entry points. Administration › Paramètres, and the « Paramètre » links on other pages.

Layout. Groups in a left anchor navigation, each a card with its own « Enregistrer » and « Modifié par … le … ». The keys are indicative; the settings catalogue in the SRS is authoritative.

GroupSettingTypeDefaultNotes
CommandesMontant minimum de commande (orders.minAmount)Money HTAssumption — to set with HOCOORD-02
Réservation du stock à (orders.reserveStockAt)Status selectVALIDATED (the back-office confirmation)Confirmation is always manual (ORD-14); nothing here can make it automatic
Déduction du stock à (orders.deductStockAt)Status selectSHIPPED—
Alerte commande à confirmer après (orders.confirmationAlertMinutes)Minutes120Red badge and card in BO-04 / BO-41
Annulation par le revendeur jusqu'àStatus multi-selectSUBMITTED, PENDINGORD-10
Délai de confirmation des commandes assistéesHours72ORD-08
Commande en retard aprèsHours after confirmation48Reports
Prix et clientsPrix visibles avant validation du compte (catalog.pricesVisibleBeforeValidation)ToggleOn (decision to confirm)Guests never see prices (AUTH-10); ordering always needs validation
Type de client par défaut proposé à l'inscriptionCustomerTypeNone (the reseller chooses)Confirmed at validation (AUTH-11)
StockGestion du stock (stock.mode)Global / par entrepôtGlobalSTK-01
Seuil d'alerte par défautInteger10Assumption
Display to resellers—Not configurable: availability onlySTK-07
Paiement et créditModes de paiement activés (payments.enabledMethods)Multi-select of PaymentMethodAll fiveDisabling one asks for confirmation
Dépassement du plafond (credit.overLimitPolicy)« Bloquer » / « Exiger une validation »« Exiger une validation »Cahier §4.7
Échéance par défautDays30Assumption
FacturationFacture générée àStatus selectSHIPPEDAssumption — confirm
LivraisonFrais de livraisonA table per wilaya (fee HT) + a free-delivery threshold—DLV-06
PromotionsRègle de cumul (promotions.stackingMode)« Meilleure remise uniquement » / « Par priorité »« Par priorité »PRM-03
Remise cumulée maximale par ligne%50 %Assumption
Retours et SAVDélai de demande de retourDays after delivery7Assumption
Rembourser les frais de livraison en cas de retour totalToggleOffAssumption
Terrain et GPSTolérance de check-in (field.gpsToleranceMeters)Metres150FLD-15
Précision GPS maximaleMetres100—
Fréquence de localisationMinutes + metres5 min / 200 mOnly while a tour is IN_PROGRESS
Conservation des positionsDays90SEC-08
CRMFenêtre d'activité (crm.activityWindowDays)Days60Active / inactive resellers
Relance après inactivitéDays45Creates a TO_FOLLOW_UP task. Assumption
SécuritéDurée de session back-officeDays7 (sliding)Decision to confirm
Ré-authentification pour les actions sensiblesMinutes15—

Data. admin.settings.get, admin.settings.update.

Actions.

  • « Enregistrer » per group. It is validated by the server and audited UPDATE with before and after values.
  • Changes with operational impact ask for confirmation and re-authentication: GPS tolerance, payment methods, credit policy, stock reservation status. For example: « Passer la tolérance GPS de 150 m à 300 m ? Les prochains check-ins seront évalués avec la nouvelle valeur. »

Rules.

  • Settings apply to new events only. For example, a new tolerance does not re-evaluate past check-ins, and new delivery fees do not change submitted orders.
  • No setting can enable automatic order confirmation or show stock quantities to resellers (§1b.1–2).

Real-time. None.

States. Read-only for settings.view. Validation errors are shown inline per field.

Acceptance criteria.

  • Changing Tolérance de check-in to 200 m makes the next delegate check-in at 180 m succeed, and the audit shows before and after.
  • Disabling Crédit removes it from every reseller's checkout options.
  • The settings page offers no option for automatic confirmation or quantity display.

BO-65 — Reference lists

FieldValue
TemplateSettings
ReleaseV1
Design dayDay 19 — DES-19
Build taskDSH-12
Route/admin/reference-lists (?list=ORDER_REFUSAL_REASON)
RequirementsADM-05
Permissions requiredsettings.administer

Purpose. Edit the reference lists used in forms and reasons (cahier §6.5, §6.8; ADM-05).

Who uses it. Super admin.

Entry points. Administration › Listes de référence.

Layout.

  • Left, the lists (ReferenceItem.listKey): BUSINESS_TYPE (Types de commerce), PERSON_ROLE (Fonctions), VISIT_NOT_DONE_REASON, VISIT_ISSUE_TAG, TOUR_SUSPEND_REASON, ORDER_REFUSAL_REASON, ORDER_CANCEL_REASON, PAYMENT_REJECT_REASON.
  • Right, the items table: Libellé (FR), Libellé (AR) and Libellé (EN) (prepared), Code (stable, UPPER_SNAKE, immutable), Commentaire obligatoire (for « Autre »), Ordre (drag), Actif, Utilisations.
  • Links: potentials, ticket types and after-sales issues are enums, translated in the apps. Visit types are edited in BO-26, carriers in BO-43.

Data. admin.referenceLists.crud. The apps read reference.lists, cacheable.

Actions. Add, edit, reorder (optimistic) and deactivate items. All are audited.

Rules.

  • Items in use are never deleted, only deactivated. Deactivated items still display on past records.
  • Changes reach the apps at their next fetch (ETag) and the delegate app through sync.delta.

Real-time. None.

States. The seeded items are listed. Assumption — the seed labels are to validate with HOCO.

Acceptance criteria.

  • A new refusal reason appears in the BO-39 refusal dialog.
  • A deactivated reason is no longer offered but still shows on orders refused with it.

BO-66 — Mobile app versions

FieldValue
TemplateSettings
ReleaseV1
Design dayDay 19 — DES-19
Build taskDSH-12
Route/admin/app-versions
RequirementsADM-07 · AUTH-09
Permissions requiredsettings.administer

Purpose. Control the mobile apps' version policy per app and platform, and maintenance mode (cahier §9, §13.4).

Who uses it. Super admin (with Imad at each release).

Entry points. Administration › Versions des applications.

Layout. One card per app (Application revendeur, Application délégué) × platform (Android; iOS when published).

FieldTypeValidationEffect
Version minimaleSemverAt most the latest versionBelow it: 426 UPGRADE_REQUIRED and the forced-update screen
Dernière versionSemver—Below it: an optional update prompt
Lien storeURLPlay Store / App Store URLUsed by the update screens
Notes de version (FR)Text, 500 characters max—Shown in the update prompt
Mode maintenanceToggle + message + « jusqu'à »Message required when onApps show the maintenance screen; the API answers 503 MAINTENANCE to that app

The reseller web is not versioned; it is updated on deploy.

Data. admin.appVersions.crud. The apps read appConfig.get.

Actions.

  • Raising the minimum version asks: « Les appareils sous la version 1.3.0 devront mettre à jour l'application avant de l'utiliser. Continuer ? ». Re-authentication; audited UPDATE.
  • Turning maintenance on asks for confirmation.

Rules. The minimum version can never exceed the version published on the store; the person saving confirms this in the dialog. Delegates with unsynced offline data are warned in the app before the forced update (SYN-04).

Real-time. None.

States. iOS cards are hidden until iOS is enabled (HOCO's decision).

Acceptance criteria.

  • With minimum version 1.3.0, an app at 1.2.9 gets 426 and the forced-update screen.
  • Maintenance mode on the delegate app does not affect the reseller app.

BO-67 — Data imports

FieldValue
TemplateList (import history + the wizard of BO-32)
ReleaseV1
Design dayDay 19 — DES-19
Build taskDSH-12
Route/admin/imports · /admin/imports/new?type=resellers (or users, stock)
RequirementsADM-06 · CRM-03 · AUTH-11
Permissions requiredsettings.administer

Purpose. Run the initial imports of resellers, user accounts and stock (cahier §13.2 « Import initial des produits, revendeurs et comptes utilisateurs »). Products import through BO-32.

Who uses it. Super admin (go-live, LCH-01).

Entry points. Administration › Imports de données.

Layout.

  • History table: Type, Fichier, Lancé par, Date, Statut (JobStatus), Lignes (created / updated / errors), Rapport.
  • « Nouvel import » reuses the four steps of BO-32 (template, file, dry run, apply) with the type's columns:
TypeKey columnsSpecific rules
Revendeurstelephone (match key, normalised, unique), magasin, responsable, type_client (SUPER_GROS / DEMI_GROS / DETAIL, required), type_commerce, wilaya, commune, adresse, gps, delegue_code, statut, segmentDuplicate phones in the file or the database are reported (CRM-03). Source IMPORT. The customer type is recorded as confirmed for existing customers (AUTH-11).
Utilisateursprenom, nom, email, telephone, roles or delegue (+ zones)Option « Envoyer les accès maintenant / plus tard ». Temporary passwords.
Stocksku, entrepot, quantiteSets the physical quantity through ADJUSTMENT movements with the reason « Import initial ». Refused while orders hold reservations on the variant, unless « Ignorer » is ticked.

Data. admin.imports.create (type, dryRun), admin.imports.get, files.createUpload.

Actions. As in BO-32: a dry-run report, then « Importer » with the confirmation of counts. One IMPORT audit entry per apply.

Rules. Applying is idempotent (same file, no duplicates). Nothing is written by the dry run.

Real-time. None. Progress comes from polling the job.

States. As in BO-32.

Acceptance criteria.

  • A reseller file with a missing type_client is reported per row and cannot be applied for those rows.
  • Re-applying the same reseller file creates no duplicate.
  • A stock import creates one ADJUSTMENT per changed variant with the reason « Import initial ».

BO-68 — My profile & sessions

FieldValue
TemplateSettings
ReleaseV1
Design dayDay 19 — DES-19
Build taskDSH-12 (DSH-01 also lists it, for the shell's user menu)
Route/me
RequirementsAUTH-06 · AUTH-07 · NFR-06
Permissions requiredAny session

Purpose. Let each staff user manage their profile, password and sessions, and see their roles.

Who uses it. Every staff user.

Entry points. User menu › « Mon profil et sessions ».

Layout.

GroupContent
ProfilAvatar (AVATAR), first and last name, email (read-only), phone (read-only), language (Français; Arabic and English once enabled)
Mot de passeCurrent, new and confirmation fields, with the policy checklist of BO-02
SessionsDevice and browser, app (ClientApp), approximate location from the IP, last activity, a « Cette session » badge; « Fermer » per session; « Fermer toutes les autres sessions »
Alertes en directPer-event toggles for the live toasts (stored in the browser)
Mes droitsRead-only: my roles and effective permissions grouped by module

Data. me.get, me.update, auth.password.change, auth.sessions.list, auth.sessions.revoke.

Actions.

  • Change the password: other sessions are revoked, with the toast « Mot de passe modifié. Vos autres sessions ont été fermées. ». Audited.
  • Revoke a session: confirmation, audited.

Rules. Email and phone changes go through an administrator (BO-61). A phone change would need an OTP flow, which is not offered for staff in V1.

Real-time. None.

States. A wrong current password shows an inline error.

Acceptance criteria.

  • After a password change, a session open on another computer is signed out.
  • Revoking a session signs out that device at its next request.

BO-70 — Support regions & WhatsApp numbers

FieldValue
TemplateList (with drawer and a wilaya map)
ReleaseV1
Design dayDay 19 — DES-19
Build taskDSH-12
Route/admin/support-regions (?drawer=)
RequirementsADM-08 · SUP-05 · GEO-01
Permissions requiredsettings.administer

Purpose. Group the wilayas into support regions, each with its WhatsApp support number and opening hours (§1b.8).

The fixed WhatsApp button of the reseller app and web opens the number of the user's region:

  1. the region of the wilaya declared in their account, when signed in;
  2. otherwise the region of the device location (nearest commune centroid → wilaya → region);
  3. otherwise a wilaya picker, or the default number.

Who uses it. Super admin, with the commercial team.

Entry points. Administration › Régions support et WhatsApp (badge = wilayas without a region).

Layout.

  • Table: Région, Numéro WhatsApp (national display with a wa.me test link), Horaires summary (« dim.–jeu. 08:30–17:00 »), Wilayas (count + names), Par défaut, Actif, Revendeurs couverts.
  • Wilaya map: wilayas coloured by region. Unassigned wilayas are hatched, and a click assigns one to the selected region.
  • Drawer:
FieldTypeValidationDefault
NomTextRequired, unique, 60 characters max—
Numéro WhatsAppPhoneRequired, valid E.164 mobile—
Message pré-rempliText200 characters max« Bonjour HOCO, »
HorairesPer weekday: closed, or from–to (one or two ranges)from before toSun–Thu 08:30–17:00
Message hors horairesText200 characters max« Nous vous répondrons dès l'ouverture. »
WilayasMulti-select (also from the map)A wilaya can belong to one region only—
Région par défautToggleExactly one default region—
ActifToggleThe default region cannot be deactivatedOn
  • « Tester » panel: choose a wilaya, or enter coordinates. It shows the number, link and hours that support.whatsapp returns for that input.

Data. admin.supportRegions.crud (SupportRegion, SupportRegionWilaya), reference.wilayas.

Actions.

  • Create and edit, audited CREATE / UPDATE.
  • Moving a wilaya from one region to another asks « Déplacer Oran de Ouest vers Centre ? Les revendeurs d'Oran contacteront le numéro de Centre. »
  • Deleting a region reassigns its wilayas to the default region after confirmation.

Rules.

  • Each wilaya belongs to at most one region. Wilayas without a region use the default region.
  • Changes apply to the next support.whatsapp call. The apps cache the resolved number for at most 24 h. Assumption — to align with the apps.
  • Numbers are shown to guests too: the WhatsApp button works in guest mode (AUTH-10).

Real-time. None.

States. First use: one default region with HOCO's main number, covering every wilaya. Assumption — the number is to be provided by HOCO.

Acceptance criteria.

  • A signed-in reseller whose declared wilaya is in Ouest opens the Ouest WhatsApp number from the app.
  • A guest located in a wilaya without a region gets the default region's number.
  • A wilaya cannot be assigned to two regions.
  • The « Tester » panel returns the same number as the reseller app for the same wilaya.

On this page