tinyqc/app/Views/master/control/dialog_control_form.php
mahdahar 5cae572916 Refactor application structure, unify entry management, and overhaul UI with DaisyUI
- Reorganized Architecture: Moved Master data management (Controls, Departments, Tests) to a dedicated Master namespace/directory for better modularity.
- Unified Data Entry: Consolidated daily and monthly QC entry views and logic into a single streamlined system.
- UI/UX Modernization:
    - Integrated DaisyUI and Alpine.js for a responsive, themeable, and interactive experience.
    - Replaced legacy layouts with a new DaisyUI-based template.
    - Updated branding with new logo and favicon assets.
    - Cleaned up deprecated JavaScript assets (app.js, charts.js, tables.js).
- Backend Enhancements:
    - Added `ControlEntryModel` and `ResultCommentsController` for improved data handling and auditing.
    - Updated routing to support the new controller structure and consolidated API endpoints.
- Documentation & Assets:
    - Added [docs/PRD.md](cci:7://file:///c:/www/tinyqc/docs/PRD.md:0:0-0:0) and [docs/llms.txt](cci:7://file:///c:/www/tinyqc/docs/llms.txt:0:0-0:0) for project context and requirements.
    - Included database schema scripts and backups in the `backup/` directory.
- Cleanup: Removed legacy TUI progress files and unused commands.
2026-01-19 06:37:37 +07:00

84 lines
4.0 KiB
PHP

<dialog class="modal modal-bottom sm:modal-middle" :class="{ 'modal-open': showModal }">
<div class="modal-box border border-base-300 shadow-2xl bg-base-100">
<h3 class="font-bold text-lg mb-4 flex items-center gap-2 text-base-content">
<i class="fa-solid fa-vial text-primary"></i>
<span x-text="form.controlId ? 'Edit Control' : 'New Control'"></span>
</h3>
<div class="space-y-4">
<div class="form-control">
<label class="label">
<span class="label-text font-medium text-base-content opacity-80">Control Name</span>
</label>
<input
type="text"
class="input input-bordered w-full focus:outline-none focus:ring-2 focus:ring-primary/50 focus:border-primary bg-base-200 border-base-300 text-base-content placeholder:opacity-50"
:class="{'border-error': errors.controlName}"
x-model="form.controlName"
placeholder="Enter control name"
/>
<template x-if="errors.controlName">
<label class="label">
<span class="label-text-alt text-error" x-text="errors.controlName"></span>
</label>
</template>
</div>
<div class="grid grid-cols-2 gap-4">
<div class="form-control">
<label class="label">
<span class="label-text font-medium text-base-content opacity-80">Lot Number</span>
</label>
<input
type="text"
class="input input-bordered w-full focus:outline-none focus:ring-2 focus:ring-primary/50 focus:border-primary bg-base-200 border-base-300 text-base-content placeholder:opacity-50"
x-model="form.lotNumber"
placeholder="e.g., LOT12345"
/>
</div>
<div class="form-control">
<label class="label">
<span class="label-text font-medium text-base-content opacity-80">Expiry Date</span>
</label>
<input
type="date"
class="input input-bordered w-full focus:outline-none focus:ring-2 focus:ring-primary/50 focus:border-primary bg-base-200 border-base-300 text-base-content"
x-model="form.expDate"
/>
</div>
</div>
<div class="form-control">
<label class="label">
<span class="label-text font-medium text-base-content opacity-80">Producer</span>
</label>
<input
type="text"
class="input input-bordered w-full focus:outline-none focus:ring-2 focus:ring-primary/50 focus:border-primary bg-base-200 border-base-300 text-base-content placeholder:opacity-50"
x-model="form.producer"
placeholder="Enter producer name"
/>
</div>
</div>
<div class="modal-action mt-6">
<button class="btn btn-ghost opacity-70" @click="closeModal()">Cancel</button>
<button
class="btn btn-primary gap-2 shadow-lg shadow-primary/20 font-medium"
:class="{'loading': loading}"
@click="save()"
:disabled="loading"
>
<template x-if="!loading">
<span><i class="fa-solid fa-save"></i> Save</span>
</template>
<template x-if="loading">
<span>Saving...</span>
</template>
</button>
</div>
</div>
<form method="dialog" class="modal-backdrop bg-black/60" @click="closeModal()"></form>
</dialog>