Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hotfix taskedit #1696

Open
wants to merge 12 commits into
base: dev
Choose a base branch
from
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "mulearnfrontend",
"private": true,
"version": "0.0.5",
"version": "0.0.6",
"type": "module",
"scripts": {
"dev": "vite --host",
Expand Down
12 changes: 9 additions & 3 deletions src/modules/Dashboard/modules/Tasks/TaskApis.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,15 @@ export const editTask = async (
bonus_karma?: string
) => {
try {
const formattedBonusTime = (bonus_time && bonus_time != "")
? new Date(bonus_time).toISOString() // Convert bonus_time to ISO format
: null;
let formattedBonusTime: string | null;
try {
formattedBonusTime = (bonus_time && bonus_time !== "")
? new Date(bonus_time).toISOString() // Convert bonus_time to ISO format
: null;
} catch (error) {
console.error("Error converting bonus_time to ISO format:", error);
formattedBonusTime = null; // Fallback value in case of an error
}

const response = await privateGateway.put(
dashboardRoutes.getTasksData + id,
Expand Down