Skip to content

Commit

Permalink
fixing things and projects view and archive
Browse files Browse the repository at this point in the history
version-patch
  • Loading branch information
trueberryless committed Jul 6, 2024
1 parent 06105d4 commit 781cdcc
Show file tree
Hide file tree
Showing 8 changed files with 200 additions and 52 deletions.
46 changes: 23 additions & 23 deletions src/app/test_data.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"description": "This is the first project.",
"createdAt": "2023-05-01T10:00:00.000Z",
"lastUpdatedAt": "2024-06-30T12:00:00.000Z",
"deletedAt": null,
"archivedAt": null,
"status": "todo",
"priority": "high",
"tasks": [
Expand Down Expand Up @@ -53,7 +53,7 @@
"description": "This is the second project.",
"createdAt": "2023-06-01T10:00:00.000Z",
"lastUpdatedAt": "2024-06-30T12:00:00.000Z",
"deletedAt": "2024-06-30T12:00:00.000Z",
"archivedAt": "2024-06-30T12:00:00.000Z",
"status": "in progress",
"priority": "low",
"tasks": [
Expand Down Expand Up @@ -97,7 +97,7 @@
"description": "This is the third project.",
"createdAt": "2023-07-01T10:00:00.000Z",
"lastUpdatedAt": "2024-07-01T12:00:00.000Z",
"deletedAt": null,
"archivedAt": null,
"status": "backlog",
"priority": "low",
"tasks": [
Expand Down Expand Up @@ -141,7 +141,7 @@
"description": "This is the third project.",
"createdAt": "2023-07-01T10:00:00.000Z",
"lastUpdatedAt": "2024-07-01T12:00:00.000Z",
"deletedAt": null,
"archivedAt": null,
"status": "backlog",
"priority": "low",
"tasks": [
Expand Down Expand Up @@ -185,7 +185,7 @@
"description": "This is the third project.",
"createdAt": "2023-07-01T10:00:00.000Z",
"lastUpdatedAt": "2024-07-01T12:00:00.000Z",
"deletedAt": null,
"archivedAt": null,
"status": "backlog",
"priority": "low",
"tasks": [
Expand Down Expand Up @@ -229,7 +229,7 @@
"description": "This is the third project.",
"createdAt": "2023-07-01T10:00:00.000Z",
"lastUpdatedAt": "2024-07-01T12:00:00.000Z",
"deletedAt": null,
"archivedAt": null,
"status": "backlog",
"priority": "low",
"tasks": [
Expand Down Expand Up @@ -273,7 +273,7 @@
"description": "This is the third project.",
"createdAt": "2023-07-01T10:00:00.000Z",
"lastUpdatedAt": "2024-07-01T12:00:00.000Z",
"deletedAt": null,
"archivedAt": null,
"status": "backlog",
"priority": "low",
"tasks": [
Expand Down Expand Up @@ -317,7 +317,7 @@
"description": "This is the third project.",
"createdAt": "2023-07-01T10:00:00.000Z",
"lastUpdatedAt": "2024-07-01T12:00:00.000Z",
"deletedAt": null,
"archivedAt": null,
"status": "backlog",
"priority": "low",
"tasks": [
Expand Down Expand Up @@ -361,7 +361,7 @@
"description": "This is the third project.",
"createdAt": "2023-07-01T10:00:00.000Z",
"lastUpdatedAt": "2024-07-01T12:00:00.000Z",
"deletedAt": null,
"archivedAt": null,
"status": "backlog",
"priority": "low",
"tasks": [
Expand Down Expand Up @@ -405,7 +405,7 @@
"description": "This is the third project.",
"createdAt": "2023-07-01T10:00:00.000Z",
"lastUpdatedAt": "2024-07-01T12:00:00.000Z",
"deletedAt": null,
"archivedAt": null,
"status": "backlog",
"priority": "low",
"tasks": [
Expand Down Expand Up @@ -449,7 +449,7 @@
"description": "This is the third project.",
"createdAt": "2023-07-01T10:00:00.000Z",
"lastUpdatedAt": "2024-07-01T12:00:00.000Z",
"deletedAt": null,
"archivedAt": null,
"status": "backlog",
"priority": "low",
"tasks": [
Expand Down Expand Up @@ -493,7 +493,7 @@
"description": "This is the third project.",
"createdAt": "2023-07-01T10:00:00.000Z",
"lastUpdatedAt": "2024-07-01T12:00:00.000Z",
"deletedAt": null,
"archivedAt": null,
"status": "backlog",
"priority": "low",
"tasks": [
Expand Down Expand Up @@ -537,7 +537,7 @@
"description": "This is the third project.",
"createdAt": "2023-07-01T10:00:00.000Z",
"lastUpdatedAt": "2024-07-01T12:00:00.000Z",
"deletedAt": null,
"archivedAt": null,
"status": "backlog",
"priority": "low",
"tasks": [
Expand Down Expand Up @@ -581,7 +581,7 @@
"description": "This is the third project.",
"createdAt": "2023-07-01T10:00:00.000Z",
"lastUpdatedAt": "2024-07-01T12:00:00.000Z",
"deletedAt": null,
"archivedAt": null,
"status": "backlog",
"priority": "low",
"tasks": [
Expand Down Expand Up @@ -625,7 +625,7 @@
"description": "This is the third project.",
"createdAt": "2023-07-01T10:00:00.000Z",
"lastUpdatedAt": "2024-07-01T12:00:00.000Z",
"deletedAt": null,
"archivedAt": null,
"status": "backlog",
"priority": "low",
"tasks": [
Expand Down Expand Up @@ -669,7 +669,7 @@
"description": "This is the third project.",
"createdAt": "2023-07-01T10:00:00.000Z",
"lastUpdatedAt": "2024-07-01T12:00:00.000Z",
"deletedAt": null,
"archivedAt": null,
"status": "backlog",
"priority": "low",
"tasks": [
Expand Down Expand Up @@ -713,7 +713,7 @@
"description": "This is the third project.",
"createdAt": "2023-07-01T10:00:00.000Z",
"lastUpdatedAt": "2024-07-01T12:00:00.000Z",
"deletedAt": null,
"archivedAt": null,
"status": "backlog",
"priority": "low",
"tasks": [
Expand Down Expand Up @@ -757,7 +757,7 @@
"description": "This is the third project.",
"createdAt": "2023-07-01T10:00:00.000Z",
"lastUpdatedAt": "2024-07-01T12:00:00.000Z",
"deletedAt": null,
"archivedAt": null,
"status": "backlog",
"priority": "low",
"tasks": [
Expand Down Expand Up @@ -801,7 +801,7 @@
"description": "This is the third project.",
"createdAt": "2023-07-01T10:00:00.000Z",
"lastUpdatedAt": "2024-07-01T12:00:00.000Z",
"deletedAt": null,
"archivedAt": null,
"status": "backlog",
"priority": "low",
"tasks": [
Expand Down Expand Up @@ -845,7 +845,7 @@
"description": "This is the third project.",
"createdAt": "2023-07-01T10:00:00.000Z",
"lastUpdatedAt": "2024-07-01T12:00:00.000Z",
"deletedAt": null,
"archivedAt": null,
"status": "backlog",
"priority": "low",
"tasks": [
Expand Down Expand Up @@ -889,7 +889,7 @@
"description": "This is the third project.",
"createdAt": "2023-07-01T10:00:00.000Z",
"lastUpdatedAt": "2024-07-01T12:00:00.000Z",
"deletedAt": null,
"archivedAt": null,
"status": "backlog",
"priority": "low",
"tasks": [
Expand Down Expand Up @@ -933,7 +933,7 @@
"description": "This is the third project.",
"createdAt": "2023-07-01T10:00:00.000Z",
"lastUpdatedAt": "2024-07-01T12:00:00.000Z",
"deletedAt": null,
"archivedAt": null,
"status": "backlog",
"priority": "low",
"tasks": [
Expand Down Expand Up @@ -977,7 +977,7 @@
"description": "This is the third project.",
"createdAt": "2023-07-01T10:00:00.000Z",
"lastUpdatedAt": "2024-07-01T12:00:00.000Z",
"deletedAt": null,
"archivedAt": null,
"status": "backlog",
"priority": "low",
"tasks": [
Expand Down
6 changes: 3 additions & 3 deletions src/components/projects/columns.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,10 @@ export const columnsXl: ColumnDef<Project>[] = [
},
},
{
accessorKey: "deletedAt",
header: ({ column }) => <DataTableColumnHeader column={column} title="Deleted At" />,
accessorKey: "archivedAt",
header: ({ column }) => <DataTableColumnHeader column={column} title="Archived At" />,
cell: ({ row }) => {
const dateValue = row.getValue("deletedAt");
const dateValue = row.getValue("archivedAt");
const dateString = String(dateValue);
const parsedDate = Date.parse(dateString);
let formattedDate = "";
Expand Down
2 changes: 1 addition & 1 deletion src/components/projects/data-table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ export function DataTable<TData extends TEntity, TValue>({

function handleRowClick(id: number): void {
if (clickableRows) {
router.push(`/project/${id}`);
router.push(`/projects/${id}`);
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/models/project.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export default interface Project {
description?: string;
createdAt?: Date;
lastUpdatedAt?: Date;
deletedAt?: Date | null;
archivedAt?: Date | null;

status: Status;
priority: Priority;
Expand Down
Loading

0 comments on commit 781cdcc

Please sign in to comment.