{formattedDetailType}:
-
- {isGitHubLink && value ? (
-
- {isGitHubLink ? `${extractRepoName(value)}` : value}
-
- ) : isTimeDetail ? (
-
- {tooltipActive
- ? formatDate(value)
- : getRelativeTime(value)}
-
- ) : (
- renderedValue
- )}
-
+ {isEditing && isUserAuthorized ? (
+
setNewEndOnDate(e.target.value)}
+ onBlur={handleEndsOnBlur}
+ value={finalDateValue}
+ className={styles.inputField}
+ />
+ ) : (
+
+ )}
{detailType === ENDS_ON && url && (
void;
- handleBlurOfEndsOn: () => void;
+ endsOn: number | null;
isExtensionRequestPending: boolean;
taskId: string;
+ setEditedTaskDetails: React.Dispatch>;
}
export const TaskDates: React.FC = ({
isEditing,
- isUserAuthorized,
startedOn,
endsOn,
- newEndOnDate,
- setNewEndOnDate,
- handleBlurOfEndsOn,
isExtensionRequestPending,
taskId,
+ setEditedTaskDetails,
}) => {
const formattedEndsOn = endsOn ? convertTimeStamp(endsOn) : 'TBD';
+ const url = isExtensionRequestPending
+ ? `${TASK_EXTENSION_REQUEST_URL}?&q=${encodeURIComponent(
+ `taskId:${taskId},status:PENDING`
+ )}`
+ : null;
return (
<>
@@ -36,30 +36,13 @@ export const TaskDates: React.FC = ({