api calendar and announcement intergrate
This commit is contained in:
parent
86a9b751ba
commit
c577c7005f
3
devtools_options.yaml
Normal file
3
devtools_options.yaml
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
description: This file stores settings for Dart & Flutter DevTools.
|
||||||
|
documentation: https://docs.flutter.dev/tools/devtools/extensions#configure-extension-enablement-states
|
||||||
|
extensions:
|
28
lib/models/Announcements_Response.dart
Normal file
28
lib/models/Announcements_Response.dart
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
class AnnouncementResponse {
|
||||||
|
final String id;
|
||||||
|
final String uniqueId;
|
||||||
|
final List<String> sentTo;
|
||||||
|
final String message;
|
||||||
|
final DateTime createdAt;
|
||||||
|
final DateTime updatedAt;
|
||||||
|
|
||||||
|
AnnouncementResponse({
|
||||||
|
required this.id,
|
||||||
|
required this.uniqueId,
|
||||||
|
required this.sentTo,
|
||||||
|
required this.message,
|
||||||
|
required this.createdAt,
|
||||||
|
required this.updatedAt,
|
||||||
|
});
|
||||||
|
|
||||||
|
factory AnnouncementResponse.fromJson(Map<String, dynamic> json) {
|
||||||
|
return AnnouncementResponse(
|
||||||
|
id: json['_id'] ?? '',
|
||||||
|
uniqueId: json['uniqueId'] ?? '',
|
||||||
|
sentTo: List<String>.from(json['sentTo']),
|
||||||
|
message: json['message'] ?? '',
|
||||||
|
createdAt: DateTime.parse(json['createdAt']),
|
||||||
|
updatedAt: DateTime.parse(json['updatedAt']),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
123
lib/models/pd_rd_response_model.dart
Normal file
123
lib/models/pd_rd_response_model.dart
Normal file
@ -0,0 +1,123 @@
|
|||||||
|
class PdRdResponseModel {
|
||||||
|
String? id;
|
||||||
|
String? uniqueId;
|
||||||
|
String? name;
|
||||||
|
ShippingAddress? shippingAddress;
|
||||||
|
Kyc? kyc;
|
||||||
|
|
||||||
|
String? salesCoordinator; // Nullable property for SalesCoordinator
|
||||||
|
|
||||||
|
PdRdResponseModel({
|
||||||
|
this.id,
|
||||||
|
this.uniqueId,
|
||||||
|
this.name,
|
||||||
|
this.kyc,
|
||||||
|
this.shippingAddress,
|
||||||
|
this.salesCoordinator, // Initialize SalesCoordinator
|
||||||
|
});
|
||||||
|
|
||||||
|
factory PdRdResponseModel.fromJson(Map<String, dynamic> json) =>
|
||||||
|
PdRdResponseModel(
|
||||||
|
id: json["_id"],
|
||||||
|
name: json["name"],
|
||||||
|
uniqueId: json["uniqueId"],
|
||||||
|
kyc: json["kyc"] != null ? Kyc.fromJson(json["kyc"]) : null,
|
||||||
|
shippingAddress: json['shippingAddress'] != null
|
||||||
|
? ShippingAddress.fromJson(json['shippingAddress'])
|
||||||
|
: null,
|
||||||
|
salesCoordinator: json.containsKey('salesCoordinator')
|
||||||
|
? json['salesCoordinator']
|
||||||
|
: null, // Handle missing field
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
class ShippingAddress {
|
||||||
|
final String id;
|
||||||
|
final String street;
|
||||||
|
final String city;
|
||||||
|
final String state;
|
||||||
|
final String postalCode;
|
||||||
|
final String country;
|
||||||
|
final String panNumber;
|
||||||
|
final String tradeName;
|
||||||
|
final String gstNumber;
|
||||||
|
final bool isDefault;
|
||||||
|
|
||||||
|
ShippingAddress({
|
||||||
|
required this.id,
|
||||||
|
required this.street,
|
||||||
|
required this.city,
|
||||||
|
required this.state,
|
||||||
|
required this.postalCode,
|
||||||
|
required this.country,
|
||||||
|
required this.panNumber,
|
||||||
|
required this.tradeName,
|
||||||
|
required this.gstNumber,
|
||||||
|
required this.isDefault,
|
||||||
|
});
|
||||||
|
|
||||||
|
factory ShippingAddress.fromJson(Map<String, dynamic> json) {
|
||||||
|
return ShippingAddress(
|
||||||
|
id: json['_id'] ?? '',
|
||||||
|
street: json['street'] ?? '',
|
||||||
|
city: json['city'] ?? '',
|
||||||
|
state: json['state'] ?? '',
|
||||||
|
postalCode: json['postalCode'] ?? '',
|
||||||
|
country: json['country'] ?? '',
|
||||||
|
panNumber: json['panNumber'] ?? '',
|
||||||
|
tradeName: json['tradeName'] ?? '',
|
||||||
|
gstNumber: json['gstNumber'] ?? '',
|
||||||
|
isDefault: json['isDefault'] ?? false,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class Kyc {
|
||||||
|
final String id;
|
||||||
|
final String street;
|
||||||
|
final String city;
|
||||||
|
final String state;
|
||||||
|
final String postalCode;
|
||||||
|
final String country;
|
||||||
|
final String panNumber;
|
||||||
|
final String tradeName;
|
||||||
|
final String gstNumber;
|
||||||
|
final bool isDefault;
|
||||||
|
final String? panImgUrl; // New field for PAN image URL
|
||||||
|
final String? aadharImgUrl; // New field for Aadhar image URL
|
||||||
|
final String? gstImgUrl; // New field for GST image URL
|
||||||
|
|
||||||
|
Kyc({
|
||||||
|
required this.id,
|
||||||
|
required this.street,
|
||||||
|
required this.city,
|
||||||
|
required this.state,
|
||||||
|
required this.postalCode,
|
||||||
|
required this.country,
|
||||||
|
required this.panNumber,
|
||||||
|
required this.tradeName,
|
||||||
|
required this.gstNumber,
|
||||||
|
required this.isDefault,
|
||||||
|
this.panImgUrl,
|
||||||
|
this.aadharImgUrl,
|
||||||
|
this.gstImgUrl,
|
||||||
|
});
|
||||||
|
|
||||||
|
factory Kyc.fromJson(Map<String, dynamic> json) {
|
||||||
|
return Kyc(
|
||||||
|
id: json['_id'] ?? '',
|
||||||
|
street: json['street'] ?? '',
|
||||||
|
city: json['city'] ?? '',
|
||||||
|
state: json['state'] ?? '',
|
||||||
|
postalCode: json['postalCode'] ?? '',
|
||||||
|
country: json['country'] ?? '',
|
||||||
|
panNumber: json['panNumber'] ?? '',
|
||||||
|
tradeName: json['trade_name'] ?? '',
|
||||||
|
gstNumber: json['gstNumber'] ?? '',
|
||||||
|
isDefault: json['isDefault'] ?? false,
|
||||||
|
panImgUrl: json['pan_img']?['url'],
|
||||||
|
aadharImgUrl: json['aadhar_img']?['url'],
|
||||||
|
gstImgUrl: json['gst_img']?['url'],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
78
lib/models/task_model.dart
Normal file
78
lib/models/task_model.dart
Normal file
@ -0,0 +1,78 @@
|
|||||||
|
class TaskModel {
|
||||||
|
final String id;
|
||||||
|
final String taskId;
|
||||||
|
final String task;
|
||||||
|
final String? note;
|
||||||
|
final String taskStatus;
|
||||||
|
final String? taskPriority;
|
||||||
|
final DateTime taskDueDate;
|
||||||
|
final TaskAssignedTo taskAssignedTo;
|
||||||
|
final String? taskAssignedBy;
|
||||||
|
final String? addedFor;
|
||||||
|
final String? addedForId;
|
||||||
|
final String? tradename;
|
||||||
|
final DateTime? createdAt;
|
||||||
|
final DateTime? updatedAt;
|
||||||
|
final int? version;
|
||||||
|
|
||||||
|
TaskModel({
|
||||||
|
required this.id,
|
||||||
|
required this.taskId,
|
||||||
|
required this.task,
|
||||||
|
this.note,
|
||||||
|
required this.taskStatus,
|
||||||
|
this.taskPriority,
|
||||||
|
required this.taskDueDate,
|
||||||
|
required this.taskAssignedTo,
|
||||||
|
this.taskAssignedBy,
|
||||||
|
this.addedFor,
|
||||||
|
this.addedForId,
|
||||||
|
this.tradename,
|
||||||
|
this.createdAt,
|
||||||
|
this.updatedAt,
|
||||||
|
this.version,
|
||||||
|
});
|
||||||
|
|
||||||
|
factory TaskModel.fromJson(Map<String, dynamic> json) {
|
||||||
|
return TaskModel(
|
||||||
|
id: json['_id'],
|
||||||
|
taskId: json['taskId'],
|
||||||
|
task: json['task'],
|
||||||
|
note: json['note'],
|
||||||
|
taskStatus: json['taskStatus'],
|
||||||
|
taskPriority: json['taskPriority'],
|
||||||
|
taskDueDate: DateTime.parse(json['taskDueDate']),
|
||||||
|
taskAssignedTo: TaskAssignedTo.fromJson(json['taskAssignedTo']),
|
||||||
|
taskAssignedBy: json['taskAssignedBy'],
|
||||||
|
addedFor: json['addedFor'],
|
||||||
|
addedForId: json['addedForId'],
|
||||||
|
tradename: json['tradename'],
|
||||||
|
createdAt: DateTime.parse(json['createdAt']),
|
||||||
|
updatedAt: DateTime.parse(json['updatedAt']),
|
||||||
|
version: json['__v'],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class TaskAssignedTo {
|
||||||
|
final String id;
|
||||||
|
final String name;
|
||||||
|
final String mobileNumber;
|
||||||
|
final String email;
|
||||||
|
|
||||||
|
TaskAssignedTo({
|
||||||
|
required this.id,
|
||||||
|
required this.name,
|
||||||
|
required this.mobileNumber,
|
||||||
|
required this.email,
|
||||||
|
});
|
||||||
|
|
||||||
|
factory TaskAssignedTo.fromJson(Map<String, dynamic> json) {
|
||||||
|
return TaskAssignedTo(
|
||||||
|
id: json['_id'],
|
||||||
|
name: json['name'],
|
||||||
|
mobileNumber: json['mobileNumber'],
|
||||||
|
email: json['email'],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
41
lib/provider/Announcement_Provider.dart
Normal file
41
lib/provider/Announcement_Provider.dart
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
import 'package:dio/dio.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import '../models/Announcements_Response.dart';
|
||||||
|
import '../services/api_client.dart';
|
||||||
|
import '../services/api_urls.dart';
|
||||||
|
|
||||||
|
class AnnouncementProvider extends ChangeNotifier {
|
||||||
|
AnnouncementProvider() {
|
||||||
|
getAnnouncements(); // Fetch announcements when the provider is initialized
|
||||||
|
}
|
||||||
|
|
||||||
|
final _apiClient = ApiClient(); // Use the API client to fetch data
|
||||||
|
List<AnnouncementResponse> announcementList = []; // List to hold announcement data
|
||||||
|
|
||||||
|
bool _isLoading = false; // Loading state
|
||||||
|
|
||||||
|
bool get isLoading => _isLoading; // Getter for loading state
|
||||||
|
|
||||||
|
void setLoading(bool loading) {
|
||||||
|
_isLoading = loading;
|
||||||
|
notifyListeners(); // Notify listeners when loading state changes
|
||||||
|
}
|
||||||
|
|
||||||
|
Future<void> getAnnouncements() async {
|
||||||
|
setLoading(true); // Set loading to true before the request
|
||||||
|
try {
|
||||||
|
Response response = await _apiClient.get(ApiUrls.announcementUrl); // Fetch announcements
|
||||||
|
setLoading(false); // Set loading to false after the request completes
|
||||||
|
if (response.statusCode == 200) {
|
||||||
|
final List<dynamic> data = response.data;
|
||||||
|
announcementList = data
|
||||||
|
.map((item) => AnnouncementResponse.fromJson(item))
|
||||||
|
.toList(); // Map JSON data to the announcement model
|
||||||
|
notifyListeners(); // Notify listeners after data is updated
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
setLoading(false); // Handle errors and stop loading state
|
||||||
|
// Optionally handle errors here (e.g., log error, show message)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -45,7 +45,7 @@ class ProductProvider extends ChangeNotifier {
|
|||||||
if (response.statusCode == 200) {
|
if (response.statusCode == 200) {
|
||||||
productResponse = ProductResponse.fromJson(response.data);
|
productResponse = ProductResponse.fromJson(response.data);
|
||||||
productList = productResponse!.products!
|
productList = productResponse!.products!
|
||||||
.map((product) => ProductModel(sku: product.sKU!, productName: product.name!))
|
.map((product) => ProductModel(sku: product.sKU!, productName: product.name!,id: product.sId!))
|
||||||
.toList();
|
.toList();
|
||||||
notifyListeners(); // Notify listeners to update the UI with the product list
|
notifyListeners(); // Notify listeners to update the UI with the product list
|
||||||
}
|
}
|
||||||
@ -59,6 +59,7 @@ class ProductProvider extends ChangeNotifier {
|
|||||||
// Send POST request to submit products
|
// Send POST request to submit products
|
||||||
Response response = await _apiClient.post(ApiUrls.submitProductUrl,
|
Response response = await _apiClient.post(ApiUrls.submitProductUrl,
|
||||||
data: json.encode({
|
data: json.encode({
|
||||||
|
|
||||||
"addedFor": distributorType.replaceAll(' ', ''),
|
"addedFor": distributorType.replaceAll(' ', ''),
|
||||||
"addedForId": pdRdId,
|
"addedForId": pdRdId,
|
||||||
"products": selectedProducts.map((e) => e.toJson()).toList()
|
"products": selectedProducts.map((e) => e.toJson()).toList()
|
||||||
@ -116,6 +117,7 @@ class ProductProvider extends ChangeNotifier {
|
|||||||
|
|
||||||
// Model class for Product
|
// Model class for Product
|
||||||
class ProductModel {
|
class ProductModel {
|
||||||
|
String id; // ID of the product
|
||||||
String sku; // SKU of the product
|
String sku; // SKU of the product
|
||||||
String productName; // Name of the product
|
String productName; // Name of the product
|
||||||
int? sale; // Sale quantity (optional)
|
int? sale; // Sale quantity (optional)
|
||||||
@ -123,7 +125,9 @@ class ProductModel {
|
|||||||
|
|
||||||
// Constructor for ProductModel
|
// Constructor for ProductModel
|
||||||
ProductModel(
|
ProductModel(
|
||||||
{required this.sku,
|
{
|
||||||
|
required this.id,
|
||||||
|
required this.sku,
|
||||||
required this.productName,
|
required this.productName,
|
||||||
this.sale,
|
this.sale,
|
||||||
this.inventory});
|
this.inventory});
|
||||||
@ -131,6 +135,7 @@ class ProductModel {
|
|||||||
// Factory method to create a ProductModel from JSON
|
// Factory method to create a ProductModel from JSON
|
||||||
factory ProductModel.fromJson(Map<String, dynamic> json) {
|
factory ProductModel.fromJson(Map<String, dynamic> json) {
|
||||||
return ProductModel(
|
return ProductModel(
|
||||||
|
id:json['_id'],
|
||||||
sku: json['SKU'],
|
sku: json['SKU'],
|
||||||
productName: json['ProductName'],
|
productName: json['ProductName'],
|
||||||
sale: json['Sale'],
|
sale: json['Sale'],
|
||||||
@ -142,6 +147,7 @@ class ProductModel {
|
|||||||
// Convert ProductModel to JSON format for API requests
|
// Convert ProductModel to JSON format for API requests
|
||||||
Map<String, dynamic> toJson() {
|
Map<String, dynamic> toJson() {
|
||||||
return {
|
return {
|
||||||
|
'_id': id,
|
||||||
'SKU': sku,
|
'SKU': sku,
|
||||||
'ProductName': productName,
|
'ProductName': productName,
|
||||||
'Sale': sale,
|
'Sale': sale,
|
||||||
|
61
lib/provider/task_provider.dart
Normal file
61
lib/provider/task_provider.dart
Normal file
@ -0,0 +1,61 @@
|
|||||||
|
import 'package:cheminova/models/pd_rd_response_model.dart';
|
||||||
|
import 'package:cheminova/models/task_model.dart';
|
||||||
|
import 'package:cheminova/screens/data_submit_successfull.dart';
|
||||||
|
import 'package:cheminova/services/api_client.dart';
|
||||||
|
import 'package:cheminova/services/api_urls.dart';
|
||||||
|
import 'package:dio/dio.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:intl/intl.dart';
|
||||||
|
|
||||||
|
class TaskProvider extends ChangeNotifier {
|
||||||
|
bool _isLoading = false;
|
||||||
|
PdRdResponseModel? _selectedSalesCoordinator;
|
||||||
|
String? _selectedTask;
|
||||||
|
String? _selectedPriority;
|
||||||
|
String _selectedDate = DateFormat('dd/MM/yyyy').format(DateTime.now());
|
||||||
|
List<PdRdResponseModel> _salesCoordinators = [];
|
||||||
|
List<PdRdResponseModel> _pdList = [];
|
||||||
|
List<PdRdResponseModel> _rdList = [];
|
||||||
|
List<TaskModel> _taskModelList = [];
|
||||||
|
PdRdResponseModel? _selectedDistributor;
|
||||||
|
final TextEditingController _noteController = TextEditingController();
|
||||||
|
final _apiClient = ApiClient();
|
||||||
|
|
||||||
|
bool get isLoading => _isLoading;
|
||||||
|
PdRdResponseModel? get selectedSalesCoordinator => _selectedSalesCoordinator;
|
||||||
|
String? get selectedTask => _selectedTask;
|
||||||
|
String? get selectedPriority => _selectedPriority;
|
||||||
|
String get selectedDate => _selectedDate;
|
||||||
|
List<PdRdResponseModel> get salesCoordinators => _salesCoordinators;
|
||||||
|
TextEditingController get noteController => _noteController;
|
||||||
|
List<PdRdResponseModel> get pdList => _pdList;
|
||||||
|
List<PdRdResponseModel> get rdList => _rdList;
|
||||||
|
List<TaskModel> get taskModelList => _taskModelList;
|
||||||
|
PdRdResponseModel? get selectedDistributor => _selectedDistributor;
|
||||||
|
|
||||||
|
void setLoading(bool loading) {
|
||||||
|
_isLoading = loading;
|
||||||
|
notifyListeners();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Future<void> getAllTaskByDate(DateTime date) async {
|
||||||
|
setLoading(true);
|
||||||
|
try {
|
||||||
|
final String formatedDate = DateFormat('dd/MM/yyyy').format(date);
|
||||||
|
Response response =
|
||||||
|
await _apiClient.get("${ApiUrls.allTaskByDate}?Date=$formatedDate");
|
||||||
|
if (response.statusCode == 200) {
|
||||||
|
List<TaskModel> data = (response.data['tasks'] as List)
|
||||||
|
.map((json) => TaskModel.fromJson(json))
|
||||||
|
.toList();
|
||||||
|
_taskModelList = data;
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
print("Error occurred: $e");
|
||||||
|
} finally {
|
||||||
|
setLoading(false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -324,7 +324,7 @@ class _ProductBlockState extends State<ProductBlock> {
|
|||||||
sku: widget.product.sku,
|
sku: widget.product.sku,
|
||||||
productName: widget.product.productName,
|
productName: widget.product.productName,
|
||||||
sale: sale,
|
sale: sale,
|
||||||
inventory: inventory,
|
inventory: inventory, id: widget.product.id,
|
||||||
));
|
));
|
||||||
} else {
|
} else {
|
||||||
errorMessage = saleError ?? inventoryError;
|
errorMessage = saleError ?? inventoryError;
|
||||||
|
153
lib/screens/Announcements_Screen.dart
Normal file
153
lib/screens/Announcements_Screen.dart
Normal file
@ -0,0 +1,153 @@
|
|||||||
|
import 'package:cheminova/provider/Announcement_Provider.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:cheminova/widgets/common_background.dart';
|
||||||
|
import 'package:cheminova/widgets/common_drawer.dart';
|
||||||
|
import 'package:cheminova/widgets/common_app_bar.dart';
|
||||||
|
import 'package:cheminova/widgets/common_elevated_button.dart';
|
||||||
|
import 'package:intl/intl.dart';
|
||||||
|
import 'package:provider/provider.dart';
|
||||||
|
|
||||||
|
import '../models/Announcements_Response.dart';
|
||||||
|
|
||||||
|
// Main screen that displays notifications
|
||||||
|
class AnnouncementsScreen extends StatefulWidget {
|
||||||
|
const AnnouncementsScreen({super.key});
|
||||||
|
|
||||||
|
@override
|
||||||
|
State<AnnouncementsScreen> createState() => AnnouncementsScreenState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class AnnouncementsScreenState extends State<AnnouncementsScreen> {
|
||||||
|
late AnnouncementProvider _announcementProvider;
|
||||||
|
|
||||||
|
@override
|
||||||
|
void initState() {
|
||||||
|
// Initialize the NotificationProvider in the state when the screen is created
|
||||||
|
_announcementProvider = AnnouncementProvider();
|
||||||
|
super.initState();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
// Use ChangeNotifierProvider to supply NotificationProvider to the widget tree
|
||||||
|
return ChangeNotifierProvider(
|
||||||
|
create: (context) => _announcementProvider,
|
||||||
|
child: CommonBackground(
|
||||||
|
child: Scaffold(
|
||||||
|
backgroundColor: Colors.transparent,
|
||||||
|
appBar: CommonAppBar(
|
||||||
|
actions: [
|
||||||
|
IconButton(
|
||||||
|
onPressed: () {
|
||||||
|
// Pop the screen when the back button is pressed
|
||||||
|
Navigator.pop(context);
|
||||||
|
},
|
||||||
|
icon: Image.asset('assets/Back_attendance.png'),
|
||||||
|
padding: const EdgeInsets.only(right: 20),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
title: const Text('Announcements',
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 20,
|
||||||
|
color: Colors.black,
|
||||||
|
fontWeight: FontWeight.w400,
|
||||||
|
fontFamily: 'Anek')),
|
||||||
|
backgroundColor: Colors.transparent,
|
||||||
|
elevation: 0,
|
||||||
|
),
|
||||||
|
drawer: const CommonDrawer(),
|
||||||
|
// Consumer listens for changes in the NotificationProvider
|
||||||
|
body: Consumer<AnnouncementProvider>(
|
||||||
|
builder: (context, value, child) => value.isLoading
|
||||||
|
// Display a loading indicator if notifications are still loading
|
||||||
|
? const Center(child: CircularProgressIndicator())
|
||||||
|
// Show the list of notifications once loaded
|
||||||
|
: MyListView(value: value),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Function that builds a button for a product
|
||||||
|
Widget buildProductButton(String productName) {
|
||||||
|
return Padding(
|
||||||
|
padding: const EdgeInsets.only(bottom: 15),
|
||||||
|
child: CommonElevatedButton(
|
||||||
|
borderRadius: 30,
|
||||||
|
width: double.infinity,
|
||||||
|
height: kToolbarHeight - 10,
|
||||||
|
text: productName,
|
||||||
|
backgroundColor: const Color(0xff004791),
|
||||||
|
onPressed: () {
|
||||||
|
// Log when the button is pressed
|
||||||
|
debugPrint('$productName pressed');
|
||||||
|
},
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Widget that displays a list of notifications grouped by date
|
||||||
|
class MyListView extends StatelessWidget {
|
||||||
|
final AnnouncementProvider value;
|
||||||
|
|
||||||
|
const MyListView({super.key, required this.value});
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
// Group notifications by their creation date
|
||||||
|
Map<String, List<AnnouncementResponse>> groupedNotifications = {};
|
||||||
|
|
||||||
|
// Iterate over the notification list and group by formatted date
|
||||||
|
for (var notification in value.announcementList.reversed) {
|
||||||
|
String date = DateFormat("dd MMM yyyy").format(DateTime.parse(notification.createdAt.toString()));
|
||||||
|
if (!groupedNotifications.containsKey(date)) {
|
||||||
|
groupedNotifications[date] = [];
|
||||||
|
}
|
||||||
|
groupedNotifications[date]!.add(notification);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Build a ListView for grouped notifications
|
||||||
|
return ListView.builder(
|
||||||
|
|
||||||
|
padding: const EdgeInsets.only(top: 15),
|
||||||
|
itemCount: groupedNotifications.length, // Number of date groups
|
||||||
|
itemBuilder: (context, index) {
|
||||||
|
String date = groupedNotifications.keys.elementAt(index);
|
||||||
|
List<AnnouncementResponse> notificationsForDate = groupedNotifications[date]!;
|
||||||
|
|
||||||
|
return Padding(
|
||||||
|
padding: const EdgeInsets.only(bottom: 10, left: 10, right: 10),
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
// Display the date for each group of notifications
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsets.only(bottom: 8.0),
|
||||||
|
child: Text(
|
||||||
|
date,
|
||||||
|
style: const TextStyle(fontSize: 16, fontWeight: FontWeight.bold),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
// Display each notification in an expandable tile
|
||||||
|
...notificationsForDate.map((item) => Padding(
|
||||||
|
padding: const EdgeInsets.only(bottom: 10),
|
||||||
|
child: ExpansionTile(
|
||||||
|
collapsedBackgroundColor: Colors.white,
|
||||||
|
backgroundColor: Colors.white,
|
||||||
|
trailing: const SizedBox.shrink(), // Remove trailing icon
|
||||||
|
title: const Text(
|
||||||
|
"New Announcement",
|
||||||
|
style: TextStyle(fontSize: 17, fontWeight: FontWeight.w500),
|
||||||
|
),
|
||||||
|
subtitle: Text(item.message),
|
||||||
|
),
|
||||||
|
)),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
@ -121,7 +121,7 @@ class _UpdateInventoryTaskScreenState extends State<UpdateInventoryTaskScreen> {
|
|||||||
distributorType: tasksList.addedFor!, // Pass distributor type
|
distributorType: tasksList.addedFor!, // Pass distributor type
|
||||||
inventoryId: tasksList.sId!, // Pass inventory ID
|
inventoryId: tasksList.sId!, // Pass inventory ID
|
||||||
tradeName: tasksList.tradeName ?? '', // Pass trader name
|
tradeName: tasksList.tradeName ?? '', // Pass trader name
|
||||||
pdRdId: tasksList.sId!, // Pass PD/RD ID
|
pdRdId: tasksList.addedForId!, // Pass PD/RD ID
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
@ -63,6 +63,8 @@ class _AddSalesProductScreenState extends State<AddSalesProductScreen> {
|
|||||||
return PopScope(
|
return PopScope(
|
||||||
canPop: true,
|
canPop: true,
|
||||||
child: CommonBackground(// Common background for the screen
|
child: CommonBackground(// Common background for the screen
|
||||||
|
child: Form(
|
||||||
|
key: formKey,
|
||||||
child: Scaffold(
|
child: Scaffold(
|
||||||
backgroundColor: Colors.transparent,
|
backgroundColor: Colors.transparent,
|
||||||
appBar: CommonAppBar(// Custom AppBar with back button and title
|
appBar: CommonAppBar(// Custom AppBar with back button and title
|
||||||
@ -181,6 +183,7 @@ class _AddSalesProductScreenState extends State<AddSalesProductScreen> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
// Function to show product selection modal bottom sheet
|
// Function to show product selection modal bottom sheet
|
||||||
|
@ -1,51 +1,81 @@
|
|||||||
|
import 'package:cheminova/models/task_model.dart';
|
||||||
|
import 'package:cheminova/provider/task_provider.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:intl/intl.dart';
|
||||||
|
import 'package:provider/provider.dart';
|
||||||
import 'package:table_calendar/table_calendar.dart';
|
import 'package:table_calendar/table_calendar.dart';
|
||||||
import '../widgets/common_app_bar.dart'; // Custom AppBar widget
|
import '../widgets/common_app_bar.dart';
|
||||||
import '../widgets/common_background.dart'; // Custom background widget
|
import '../widgets/common_background.dart';
|
||||||
import '../widgets/common_drawer.dart'; // Custom drawer widget
|
import '../widgets/common_drawer.dart';
|
||||||
|
|
||||||
// Global variables to track the focused and selected dates in the calendar
|
|
||||||
DateTime _focusedDay = DateTime.now();
|
DateTime _focusedDay = DateTime.now();
|
||||||
DateTime? _selectedDay = DateTime.now();
|
DateTime _selectedDay = DateTime.now();
|
||||||
|
|
||||||
// Main Calendar screen
|
class CalendarScreen extends StatefulWidget {
|
||||||
class CalendarScreen extends StatelessWidget {
|
|
||||||
const CalendarScreen({super.key});
|
const CalendarScreen({super.key});
|
||||||
|
|
||||||
|
@override
|
||||||
|
State<CalendarScreen> createState() => _CalendarScreenState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _CalendarScreenState extends State<CalendarScreen> {
|
||||||
|
late TaskProvider taskProvider;
|
||||||
|
|
||||||
|
@override
|
||||||
|
void initState() {
|
||||||
|
taskProvider = TaskProvider();
|
||||||
|
super.initState();
|
||||||
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return CommonBackground( // Wrapper for common background styling
|
return ChangeNotifierProvider(
|
||||||
|
create: (context) => taskProvider,
|
||||||
|
child: Consumer<TaskProvider>(
|
||||||
|
builder: (context, value, child) => CommonBackground(
|
||||||
child: Scaffold(
|
child: Scaffold(
|
||||||
appBar: CommonAppBar( // Custom AppBar
|
appBar: CommonAppBar(
|
||||||
actions: [
|
actions: [
|
||||||
IconButton(
|
IconButton(
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
Navigator.pop(context); // Go back to the previous screen
|
Navigator.pop(context);
|
||||||
},
|
},
|
||||||
icon: Image.asset('assets/Back_attendance.png'),
|
icon: Image.asset('assets/Back_attendance.png'),
|
||||||
padding: const EdgeInsets.only(right: 20),
|
padding: const EdgeInsets.only(right: 20),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
title: const Text('Calendar'), // Title of the AppBar
|
title: const Text('Calendar'),
|
||||||
backgroundColor: Colors.transparent, // Transparent background for the AppBar
|
backgroundColor: Colors.transparent,
|
||||||
elevation: 0,
|
elevation: 0,
|
||||||
),
|
),
|
||||||
backgroundColor: Colors.transparent, // Transparent background for the Scaffold
|
backgroundColor: Colors.transparent,
|
||||||
drawer: const CommonDrawer(), // Custom drawer widget
|
drawer: const CommonDrawer(),
|
||||||
body: const SingleChildScrollView( // Scrollable view to accommodate the calendar and events list
|
body: Stack(
|
||||||
child: Column(
|
|
||||||
children: [
|
children: [
|
||||||
CalendarWidget(), // Calendar widget to show calendar dates
|
Column(children: [
|
||||||
EventsList(), // List of events associated with the selected date
|
const CalendarWidget(),
|
||||||
|
TaskList(taskProvider: value)
|
||||||
|
]),
|
||||||
|
if (taskProvider.isLoading)
|
||||||
|
Container(
|
||||||
|
height: MediaQuery.of(context).size.height,
|
||||||
|
width: MediaQuery.of(context).size.width,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: Colors.black.withOpacity(0.2),
|
||||||
|
),
|
||||||
|
child: const Center(
|
||||||
|
child: CircularProgressIndicator(),
|
||||||
|
),
|
||||||
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Calendar widget that shows the calendar dates
|
|
||||||
class CalendarWidget extends StatefulWidget {
|
class CalendarWidget extends StatefulWidget {
|
||||||
const CalendarWidget({super.key});
|
const CalendarWidget({super.key});
|
||||||
|
|
||||||
@ -56,117 +86,142 @@ class CalendarWidget extends StatefulWidget {
|
|||||||
class _CalendarWidgetState extends State<CalendarWidget> {
|
class _CalendarWidgetState extends State<CalendarWidget> {
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Card( // Card UI to display the calendar inside
|
return Card(
|
||||||
margin: const EdgeInsets.all(16), // Margin around the card
|
margin: const EdgeInsets.all(16),
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: const EdgeInsets.all(16), // Padding inside the card
|
padding: const EdgeInsets.all(16),
|
||||||
child: Column(
|
child: TableCalendar(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start, // Align items to the left
|
firstDay: DateTime.utc(1900, 5, 1),
|
||||||
children: [
|
lastDay: DateTime.utc(2900, 5, 1),
|
||||||
const Text(
|
focusedDay: _focusedDay,
|
||||||
'Calendar',
|
|
||||||
style: TextStyle(fontSize: 18, fontWeight: FontWeight.bold), // Calendar heading
|
|
||||||
),
|
|
||||||
const Text(
|
|
||||||
'Month/Year',
|
|
||||||
style: TextStyle(fontSize: 14, color: Colors.grey), // Display current month and year
|
|
||||||
),
|
|
||||||
const SizedBox(height: 10),
|
|
||||||
TableCalendar( // TableCalendar widget to show date selection
|
|
||||||
firstDay: DateTime.utc(1900, 5, 1), // Earliest selectable date
|
|
||||||
lastDay: DateTime.utc(2900, 5, 1), // Latest selectable date
|
|
||||||
focusedDay: _focusedDay, // Currently focused day
|
|
||||||
selectedDayPredicate: (day) {
|
selectedDayPredicate: (day) {
|
||||||
return isSameDay(_selectedDay, day); // Highlight selected day
|
return isSameDay(_selectedDay, day);
|
||||||
},
|
},
|
||||||
onDaySelected: (selectedDay, focusedDay) {
|
onDaySelected: (selectedDay, focusedDay) {
|
||||||
setState(() { // Update selected and focused days
|
setState(() {
|
||||||
_selectedDay = selectedDay;
|
_selectedDay = selectedDay;
|
||||||
_focusedDay = focusedDay;
|
_focusedDay = focusedDay;
|
||||||
|
context.read<TaskProvider>().getAllTaskByDate(_selectedDay);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
onPageChanged: (focusedDay) {
|
onPageChanged: (focusedDay) {
|
||||||
_focusedDay = focusedDay; // Change focused day when calendar page changes
|
_focusedDay = focusedDay;
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Widget to display a list of events
|
class TaskList extends StatefulWidget {
|
||||||
class EventsList extends StatelessWidget {
|
final TaskProvider taskProvider;
|
||||||
const EventsList({super.key});
|
|
||||||
|
const TaskList({super.key, required this.taskProvider});
|
||||||
|
|
||||||
|
@override
|
||||||
|
State<TaskList> createState() => _TaskListState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _TaskListState extends State<TaskList> {
|
||||||
|
@override
|
||||||
|
void initState() {
|
||||||
|
super.initState();
|
||||||
|
WidgetsBinding.instance.addPostFrameCallback((_) {
|
||||||
|
widget.taskProvider.getAllTaskByDate(_selectedDay);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return const Card( // Card UI for the event list
|
return (widget.taskProvider.taskModelList.isEmpty)
|
||||||
margin: EdgeInsets.all(16), // Margin around the card
|
? Container(
|
||||||
child: Padding(
|
alignment: Alignment.center,
|
||||||
padding: EdgeInsets.all(16), // Padding inside the card
|
child: const Text('No task found',
|
||||||
child: Column(
|
style: TextStyle(fontSize: 20, color: Colors.white)),
|
||||||
crossAxisAlignment: CrossAxisAlignment.start, // Align items to the left
|
)
|
||||||
children: [
|
: Expanded(
|
||||||
Text(
|
child: ListView.builder(
|
||||||
'Events List', // Heading for the events list
|
itemCount: widget.taskProvider.taskModelList.length,
|
||||||
style: TextStyle(fontSize: 18, fontWeight: FontWeight.bold),
|
itemBuilder: (context, index) {
|
||||||
),
|
return _taskView(
|
||||||
SizedBox(height: 10),
|
task: widget.taskProvider.taskModelList[index]);
|
||||||
// Display individual event items
|
},
|
||||||
EventItem(
|
|
||||||
date: '10-06-2024',
|
|
||||||
event: 'Meeting with Territory Manager',
|
|
||||||
),
|
|
||||||
SizedBox(height: 10),
|
|
||||||
EventItem(
|
|
||||||
date: '10-06-2024',
|
|
||||||
event: 'Sales Data Review',
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// Widget for displaying individual event items
|
Widget _customContainer({required Widget child}) {
|
||||||
class EventItem extends StatelessWidget {
|
return Padding(
|
||||||
final String date; // Event date
|
padding: const EdgeInsets.symmetric(horizontal: 16),
|
||||||
final String event; // Event description
|
child: Container(
|
||||||
|
width: double.infinity,
|
||||||
const EventItem({super.key, required this.date, required this.event});
|
padding: const EdgeInsets.all(12.0),
|
||||||
|
|
||||||
@override
|
|
||||||
Widget build(BuildContext context) {
|
|
||||||
return Container(
|
|
||||||
padding: const EdgeInsets.all(12), // Padding inside the event container
|
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: Colors.blue[50], // Light blue background for the event item
|
border: Border.all(color: Colors.white),
|
||||||
borderRadius: BorderRadius.circular(8), // Rounded corners for the container
|
color: const Color(0xffB4D1E5).withOpacity(0.8),
|
||||||
|
borderRadius: BorderRadius.circular(16.0),
|
||||||
),
|
),
|
||||||
child: Column(
|
child: child,
|
||||||
crossAxisAlignment: CrossAxisAlignment.start, // Align items to the left
|
|
||||||
children: [
|
|
||||||
Text('Date: $date'), // Display event date
|
|
||||||
Text(
|
|
||||||
'Event: $event', // Display event description
|
|
||||||
style: const TextStyle(fontWeight: FontWeight.bold),
|
|
||||||
),
|
|
||||||
const SizedBox(height: 8),
|
|
||||||
ElevatedButton( // Button to view event details
|
|
||||||
onPressed: () {
|
|
||||||
// Add view details functionality here
|
|
||||||
},
|
|
||||||
style: ElevatedButton.styleFrom(
|
|
||||||
foregroundColor: Colors.white, // Text color
|
|
||||||
backgroundColor: Colors.blue[800], // Button background color
|
|
||||||
),
|
|
||||||
child: const Text('VIEW DETAILS'), // Button label
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Widget _taskView({required TaskModel task}) {
|
||||||
|
final formattedDate = DateFormat('dd/MM/yyyy').format(task.taskDueDate);
|
||||||
|
return Column(
|
||||||
|
children: [
|
||||||
|
_customContainer(
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Text(
|
||||||
|
"Assigned to: ${task.taskAssignedTo.name}",
|
||||||
|
style: const TextStyle(
|
||||||
|
fontFamily: 'Anek',
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
const SizedBox(height: 5),
|
||||||
|
Text(
|
||||||
|
"Task: ${task.task}",
|
||||||
|
style: const TextStyle(
|
||||||
|
fontFamily: 'Anek',
|
||||||
|
),
|
||||||
|
),
|
||||||
|
const SizedBox(height: 5),
|
||||||
|
if (task.addedFor != null) ...{
|
||||||
|
task.addedFor == 'PrincipalDistributor'
|
||||||
|
? Text("PD: ${task.tradename}")
|
||||||
|
: Text("RD: ${task.tradename}"),
|
||||||
|
const SizedBox(height: 5),
|
||||||
|
},
|
||||||
|
Text(
|
||||||
|
'Status: ${task.taskStatus}',
|
||||||
|
style: const TextStyle(
|
||||||
|
fontFamily: 'Anek',
|
||||||
|
),
|
||||||
|
),
|
||||||
|
const SizedBox(height: 5),
|
||||||
|
if (task.note != null) ...{
|
||||||
|
Text(
|
||||||
|
'Note: ${task.note}',
|
||||||
|
style: const TextStyle(
|
||||||
|
fontFamily: 'Anek',
|
||||||
|
),
|
||||||
|
),
|
||||||
|
const SizedBox(height: 5),
|
||||||
|
},
|
||||||
|
Text(
|
||||||
|
'Deadline: $formattedDate',
|
||||||
|
style: const TextStyle(
|
||||||
|
fontFamily: 'Anek',
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
const SizedBox(height: 10),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
import 'package:cheminova/notification_services.dart';
|
import 'package:cheminova/notification_services.dart';
|
||||||
import 'package:cheminova/provider/home_provider.dart';
|
import 'package:cheminova/provider/home_provider.dart';
|
||||||
|
import 'package:cheminova/screens/Announcements_Screen.dart';
|
||||||
import 'package:cheminova/screens/Update_inventorytask_screen.dart';
|
import 'package:cheminova/screens/Update_inventorytask_screen.dart';
|
||||||
import 'package:cheminova/screens/calendar_screen.dart';
|
import 'package:cheminova/screens/calendar_screen.dart';
|
||||||
import 'package:cheminova/screens/daily_tasks_screen.dart';
|
import 'package:cheminova/screens/daily_tasks_screen.dart';
|
||||||
@ -215,6 +216,20 @@ class _HomePageState extends State<HomePage> {
|
|||||||
},
|
},
|
||||||
),
|
),
|
||||||
const SizedBox(height: 5),
|
const SizedBox(height: 5),
|
||||||
|
_buildCustomCard(
|
||||||
|
'Announcements',
|
||||||
|
"View Announcements",
|
||||||
|
screenWidth,
|
||||||
|
onTap: () {
|
||||||
|
Navigator.push(
|
||||||
|
context,
|
||||||
|
MaterialPageRoute(
|
||||||
|
builder: (context) => const AnnouncementsScreen(),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
const SizedBox(height: 5),
|
||||||
// Row containing cards for calendar and products manual
|
// Row containing cards for calendar and products manual
|
||||||
Row(
|
Row(
|
||||||
children: [
|
children: [
|
||||||
|
@ -6,16 +6,19 @@ class ApiUrls {
|
|||||||
static const String getPdUrl = 'kyc/get-pd';
|
static const String getPdUrl = 'kyc/get-pd';
|
||||||
static const String createCollectKycUrl = '${baseUrl}kyc/create';
|
static const String createCollectKycUrl = '${baseUrl}kyc/create';
|
||||||
static const String getProfileUrl = '${baseUrl}salescoordinator/my-profile';
|
static const String getProfileUrl = '${baseUrl}salescoordinator/my-profile';
|
||||||
static const String changePasswordUrl = '${baseUrl}salescoordinator/password/update';
|
static const String changePasswordUrl =
|
||||||
static const String forgotPasswordUrl = '${baseUrl}salescoordinator/forgot-password';
|
'${baseUrl}salescoordinator/password/update';
|
||||||
static const String leaveAttendance = '${baseUrl}v1/markleave/salescoordinator';
|
static const String forgotPasswordUrl =
|
||||||
|
'${baseUrl}salescoordinator/forgot-password';
|
||||||
|
static const String leaveAttendance =
|
||||||
|
'${baseUrl}v1/markleave/salescoordinator';
|
||||||
static const String logOutUrl = '${baseUrl}salescoordinator/logout';
|
static const String logOutUrl = '${baseUrl}salescoordinator/logout';
|
||||||
static const String rejectedApplication = '${baseUrl}kyc/getAllrejected';
|
static const String rejectedApplication = '${baseUrl}kyc/getAllrejected';
|
||||||
static const String notificationUrl = '${baseUrl}/get-notification-sc';
|
static const String notificationUrl = '${baseUrl}/get-notification-sc';
|
||||||
static const String fcmUrl = '${baseUrl}kyc/save-fcm-sc';
|
static const String fcmUrl = '${baseUrl}kyc/save-fcm-sc';
|
||||||
static const String getProducts = '${baseUrl}product/getAll/user';
|
static const String getProducts = '${baseUrl}product/getAll/user';
|
||||||
static const String getPdRdUrl = '${baseUrl}inventory/distributors-SC/';
|
static const String getPdRdUrl = '${baseUrl}inventory/distributors-SC/';
|
||||||
static const String submitProductUrl = '${baseUrl}inventory/add-SC';
|
static const String submitProductUrl = '${baseUrl}inventory/add';
|
||||||
static const String selectTaskUrl = '${baseUrl}task/tasks';
|
static const String selectTaskUrl = '${baseUrl}task/tasks';
|
||||||
static const String dailyTaskUrl = '${baseUrl}task/tasks/';
|
static const String dailyTaskUrl = '${baseUrl}task/tasks/';
|
||||||
static const String kycSelectTaskUrl = '${baseUrl}task/task/type/Collect KYC';
|
static const String kycSelectTaskUrl = '${baseUrl}task/task/type/Collect KYC';
|
||||||
@ -24,4 +27,6 @@ class ApiUrls {
|
|||||||
static const String salesTaskUrl = '${baseUrl}product/getAll/user/';
|
static const String salesTaskUrl = '${baseUrl}product/getAll/user/';
|
||||||
static const String postSalesTaskUrl = '${baseUrl}sales/add-SC';
|
static const String postSalesTaskUrl = '${baseUrl}sales/add-SC';
|
||||||
static const String submitVisitUrl = '${baseUrl}visit';
|
static const String submitVisitUrl = '${baseUrl}visit';
|
||||||
|
static const String allTaskByDate = '${baseUrl}task/alltask';
|
||||||
|
static const String announcementUrl = '${baseUrl}announcement/SCs';
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user