|
|
|
|
@ -1,3 +1,5 @@
|
|
|
|
|
import 'dart:convert';
|
|
|
|
|
|
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
import 'package:fluttertoast/fluttertoast.dart';
|
|
|
|
|
import 'package:provider/provider.dart';
|
|
|
|
|
@ -29,6 +31,7 @@ import 'package:test_sa/views/widgets/titles/app_sub_title.dart';
|
|
|
|
|
import '../../../../controllers/localization/localization.dart';
|
|
|
|
|
import '../../../../controllers/providers/api/hospitals_provider.dart';
|
|
|
|
|
import '../../../../models/enums/user_types.dart';
|
|
|
|
|
import '../../../widgets/e_signature/e_signature.dart';
|
|
|
|
|
|
|
|
|
|
class RequestGasRefill extends StatefulWidget {
|
|
|
|
|
static const String id = "/request-gas-refill";
|
|
|
|
|
@ -483,14 +486,43 @@ class _RequestGasRefillState extends State<RequestGasRefill> {
|
|
|
|
|
},
|
|
|
|
|
);
|
|
|
|
|
}),
|
|
|
|
|
if (widget.gasRefillModel != null) const SizedBox(height: 16),
|
|
|
|
|
if (widget.gasRefillModel != null) const ASubTitle("Nurse Signature"),
|
|
|
|
|
if (widget.gasRefillModel != null)
|
|
|
|
|
ESignature(
|
|
|
|
|
oldSignature: _formModel.signatureNurse,
|
|
|
|
|
newSignature: _formModel.localNurseSignature,
|
|
|
|
|
onChange: (signature) {
|
|
|
|
|
if (signature == null || signature.isEmpty) {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
_formModel.localNurseSignature = signature;
|
|
|
|
|
_formModel.signatureNurse = "${DateTime.now().toIso8601String()}.png|${base64Encode(signature)}";
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
if (widget.gasRefillModel != null)
|
|
|
|
|
const SizedBox(
|
|
|
|
|
height: 8,
|
|
|
|
|
),
|
|
|
|
|
if (widget.gasRefillModel != null) const ASubTitle("Engineer Signature"),
|
|
|
|
|
if (widget.gasRefillModel != null)
|
|
|
|
|
ESignature(
|
|
|
|
|
oldSignature: _formModel.signatureEngineer,
|
|
|
|
|
newSignature: _formModel.localNurseSignature,
|
|
|
|
|
onChange: (signature) {
|
|
|
|
|
if (signature == null || signature.isEmpty) {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
_formModel.localNurseSignature = signature;
|
|
|
|
|
_formModel.signatureEngineer = "${DateTime.now().toIso8601String()}.png|${base64Encode(signature)}";
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
const SizedBox(height: 16),
|
|
|
|
|
AButton(
|
|
|
|
|
text: widget.gasRefillModel == null ? _subtitle.submit : _subtitle.update,
|
|
|
|
|
onPressed: _onSubmit,
|
|
|
|
|
),
|
|
|
|
|
const SizedBox(
|
|
|
|
|
height: 100,
|
|
|
|
|
)
|
|
|
|
|
const SizedBox(height: 100)
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
|