refactor: Update package and bundle identifiers to reflect new naming convention
This commit is contained in:
parent
bc9fc4d6f1
commit
6568dc70c8
@ -15,7 +15,7 @@ if (keystorePropertiesFile.exists()) {
|
|||||||
|
|
||||||
android {
|
android {
|
||||||
// Define the namespace for your Android application
|
// Define the namespace for your Android application
|
||||||
namespace = "com.onfieldwork.marcoaiot"
|
namespace = "com.marcoonfieldwork.aiot"
|
||||||
// Set the compile SDK version based on Flutter's configuration
|
// Set the compile SDK version based on Flutter's configuration
|
||||||
compileSdk = flutter.compileSdkVersion
|
compileSdk = flutter.compileSdkVersion
|
||||||
// Set the NDK version based on Flutter's configuration
|
// Set the NDK version based on Flutter's configuration
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
package com.onfieldwork.marcoaiot
|
package com.marcoonfieldwork.aiot
|
||||||
|
|
||||||
import io.flutter.embedding.android.FlutterActivity
|
import io.flutter.embedding.android.FlutterActivity
|
||||||
|
|
||||||
|
|||||||
@ -368,7 +368,7 @@
|
|||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"@executable_path/Frameworks",
|
"@executable_path/Frameworks",
|
||||||
);
|
);
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = com.onfieldwork.marcoaiot;
|
PRODUCT_BUNDLE_IDENTIFIER = com.marcoonfieldwork.aiot;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
||||||
SWIFT_VERSION = 5.0;
|
SWIFT_VERSION = 5.0;
|
||||||
@ -384,7 +384,7 @@
|
|||||||
CURRENT_PROJECT_VERSION = 1;
|
CURRENT_PROJECT_VERSION = 1;
|
||||||
GENERATE_INFOPLIST_FILE = YES;
|
GENERATE_INFOPLIST_FILE = YES;
|
||||||
MARKETING_VERSION = 1.0;
|
MARKETING_VERSION = 1.0;
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = com.onfieldwork.marcoaiot.RunnerTests;
|
PRODUCT_BUNDLE_IDENTIFIER = com.marcoonfieldwork.aiot.RunnerTests;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
|
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
|
||||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||||
@ -401,7 +401,7 @@
|
|||||||
CURRENT_PROJECT_VERSION = 1;
|
CURRENT_PROJECT_VERSION = 1;
|
||||||
GENERATE_INFOPLIST_FILE = YES;
|
GENERATE_INFOPLIST_FILE = YES;
|
||||||
MARKETING_VERSION = 1.0;
|
MARKETING_VERSION = 1.0;
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = com.onfieldwork.marcoaiot.RunnerTests;
|
PRODUCT_BUNDLE_IDENTIFIER = com.marcoonfieldwork.aiot.RunnerTests;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
SWIFT_VERSION = 5.0;
|
SWIFT_VERSION = 5.0;
|
||||||
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner";
|
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner";
|
||||||
@ -416,7 +416,7 @@
|
|||||||
CURRENT_PROJECT_VERSION = 1;
|
CURRENT_PROJECT_VERSION = 1;
|
||||||
GENERATE_INFOPLIST_FILE = YES;
|
GENERATE_INFOPLIST_FILE = YES;
|
||||||
MARKETING_VERSION = 1.0;
|
MARKETING_VERSION = 1.0;
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = com.onfieldwork.marcoaiot.RunnerTests;
|
PRODUCT_BUNDLE_IDENTIFIER = com.marcoonfieldwork.aiot.RunnerTests;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
SWIFT_VERSION = 5.0;
|
SWIFT_VERSION = 5.0;
|
||||||
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner";
|
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner";
|
||||||
@ -547,7 +547,7 @@
|
|||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"@executable_path/Frameworks",
|
"@executable_path/Frameworks",
|
||||||
);
|
);
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = com.onfieldwork.marcoaiot;
|
PRODUCT_BUNDLE_IDENTIFIER = com.marcoonfieldwork.aiot;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
||||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||||
@ -569,7 +569,7 @@
|
|||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"@executable_path/Frameworks",
|
"@executable_path/Frameworks",
|
||||||
);
|
);
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = com.onfieldwork.marcoaiot;
|
PRODUCT_BUNDLE_IDENTIFIER = com.marcoonfieldwork.aiot;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
||||||
SWIFT_VERSION = 5.0;
|
SWIFT_VERSION = 5.0;
|
||||||
|
|||||||
@ -12,7 +12,7 @@ import 'package:marco/helpers/widgets/my_text.dart';
|
|||||||
import 'package:marco/helpers/widgets/dashbaord/attendance_overview_chart.dart';
|
import 'package:marco/helpers/widgets/dashbaord/attendance_overview_chart.dart';
|
||||||
import 'package:marco/helpers/widgets/dashbaord/expense_by_status_widget.dart';
|
import 'package:marco/helpers/widgets/dashbaord/expense_by_status_widget.dart';
|
||||||
import 'package:marco/view/layouts/layout.dart';
|
import 'package:marco/view/layouts/layout.dart';
|
||||||
import 'package:marco/helpers/widgets/dashbaord/expense_breakdown_chart.dart';
|
// import 'package:marco/helpers/widgets/dashbaord/expense_breakdown_chart.dart';
|
||||||
|
|
||||||
class DashboardScreen extends StatefulWidget {
|
class DashboardScreen extends StatefulWidget {
|
||||||
const DashboardScreen({super.key});
|
const DashboardScreen({super.key});
|
||||||
@ -61,8 +61,8 @@ class _DashboardScreenState extends State<DashboardScreen> with UIMixin {
|
|||||||
ExpenseByStatusWidget(controller: dashboardController),
|
ExpenseByStatusWidget(controller: dashboardController),
|
||||||
MySpacing.height(24),
|
MySpacing.height(24),
|
||||||
|
|
||||||
// Expense Type Report Chart
|
// // Expense Type Report Chart
|
||||||
ExpenseTypeReportChart(),
|
// ExpenseTypeReportChart(),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
@ -11,7 +11,6 @@ import 'package:marco/helpers/widgets/my_refresh_indicator.dart';
|
|||||||
import 'package:marco/model/employees/add_employee_bottom_sheet.dart';
|
import 'package:marco/model/employees/add_employee_bottom_sheet.dart';
|
||||||
import 'package:marco/helpers/utils/mixins/ui_mixin.dart';
|
import 'package:marco/helpers/utils/mixins/ui_mixin.dart';
|
||||||
|
|
||||||
|
|
||||||
class EmployeeDetailPage extends StatefulWidget {
|
class EmployeeDetailPage extends StatefulWidget {
|
||||||
final String employeeId;
|
final String employeeId;
|
||||||
final bool fromProfile;
|
final bool fromProfile;
|
||||||
@ -30,7 +29,6 @@ class _EmployeeDetailPageState extends State<EmployeeDetailPage> with UIMixin {
|
|||||||
final EmployeesScreenController controller =
|
final EmployeesScreenController controller =
|
||||||
Get.put(EmployeesScreenController());
|
Get.put(EmployeesScreenController());
|
||||||
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
super.initState();
|
super.initState();
|
||||||
@ -61,77 +59,58 @@ class _EmployeeDetailPageState extends State<EmployeeDetailPage> with UIMixin {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget _buildLabelValueRow(String label, String value,
|
Widget _buildDetailRow({
|
||||||
{bool isMultiLine = false}) {
|
required IconData icon,
|
||||||
final lowerLabel = label.toLowerCase();
|
required String label,
|
||||||
final isEmail = lowerLabel == 'email';
|
required String value,
|
||||||
final isPhone =
|
VoidCallback? onTap,
|
||||||
lowerLabel == 'phone number' || lowerLabel == 'emergency phone number';
|
VoidCallback? onLongPress,
|
||||||
|
bool isActionable = false,
|
||||||
void handleTap() {
|
}) {
|
||||||
if (value == 'NA') return;
|
return Padding(
|
||||||
if (isEmail) {
|
padding: const EdgeInsets.symmetric(vertical: 12),
|
||||||
LauncherUtils.launchEmail(value);
|
child: InkWell(
|
||||||
} else if (isPhone) {
|
onTap: isActionable && value != 'NA' ? onTap : null,
|
||||||
LauncherUtils.launchPhone(value);
|
onLongPress: isActionable && value != 'NA' ? onLongPress : null,
|
||||||
}
|
borderRadius: BorderRadius.circular(5),
|
||||||
}
|
child: Row(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
void handleLongPress() {
|
children: [
|
||||||
if (value == 'NA') return;
|
Container(
|
||||||
LauncherUtils.copyToClipboard(value, typeLabel: label);
|
padding: const EdgeInsets.all(8),
|
||||||
}
|
decoration: BoxDecoration(
|
||||||
|
color: contentTheme.primary.withOpacity(0.1),
|
||||||
final valueWidget = GestureDetector(
|
borderRadius: BorderRadius.circular(5),
|
||||||
onTap: (isEmail || isPhone) ? handleTap : null,
|
),
|
||||||
onLongPress: (isEmail || isPhone) ? handleLongPress : null,
|
child: Icon(
|
||||||
child: Text(
|
icon,
|
||||||
value,
|
size: 20,
|
||||||
style: TextStyle(
|
color: contentTheme.primary,
|
||||||
fontWeight: FontWeight.normal,
|
),
|
||||||
color: (isEmail || isPhone) ? contentTheme.primary : Colors.black54,
|
|
||||||
fontSize: 14,
|
|
||||||
decoration: (isEmail || isPhone)
|
|
||||||
? TextDecoration.underline
|
|
||||||
: TextDecoration.none,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
|
|
||||||
return Column(
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
|
||||||
children: [
|
|
||||||
if (isMultiLine) ...[
|
|
||||||
Text(
|
|
||||||
label,
|
|
||||||
style: const TextStyle(
|
|
||||||
fontWeight: FontWeight.bold,
|
|
||||||
color: Colors.black87,
|
|
||||||
fontSize: 14,
|
|
||||||
),
|
),
|
||||||
),
|
MySpacing.width(16),
|
||||||
MySpacing.height(4),
|
Expanded(
|
||||||
valueWidget,
|
child: Column(
|
||||||
] else
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
GestureDetector(
|
|
||||||
onTap: (isEmail || isPhone) ? handleTap : null,
|
|
||||||
onLongPress: (isEmail || isPhone) ? handleLongPress : null,
|
|
||||||
child: RichText(
|
|
||||||
text: TextSpan(
|
|
||||||
text: "$label: ",
|
|
||||||
style: const TextStyle(
|
|
||||||
fontWeight: FontWeight.bold,
|
|
||||||
color: Colors.black87,
|
|
||||||
fontSize: 14,
|
|
||||||
),
|
|
||||||
children: [
|
children: [
|
||||||
TextSpan(
|
Text(
|
||||||
text: value,
|
label,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontWeight: FontWeight.normal,
|
fontSize: 12,
|
||||||
color:
|
color: Colors.grey[600],
|
||||||
(isEmail || isPhone) ? Colors.indigo : Colors.black54,
|
fontWeight: FontWeight.w500,
|
||||||
decoration: (isEmail || isPhone)
|
),
|
||||||
|
),
|
||||||
|
MySpacing.height(4),
|
||||||
|
Text(
|
||||||
|
value,
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 15,
|
||||||
|
color: isActionable && value != 'NA'
|
||||||
|
? contentTheme.primary
|
||||||
|
: Colors.black87,
|
||||||
|
fontWeight: FontWeight.w500,
|
||||||
|
decoration: isActionable && value != 'NA'
|
||||||
? TextDecoration.underline
|
? TextDecoration.underline
|
||||||
: TextDecoration.none,
|
: TextDecoration.none,
|
||||||
),
|
),
|
||||||
@ -139,46 +118,53 @@ class _EmployeeDetailPageState extends State<EmployeeDetailPage> with UIMixin {
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
if (isActionable && value != 'NA')
|
||||||
MySpacing.height(10),
|
Icon(
|
||||||
Divider(color: Colors.grey[300], height: 1),
|
Icons.chevron_right,
|
||||||
MySpacing.height(10),
|
color: Colors.grey[400],
|
||||||
],
|
size: 20,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget _buildInfoCard(employee) {
|
Widget _buildSectionCard({
|
||||||
|
required String title,
|
||||||
|
required IconData titleIcon,
|
||||||
|
required List<Widget> children,
|
||||||
|
}) {
|
||||||
return Card(
|
return Card(
|
||||||
elevation: 3,
|
elevation: 2,
|
||||||
shadowColor: Colors.black12,
|
shadowColor: Colors.black12,
|
||||||
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(5)),
|
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(5)),
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: const EdgeInsets.fromLTRB(12, 16, 12, 16),
|
padding: const EdgeInsets.all(16),
|
||||||
child: Column(
|
child: Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
MySpacing.height(12),
|
Row(
|
||||||
_buildLabelValueRow('Email', _getDisplayValue(employee.email)),
|
children: [
|
||||||
_buildLabelValueRow(
|
Icon(
|
||||||
'Phone Number', _getDisplayValue(employee.phoneNumber)),
|
titleIcon,
|
||||||
_buildLabelValueRow('Emergency Contact Person',
|
size: 20,
|
||||||
_getDisplayValue(employee.emergencyContactPerson)),
|
color: contentTheme.primary,
|
||||||
_buildLabelValueRow('Emergency Phone Number',
|
),
|
||||||
_getDisplayValue(employee.emergencyPhoneNumber)),
|
MySpacing.width(8),
|
||||||
_buildLabelValueRow('Gender', _getDisplayValue(employee.gender)),
|
Text(
|
||||||
_buildLabelValueRow('Birth Date', _formatDate(employee.birthDate)),
|
title,
|
||||||
_buildLabelValueRow(
|
style: const TextStyle(
|
||||||
'Joining Date', _formatDate(employee.joiningDate)),
|
fontSize: 16,
|
||||||
_buildLabelValueRow(
|
fontWeight: FontWeight.bold,
|
||||||
'Current Address',
|
color: Colors.black87,
|
||||||
_getDisplayValue(employee.currentAddress),
|
),
|
||||||
isMultiLine: true,
|
),
|
||||||
),
|
],
|
||||||
_buildLabelValueRow(
|
|
||||||
'Permanent Address',
|
|
||||||
_getDisplayValue(employee.permanentAddress),
|
|
||||||
isMultiLine: true,
|
|
||||||
),
|
),
|
||||||
|
MySpacing.height(8),
|
||||||
|
const Divider(),
|
||||||
|
...children,
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@ -224,65 +210,219 @@ class _EmployeeDetailPageState extends State<EmployeeDetailPage> with UIMixin {
|
|||||||
child: Column(
|
child: Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
Row(
|
// Header Section
|
||||||
children: [
|
Card(
|
||||||
Avatar(
|
elevation: 2,
|
||||||
firstName: employee.firstName,
|
shadowColor: Colors.black12,
|
||||||
lastName: employee.lastName,
|
shape: RoundedRectangleBorder(
|
||||||
size: 45,
|
borderRadius: BorderRadius.circular(5),
|
||||||
),
|
),
|
||||||
MySpacing.width(12),
|
child: Padding(
|
||||||
Expanded(
|
padding: const EdgeInsets.all(16),
|
||||||
child: Column(
|
child: Row(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
children: [
|
||||||
children: [
|
Avatar(
|
||||||
MyText.titleMedium(
|
firstName: employee.firstName,
|
||||||
'${employee.firstName} ${employee.lastName}',
|
lastName: employee.lastName,
|
||||||
fontWeight: 700,
|
size: 45,
|
||||||
|
),
|
||||||
|
MySpacing.width(16),
|
||||||
|
Expanded(
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
MyText.titleMedium(
|
||||||
|
'${employee.firstName} ${employee.lastName}',
|
||||||
|
fontWeight: 700,
|
||||||
|
),
|
||||||
|
MySpacing.height(6),
|
||||||
|
MyText.bodySmall(
|
||||||
|
_getDisplayValue(employee.jobRole),
|
||||||
|
fontWeight: 500,
|
||||||
|
),
|
||||||
|
],
|
||||||
),
|
),
|
||||||
MySpacing.height(6),
|
),
|
||||||
MyText.bodySmall(
|
IconButton(
|
||||||
_getDisplayValue(employee.jobRole),
|
icon: Icon(Icons.edit,
|
||||||
fontWeight: 500,
|
size: 24, color: contentTheme.primary),
|
||||||
),
|
onPressed: () async {
|
||||||
],
|
final result = await showModalBottomSheet<
|
||||||
),
|
Map<String, dynamic>>(
|
||||||
),
|
context: context,
|
||||||
IconButton(
|
isScrollControlled: true,
|
||||||
icon:
|
backgroundColor: Colors.transparent,
|
||||||
Icon(Icons.edit, size: 24, color: contentTheme.primary),
|
builder: (_) => AddEmployeeBottomSheet(
|
||||||
onPressed: () async {
|
employeeData: {
|
||||||
final result =
|
'id': employee.id,
|
||||||
await showModalBottomSheet<Map<String, dynamic>>(
|
'first_name': employee.firstName,
|
||||||
context: context,
|
'last_name': employee.lastName,
|
||||||
isScrollControlled: true,
|
'phone_number': employee.phoneNumber,
|
||||||
backgroundColor: Colors.transparent,
|
'email': employee.email,
|
||||||
builder: (_) => AddEmployeeBottomSheet(
|
'hasApplicationAccess':
|
||||||
employeeData: {
|
employee.hasApplicationAccess,
|
||||||
'id': employee.id,
|
'gender': employee.gender.toLowerCase(),
|
||||||
'first_name': employee.firstName,
|
'job_role_id': employee.jobRoleId,
|
||||||
'last_name': employee.lastName,
|
'joining_date':
|
||||||
'phone_number': employee.phoneNumber,
|
employee.joiningDate?.toIso8601String(),
|
||||||
'email': employee.email,
|
},
|
||||||
'hasApplicationAccess':
|
),
|
||||||
employee.hasApplicationAccess,
|
);
|
||||||
'gender': employee.gender.toLowerCase(),
|
|
||||||
'job_role_id': employee.jobRoleId,
|
|
||||||
'joining_date':
|
|
||||||
employee.joiningDate?.toIso8601String(),
|
|
||||||
},
|
|
||||||
),
|
|
||||||
);
|
|
||||||
|
|
||||||
if (result != null) {
|
if (result != null) {
|
||||||
controller.fetchEmployeeDetails(widget.employeeId);
|
controller
|
||||||
|
.fetchEmployeeDetails(widget.employeeId);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
MySpacing.height(16),
|
||||||
|
|
||||||
|
// Contact Information Section
|
||||||
|
_buildSectionCard(
|
||||||
|
title: 'Contact Information',
|
||||||
|
titleIcon: Icons.contact_phone,
|
||||||
|
children: [
|
||||||
|
_buildDetailRow(
|
||||||
|
icon: Icons.email_outlined,
|
||||||
|
label: 'Email',
|
||||||
|
value: _getDisplayValue(employee.email),
|
||||||
|
isActionable: true,
|
||||||
|
onTap: () {
|
||||||
|
if (employee.email != null &&
|
||||||
|
employee.email.toString().trim().isNotEmpty) {
|
||||||
|
LauncherUtils.launchEmail(employee.email!);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onLongPress: () {
|
||||||
|
if (employee.email != null &&
|
||||||
|
employee.email.toString().trim().isNotEmpty) {
|
||||||
|
LauncherUtils.copyToClipboard(employee.email!,
|
||||||
|
typeLabel: 'Email');
|
||||||
|
}
|
||||||
|
},
|
||||||
|
),
|
||||||
|
_buildDetailRow(
|
||||||
|
icon: Icons.phone_outlined,
|
||||||
|
label: 'Phone Number',
|
||||||
|
value: _getDisplayValue(employee.phoneNumber),
|
||||||
|
isActionable: true,
|
||||||
|
onTap: () {
|
||||||
|
if (employee.phoneNumber != null &&
|
||||||
|
employee.phoneNumber
|
||||||
|
.toString()
|
||||||
|
.trim()
|
||||||
|
.isNotEmpty) {
|
||||||
|
LauncherUtils.launchPhone(employee.phoneNumber!);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onLongPress: () {
|
||||||
|
if (employee.phoneNumber != null &&
|
||||||
|
employee.phoneNumber
|
||||||
|
.toString()
|
||||||
|
.trim()
|
||||||
|
.isNotEmpty) {
|
||||||
|
LauncherUtils.copyToClipboard(employee.phoneNumber!,
|
||||||
|
typeLabel: 'Phone Number');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
MySpacing.height(14),
|
MySpacing.height(16),
|
||||||
_buildInfoCard(employee),
|
|
||||||
|
// Emergency Contact Section
|
||||||
|
_buildSectionCard(
|
||||||
|
title: 'Emergency Contact',
|
||||||
|
titleIcon: Icons.emergency,
|
||||||
|
children: [
|
||||||
|
_buildDetailRow(
|
||||||
|
icon: Icons.person_outline,
|
||||||
|
label: 'Contact Person',
|
||||||
|
value:
|
||||||
|
_getDisplayValue(employee.emergencyContactPerson),
|
||||||
|
isActionable: false,
|
||||||
|
),
|
||||||
|
_buildDetailRow(
|
||||||
|
icon: Icons.phone_in_talk_outlined,
|
||||||
|
label: 'Emergency Phone',
|
||||||
|
value: _getDisplayValue(employee.emergencyPhoneNumber),
|
||||||
|
isActionable: true,
|
||||||
|
onTap: () {
|
||||||
|
if (employee.emergencyPhoneNumber != null &&
|
||||||
|
employee.emergencyPhoneNumber
|
||||||
|
.toString()
|
||||||
|
.trim()
|
||||||
|
.isNotEmpty) {
|
||||||
|
LauncherUtils.launchPhone(
|
||||||
|
employee.emergencyPhoneNumber!);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onLongPress: () {
|
||||||
|
if (employee.emergencyPhoneNumber != null &&
|
||||||
|
employee.emergencyPhoneNumber
|
||||||
|
.toString()
|
||||||
|
.trim()
|
||||||
|
.isNotEmpty) {
|
||||||
|
LauncherUtils.copyToClipboard(
|
||||||
|
employee.emergencyPhoneNumber!,
|
||||||
|
typeLabel: 'Emergency Phone');
|
||||||
|
}
|
||||||
|
},
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
MySpacing.height(16),
|
||||||
|
|
||||||
|
// Personal Information Section
|
||||||
|
_buildSectionCard(
|
||||||
|
title: 'Personal Information',
|
||||||
|
titleIcon: Icons.person,
|
||||||
|
children: [
|
||||||
|
_buildDetailRow(
|
||||||
|
icon: Icons.wc_outlined,
|
||||||
|
label: 'Gender',
|
||||||
|
value: _getDisplayValue(employee.gender),
|
||||||
|
isActionable: false,
|
||||||
|
),
|
||||||
|
_buildDetailRow(
|
||||||
|
icon: Icons.cake_outlined,
|
||||||
|
label: 'Birth Date',
|
||||||
|
value: _formatDate(employee.birthDate),
|
||||||
|
isActionable: false,
|
||||||
|
),
|
||||||
|
_buildDetailRow(
|
||||||
|
icon: Icons.work_outline,
|
||||||
|
label: 'Joining Date',
|
||||||
|
value: _formatDate(employee.joiningDate),
|
||||||
|
isActionable: false,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
MySpacing.height(16),
|
||||||
|
|
||||||
|
// Address Information Section
|
||||||
|
_buildSectionCard(
|
||||||
|
title: 'Address Information',
|
||||||
|
titleIcon: Icons.location_on,
|
||||||
|
children: [
|
||||||
|
_buildDetailRow(
|
||||||
|
icon: Icons.home_outlined,
|
||||||
|
label: 'Current Address',
|
||||||
|
value: _getDisplayValue(employee.currentAddress),
|
||||||
|
isActionable: false,
|
||||||
|
),
|
||||||
|
_buildDetailRow(
|
||||||
|
icon: Icons.home_work_outlined,
|
||||||
|
label: 'Permanent Address',
|
||||||
|
value: _getDisplayValue(employee.permanentAddress),
|
||||||
|
isActionable: false,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
@ -11,6 +11,8 @@ import 'package:marco/model/employees/employee_info.dart';
|
|||||||
import 'package:marco/controller/auth/mpin_controller.dart';
|
import 'package:marco/controller/auth/mpin_controller.dart';
|
||||||
import 'package:marco/view/employees/employee_profile_screen.dart';
|
import 'package:marco/view/employees/employee_profile_screen.dart';
|
||||||
import 'package:marco/helpers/theme/theme_editor_widget.dart';
|
import 'package:marco/helpers/theme/theme_editor_widget.dart';
|
||||||
|
import 'package:marco/view/faq/faq_screen.dart';
|
||||||
|
import 'package:marco/view/support/support_screen.dart';
|
||||||
|
|
||||||
|
|
||||||
class UserProfileBar extends StatefulWidget {
|
class UserProfileBar extends StatefulWidget {
|
||||||
@ -122,6 +124,7 @@ class _UserProfileBarState extends State<UserProfileBar>
|
|||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget _userProfileSection(bool condensed) {
|
Widget _userProfileSection(bool condensed) {
|
||||||
final padding = MySpacing.fromLTRB(
|
final padding = MySpacing.fromLTRB(
|
||||||
condensed ? 16 : 26,
|
condensed ? 16 : 26,
|
||||||
@ -206,6 +209,17 @@ class _UserProfileBarState extends State<UserProfileBar>
|
|||||||
_menuItemRow(
|
_menuItemRow(
|
||||||
icon: LucideIcons.badge_alert,
|
icon: LucideIcons.badge_alert,
|
||||||
label: 'Support',
|
label: 'Support',
|
||||||
|
onTap: () {
|
||||||
|
Get.to(() => SupportScreen());
|
||||||
|
},
|
||||||
|
),
|
||||||
|
SizedBox(height: spacingHeight),
|
||||||
|
_menuItemRow(
|
||||||
|
icon: LucideIcons.badge_help,
|
||||||
|
label: 'FAQ',
|
||||||
|
onTap: () {
|
||||||
|
Get.to(() => FAQScreen());
|
||||||
|
},
|
||||||
),
|
),
|
||||||
SizedBox(height: spacingHeight),
|
SizedBox(height: spacingHeight),
|
||||||
_menuItemRow(
|
_menuItemRow(
|
||||||
|
|||||||
@ -16,10 +16,10 @@ class _SupportScreenState extends State<SupportScreen> with UIMixin {
|
|||||||
final List<Map<String, dynamic>> contacts = [
|
final List<Map<String, dynamic>> contacts = [
|
||||||
{
|
{
|
||||||
"type": "email",
|
"type": "email",
|
||||||
"label": "info@marcoaiot.com",
|
"label": "support@onfieldwork.com",
|
||||||
"subLabel": "Email us your queries",
|
"subLabel": "Email us your queries",
|
||||||
"icon": LucideIcons.mail,
|
"icon": LucideIcons.mail,
|
||||||
"action": "mailto:info@marcoaiot.com?subject=Support Request"
|
"action": "mailto:support@onfieldwork.com?subject=Support Request"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "phone",
|
"type": "phone",
|
||||||
|
|||||||
@ -7,7 +7,7 @@ project(runner LANGUAGES CXX)
|
|||||||
set(BINARY_NAME "marco")
|
set(BINARY_NAME "marco")
|
||||||
# The unique GTK application identifier for this application. See:
|
# The unique GTK application identifier for this application. See:
|
||||||
# https://wiki.gnome.org/HowDoI/ChooseApplicationID
|
# https://wiki.gnome.org/HowDoI/ChooseApplicationID
|
||||||
set(APPLICATION_ID "com.onfieldwork.marcoaiot")
|
set(APPLICATION_ID "com.marcoonfieldwork.aiot")
|
||||||
|
|
||||||
# Explicitly opt in to modern CMake behaviors to avoid warnings with recent
|
# Explicitly opt in to modern CMake behaviors to avoid warnings with recent
|
||||||
# versions of CMake.
|
# versions of CMake.
|
||||||
|
|||||||
@ -385,7 +385,7 @@
|
|||||||
CURRENT_PROJECT_VERSION = 1;
|
CURRENT_PROJECT_VERSION = 1;
|
||||||
GENERATE_INFOPLIST_FILE = YES;
|
GENERATE_INFOPLIST_FILE = YES;
|
||||||
MARKETING_VERSION = 1.0;
|
MARKETING_VERSION = 1.0;
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = com.onfieldwork.marcoaiot.RunnerTests;
|
PRODUCT_BUNDLE_IDENTIFIER = com.marcoonfieldwork.aiot.RunnerTests;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
SWIFT_VERSION = 5.0;
|
SWIFT_VERSION = 5.0;
|
||||||
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/marco.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/marco";
|
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/marco.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/marco";
|
||||||
@ -399,7 +399,7 @@
|
|||||||
CURRENT_PROJECT_VERSION = 1;
|
CURRENT_PROJECT_VERSION = 1;
|
||||||
GENERATE_INFOPLIST_FILE = YES;
|
GENERATE_INFOPLIST_FILE = YES;
|
||||||
MARKETING_VERSION = 1.0;
|
MARKETING_VERSION = 1.0;
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = com.onfieldwork.marcoaiot.RunnerTests;
|
PRODUCT_BUNDLE_IDENTIFIER = com.marcoonfieldwork.aiot.RunnerTests;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
SWIFT_VERSION = 5.0;
|
SWIFT_VERSION = 5.0;
|
||||||
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/marco.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/marco";
|
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/marco.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/marco";
|
||||||
@ -413,7 +413,7 @@
|
|||||||
CURRENT_PROJECT_VERSION = 1;
|
CURRENT_PROJECT_VERSION = 1;
|
||||||
GENERATE_INFOPLIST_FILE = YES;
|
GENERATE_INFOPLIST_FILE = YES;
|
||||||
MARKETING_VERSION = 1.0;
|
MARKETING_VERSION = 1.0;
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = com.onfieldwork.marcoaiot.RunnerTests;
|
PRODUCT_BUNDLE_IDENTIFIER = com.marcoonfieldwork.aiot.RunnerTests;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
SWIFT_VERSION = 5.0;
|
SWIFT_VERSION = 5.0;
|
||||||
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/marco.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/marco";
|
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/marco.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/marco";
|
||||||
|
|||||||
@ -8,7 +8,7 @@
|
|||||||
PRODUCT_NAME = marco
|
PRODUCT_NAME = marco
|
||||||
|
|
||||||
// The application's bundle identifier
|
// The application's bundle identifier
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = com.onfieldwork.marcoaiot
|
PRODUCT_BUNDLE_IDENTIFIER = com.marcoonfieldwork.aiot
|
||||||
|
|
||||||
// The copyright displayed in application information
|
// The copyright displayed in application information
|
||||||
PRODUCT_COPYRIGHT = Copyright © 2024 com.example. All rights reserved.
|
PRODUCT_COPYRIGHT = Copyright © 2024 com.example. All rights reserved.
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user