mirror of
https://github.com/lemeow125/Borrowing-TrackerFrontend.git
synced 2025-06-29 08:55:48 +08:00
Added consumables to transaction and improved transaction entry viewing and pdf generation. Also added transactions this day and this month in technician dashboard
This commit is contained in:
parent
eea2b590d2
commit
ad9981ae44
8 changed files with 197 additions and 8 deletions
|
@ -32,6 +32,7 @@ export default function AddTransactionPage() {
|
|||
const [selectedteacher, SetSelectedTeacher] = useState<number>(0);
|
||||
const [subject, SetSubject] = useState("");
|
||||
const [remarks, SetRemarks] = useState("");
|
||||
const [consumables, SetConsumables] = useState("");
|
||||
const [error, setError] = useState("");
|
||||
|
||||
const equipments = useQuery({
|
||||
|
@ -167,6 +168,20 @@ export default function AddTransactionPage() {
|
|||
placeholder={"Optionally add a brief description of the request"}
|
||||
/>
|
||||
</FormControl>
|
||||
<FormControl style={{ marginTop: "8px" }}>
|
||||
<FormLabel style={styles.text_dark}>Consumables</FormLabel>
|
||||
<TextField
|
||||
multiline
|
||||
style={styles.input_form}
|
||||
onChange={(e: React.ChangeEvent<HTMLInputElement>) => {
|
||||
SetConsumables(e.target.value);
|
||||
setError("");
|
||||
}}
|
||||
label={"Consumables"}
|
||||
value={consumables}
|
||||
placeholder={"Write down any consumables here"}
|
||||
/>
|
||||
</FormControl>
|
||||
</div>
|
||||
<p style={{ ...styles.text_dark, ...styles.text_M }}>{error}</p>
|
||||
<div
|
||||
|
@ -189,6 +204,7 @@ export default function AddTransactionPage() {
|
|||
subject: subject,
|
||||
remarks: remarks || " ",
|
||||
transaction_status: "Pending Approval",
|
||||
consumables: consumables || "",
|
||||
borrower: user.data?.id || 0,
|
||||
});
|
||||
if (data[0]) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue