From 6a0bf5e10748d5f869401b530552afff24683aa5 Mon Sep 17 00:00:00 2001 From: usman-ghani564 Date: Sun, 31 Mar 2024 00:28:33 +0500 Subject: [PATCH 1/4] fix: new task created when editing task assignee --- src/pages/tasks/TaskAssigneeSelectorModal.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/tasks/TaskAssigneeSelectorModal.tsx b/src/pages/tasks/TaskAssigneeSelectorModal.tsx index 0a922321766e..a5721375926e 100644 --- a/src/pages/tasks/TaskAssigneeSelectorModal.tsx +++ b/src/pages/tasks/TaskAssigneeSelectorModal.tsx @@ -172,7 +172,7 @@ function TaskAssigneeSelectorModal({reports, task}: TaskAssigneeSelectorModalPro option?.login ?? '', option?.accountID ?? -1, report.reportID, - report, + null, // passing null as report because for editing task the report will be edit report page not the actual report where task was created OptionsListUtils.isCurrentUser({...option, accountID: option?.accountID ?? -1, login: option?.login ?? ''}), ); From f48db39dc9ade03b19b1988f7bfd88277d099e2f Mon Sep 17 00:00:00 2001 From: usman-ghani564 Date: Sun, 31 Mar 2024 00:42:24 +0500 Subject: [PATCH 2/4] change code comment --- src/pages/tasks/TaskAssigneeSelectorModal.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/tasks/TaskAssigneeSelectorModal.tsx b/src/pages/tasks/TaskAssigneeSelectorModal.tsx index a5721375926e..87dc43a639b4 100644 --- a/src/pages/tasks/TaskAssigneeSelectorModal.tsx +++ b/src/pages/tasks/TaskAssigneeSelectorModal.tsx @@ -172,7 +172,7 @@ function TaskAssigneeSelectorModal({reports, task}: TaskAssigneeSelectorModalPro option?.login ?? '', option?.accountID ?? -1, report.reportID, - null, // passing null as report because for editing task the report will be edit report page not the actual report where task was created + null, // passing null as report because for editing task the report will be task details report page not the actual report where task was created OptionsListUtils.isCurrentUser({...option, accountID: option?.accountID ?? -1, login: option?.login ?? ''}), ); From 9e9a87670931b225868681affd63ce8e43fdd32e Mon Sep 17 00:00:00 2001 From: usman-ghani564 Date: Tue, 9 Apr 2024 09:27:38 +0500 Subject: [PATCH 3/4] update null report to null --- src/pages/tasks/TaskAssigneeSelectorModal.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/tasks/TaskAssigneeSelectorModal.tsx b/src/pages/tasks/TaskAssigneeSelectorModal.tsx index 5bca4cc10591..0080bb7895cd 100644 --- a/src/pages/tasks/TaskAssigneeSelectorModal.tsx +++ b/src/pages/tasks/TaskAssigneeSelectorModal.tsx @@ -185,7 +185,7 @@ function TaskAssigneeSelectorModal({reports, task}: TaskAssigneeSelectorModalPro option?.login ?? '', option.accountID, task?.shareDestination ?? '', - report, + null, //passing null as report is null in this condition OptionsListUtils.isCurrentUser({...option, accountID: option?.accountID ?? -1, login: option?.login ?? undefined}), ); Navigation.goBack(ROUTES.NEW_TASK); From 787c5686010f4f8b5327448a627bcf39663b2736 Mon Sep 17 00:00:00 2001 From: usman-ghani564 Date: Tue, 9 Apr 2024 09:38:26 +0500 Subject: [PATCH 4/4] fix lint --- src/pages/tasks/TaskAssigneeSelectorModal.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/tasks/TaskAssigneeSelectorModal.tsx b/src/pages/tasks/TaskAssigneeSelectorModal.tsx index 0080bb7895cd..4ebabbce350e 100644 --- a/src/pages/tasks/TaskAssigneeSelectorModal.tsx +++ b/src/pages/tasks/TaskAssigneeSelectorModal.tsx @@ -185,7 +185,7 @@ function TaskAssigneeSelectorModal({reports, task}: TaskAssigneeSelectorModalPro option?.login ?? '', option.accountID, task?.shareDestination ?? '', - null, //passing null as report is null in this condition + null, // passing null as report is null in this condition OptionsListUtils.isCurrentUser({...option, accountID: option?.accountID ?? -1, login: option?.login ?? undefined}), ); Navigation.goBack(ROUTES.NEW_TASK);