|
|
|
|
@ -43,6 +43,7 @@ class EtqanOvrProviderModel with ChangeNotifier, DiagnosticableTreeMixin {
|
|
|
|
|
File? attachment;
|
|
|
|
|
String? attachmentBase64;
|
|
|
|
|
String description = '';
|
|
|
|
|
bool isAnonymous = false;
|
|
|
|
|
|
|
|
|
|
/// Initialize speech recognition - call this once when screen loads
|
|
|
|
|
Future<void> initSpeech() async {
|
|
|
|
|
@ -149,6 +150,12 @@ class EtqanOvrProviderModel with ChangeNotifier, DiagnosticableTreeMixin {
|
|
|
|
|
notifyListeners();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Set isAnonymous
|
|
|
|
|
void setIsAnonymous(bool value) {
|
|
|
|
|
isAnonymous = value;
|
|
|
|
|
notifyListeners();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Clear create request form
|
|
|
|
|
void clearCreateRequestForm() {
|
|
|
|
|
selectedProject = null;
|
|
|
|
|
@ -156,6 +163,7 @@ class EtqanOvrProviderModel with ChangeNotifier, DiagnosticableTreeMixin {
|
|
|
|
|
attachment = null;
|
|
|
|
|
attachmentBase64 = null;
|
|
|
|
|
description = '';
|
|
|
|
|
isAnonymous = false;
|
|
|
|
|
notifyListeners();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ -163,7 +171,7 @@ class EtqanOvrProviderModel with ChangeNotifier, DiagnosticableTreeMixin {
|
|
|
|
|
Future<bool> submitRequest(BuildContext context) async {
|
|
|
|
|
try {
|
|
|
|
|
Utils.showLoading(context);
|
|
|
|
|
int? isSuccess = await EtqanApiClient().createRequest(description, selectedProject?.projectId, attachmentBase64);
|
|
|
|
|
int? isSuccess = await EtqanApiClient().createRequest(description, selectedProject?.projectId, attachmentBase64, isAnonymous);
|
|
|
|
|
Utils.hideLoading(context);
|
|
|
|
|
if (isSuccess == 1) {
|
|
|
|
|
getEtqanEmployeeRequestsList = await EtqanApiClient().getEmployeeEtqanRequests();
|
|
|
|
|
|