• Mahmoud Aglan's avatar
    feat(programs): let a programme state its hours, its kit and its price without leaving the form · 243cac65
    Mahmoud Aglan authored
    Four things the programme form could not say, all of which sent the desk
    somewhere else or nowhere at all.
    
    A timetable. Recording that a group trains Sunday and Tuesday from four to
    half five required the visual grid, which demands a facility and a space —
    so clubs that place nobody on a grid had no timetable at all, and the
    proration and attendance engines had nothing to read. The form now writes
    plain TrainingSchedule rows on the programme's default group with
    facility_id null. Rows the grid HAS placed are left alone: clearing a
    checkbox here must not strip a space reservation off a scheduled session.
    A day dropped from the selection is deactivated rather than deleted,
    because generated sessions hold a hard FK to the row and attendance hangs
    off those sessions.
    
    Renewal defaults. A new programme opened as manual_renew, so every one had
    to be corrected by hand or quietly stopped billing. It now opens
    auto_renew, monthly, on the first.
    
    Kits. program_products already records 'this player must buy that thing',
    but only for a single product; a kit sold as one thing could not be
    required. program_kits is a separate pivot rather than a nullable kit_id
    on program_products, whose product_id is NOT NULL and whose uniqueness is
    (academy, programme, product). Nor is a kit expanded into its components:
    the POS writes an invoice line carrying itemable_type = Kit, so a
    programme requiring the parts would report every buyer as missing all of
    them. The group roster flags a missing kit the way it flags a missing
    product.
    
    Prices. The programmes list showed no price, so comparing what two
    programmes cost meant opening both. Both tiers now show, in one query for
    the page, and a tier with no active base price reads 'غير محدد' rather
    than 0 — the engine hard-fails there, so a zero would be a figure nobody
    will ever be charged.
    Co-Authored-By: 's avatarClaude Opus 5 (1M context) <noreply@anthropic.com>
    243cac65
Name
Last commit
Last update
..
activities Loading commit data...
admin Loading commit data...
assignments Loading commit data...
attendance Loading commit data...
audit Loading commit data...
auth Loading commit data...
branches Loading commit data...
cash-sessions Loading commit data...
components Loading commit data...
dashboard Loading commit data...
documents Loading commit data...
enrollments Loading commit data...
evaluations Loading commit data...
events Loading commit data...
facilities Loading commit data...
financial Loading commit data...
groups Loading commit data...
guardian Loading commit data...
hr Loading commit data...
inventory Loading commit data...
invoices Loading commit data...
messaging Loading commit data...
notifications Loading commit data...
parent Loading commit data...
participants Loading commit data...
people Loading commit data...
portal Loading commit data...
pos Loading commit data...
pricing Loading commit data...
profile Loading commit data...
programs Loading commit data...
public Loading commit data...
receptionist Loading commit data...
reports Loading commit data...
requests Loading commit data...
roles Loading commit data...
schedule Loading commit data...
settings Loading commit data...
trainer Loading commit data...
training Loading commit data...
users Loading commit data...
wallets Loading commit data...
website Loading commit data...
whatsapp Loading commit data...
wizards Loading commit data...
branch-switcher.blade.php Loading commit data...
dashboard.blade.php Loading commit data...
global-search.blade.php Loading commit data...