• 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
Screenshots Loading commit data...
app Loading commit data...
bootstrap Loading commit data...
config Loading commit data...
database Loading commit data...
docker Loading commit data...
docs Loading commit data...
docs-site Loading commit data...
flutter_shell Loading commit data...
gap-filling-plans Loading commit data...
lang Loading commit data...
marketing-site Loading commit data...
plans Loading commit data...
public Loading commit data...
reference/oc-sport Loading commit data...
resources Loading commit data...
routes Loading commit data...
scripts Loading commit data...
storage Loading commit data...
tests Loading commit data...
.dockerignore Loading commit data...
.editorconfig Loading commit data...
.env.example Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
.npmrc Loading commit data...
Beanding Guide.txt Loading commit data...
CLAUDE.md Loading commit data...
Dockerfile Loading commit data...
README.md Loading commit data...
artisan Loading commit data...
captain-definition Loading commit data...
composer.json Loading commit data...
composer.lock Loading commit data...
deploy.sh Loading commit data...
elcaptain-sportsonly-db.md Loading commit data...
one-click-app.yml Loading commit data...
package-lock.json Loading commit data...
package.json Loading commit data...
phpunit.xml Loading commit data...
system info.txt Loading commit data...
vite.config.js Loading commit data...
نادى الشيخ زايد كشف بيانات اللاعبين (2).html Loading commit data...