Merge branch 'main' of https://git.cnapp.co.in/gitadmin/api
This commit is contained in:
commit
9c31ccdd7c
BIN
public/temp/tmp-1-1725944572643
Normal file
BIN
public/temp/tmp-1-1725944572643
Normal file
Binary file not shown.
After Width: | Height: | Size: 138 KiB |
BIN
public/temp/tmp-2-1725944572654
Normal file
BIN
public/temp/tmp-2-1725944572654
Normal file
Binary file not shown.
After Width: | Height: | Size: 138 KiB |
BIN
public/temp/tmp-3-1725944572665
Normal file
BIN
public/temp/tmp-3-1725944572665
Normal file
Binary file not shown.
After Width: | Height: | Size: 138 KiB |
BIN
public/temp/tmp-4-1725944572671
Normal file
BIN
public/temp/tmp-4-1725944572671
Normal file
Binary file not shown.
After Width: | Height: | Size: 138 KiB |
BIN
public/temp/tmp-5-1725944572681
Normal file
BIN
public/temp/tmp-5-1725944572681
Normal file
Binary file not shown.
After Width: | Height: | Size: 138 KiB |
BIN
public/temp/tmp-6-1725944572689
Normal file
BIN
public/temp/tmp-6-1725944572689
Normal file
Binary file not shown.
After Width: | Height: | Size: 138 KiB |
@ -54,7 +54,7 @@ const salescoordinatorSchema = new mongoose.Schema(
|
||||
},
|
||||
fcm_token: {
|
||||
type: String,
|
||||
unique: true,
|
||||
default: null,
|
||||
},
|
||||
mappedby: {
|
||||
type: mongoose.Schema.Types.ObjectId,
|
||||
|
@ -138,6 +138,7 @@ export const assignTask = async (req, res) => {
|
||||
|
||||
export const getTasksByStatus = async (req, res) => {
|
||||
try {
|
||||
await updateOverdueTasks();
|
||||
const { status } = req.params; // This should be "New", "Pending", or "Completed"
|
||||
|
||||
// Validate the provided status
|
||||
@ -167,6 +168,7 @@ export const getTasksByStatus = async (req, res) => {
|
||||
};
|
||||
export const getAllTasksByStatus = async (req, res) => {
|
||||
try {
|
||||
await updateOverdueTasks();
|
||||
const { status } = req.params; // This should be "New", "Pending", or "Completed"
|
||||
|
||||
// Validate the provided status
|
||||
@ -201,6 +203,7 @@ export const getAllTasksByStatus = async (req, res) => {
|
||||
};
|
||||
export const getTasksbytask = async (req, res) => {
|
||||
try {
|
||||
await updateOverdueTasks();
|
||||
const { task } = req.params;
|
||||
|
||||
// Validate the provided status
|
||||
|
@ -54,7 +54,7 @@ const territorymanagerSchema = new mongoose.Schema(
|
||||
},
|
||||
fcm_token: {
|
||||
type: String,
|
||||
unique: true,
|
||||
default: null,
|
||||
},
|
||||
},
|
||||
{ timestamps: true }
|
||||
|
@ -1169,7 +1169,7 @@ export const mappedbyTM = catchAsyncErrors(async (req, res, next) => {
|
||||
export const mappedbySC = catchAsyncErrors(async (req, res, next) => {
|
||||
const { id } = req.params; // SalesCoOrdinator ID from URL parameters
|
||||
const { mappedbySC } = req.body; // TerritoryManager ID from request body
|
||||
// console.log(id, mappedby);
|
||||
// console.log(id, mappedbySC);
|
||||
// Validate that the TerritoryManager ID is provided
|
||||
if (!mappedbySC) {
|
||||
return res.status(400).json({
|
||||
|
Loading…
Reference in New Issue
Block a user