isArchive and event of wall item modified

This commit is contained in:
2025-06-12 09:44:49 +05:30
parent 762f4f82af
commit dead851b1a
2 changed files with 139 additions and 102 deletions

View File

@@ -60,12 +60,12 @@ export const setWallItems = async (
);
if (!LivingProject) return { status: "Project not found" };
const findvalue = await wallItemModel(organization).findOne({
modelUuid: modelUuid,
modelUuid: modelUuid,isArchive:false
});
if (findvalue) {
const updatevalue = await wallItemModel(organization).findOneAndUpdate(
{ modelUuid: modelUuid, projectId: projectId },
{ modelUuid: modelUuid, projectId: projectId,isArchive:false },
{
modelName,
position,
@@ -96,7 +96,8 @@ export const setWallItems = async (
});
console.log("newValue: ", newValue);
return {
status: "wall Item created successfully",
// status: "wall Item created successfully",
status: "Success",
data: newValue,
};
}
@@ -124,7 +125,7 @@ export const getWallItems = async (data: IWallGet) => {
);
if (!LivingProject) return { status: "Project not found" };
const findValue = await wallItemModel(organization).find({
projectId: projectId,
projectId: projectId,isArchive:false
});
if (!findValue) {
return {
@@ -165,7 +166,7 @@ export const deleteWallItems = async (
const findValue = await wallItemModel(organization).findOneAndDelete({
modelUuid: modelUuid,
modelName: modelName,
projectId: projectId,
projectId: projectId,isArchive:false
});
if (!findValue) {
return {