small fixes
This commit is contained in:
@@ -19,7 +19,7 @@ export default function RequestedBy({ prefix, name, profileImage }: Props) {
|
|||||||
<div className="flex items-center space-x-2">
|
<div className="flex items-center space-x-2">
|
||||||
<p className="text-xs font-medium text-gray-800">{prefix} {name}</p>
|
<p className="text-xs font-medium text-gray-800">{prefix} {name}</p>
|
||||||
<Image
|
<Image
|
||||||
src={profileImage}
|
src={profileImage ? profileImage : "/defaultAvatar.png"}
|
||||||
alt={name}
|
alt={name}
|
||||||
width={24}
|
width={24}
|
||||||
height={24}
|
height={24}
|
||||||
|
|||||||
@@ -13,11 +13,11 @@ export default function UserWithProfilePic({ prefix, name, profileImage, textSiz
|
|||||||
<div className="flex items-center space-x-2">
|
<div className="flex items-center space-x-2">
|
||||||
<p className={textClassName}>{prefix} {name}</p>
|
<p className={textClassName}>{prefix} {name}</p>
|
||||||
<Image
|
<Image
|
||||||
src={profileImage}
|
src={profileImage ? profileImage : "/defaultAvatar.png"}
|
||||||
alt={name}
|
alt={name}
|
||||||
width={24}
|
width={24}
|
||||||
height={24}
|
height={24}
|
||||||
className="rounded-full"
|
className="rounded-full h-auto"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
{
|
{
|
||||||
"id": "kajhfakscbka-asacaca-acawesae",
|
"id": "kajhfakscbka-asacaca-acawesae",
|
||||||
"name": "English Exam 1st Quarter 2025",
|
"name": "English Exam 1st Quarter 2025",
|
||||||
"entityId": "ae64d98e-18e4-4978-b600-c542a5b43c2d",
|
"entityId": "64a92896-fa8c-4908-95f3-23ffe05560c5",
|
||||||
"modules": [
|
"modules": [
|
||||||
"reading",
|
"reading",
|
||||||
"writing"
|
"writing"
|
||||||
@@ -15,13 +15,13 @@
|
|||||||
"stepType": "form-intake",
|
"stepType": "form-intake",
|
||||||
"stepNumber": 1,
|
"stepNumber": 1,
|
||||||
"completed": true,
|
"completed": true,
|
||||||
"completedBy": "231c84b2-a65a-49a9-803c-c664d84b13e0",
|
"completedBy": "5fZibjknlJdfIZVndlV2FIdamtn1",
|
||||||
"completedDate": 1737712243906,
|
"completedDate": 1737712243906,
|
||||||
"firstStep": true,
|
"firstStep": true,
|
||||||
"assignees": [
|
"assignees": [
|
||||||
"fd5fce42-4bcc-4150-a143-b484e750b265",
|
"5fZibjknlJdfIZVndlV2FIdamtn1",
|
||||||
"231c84b2-a65a-49a9-803c-c664d84b13e0",
|
"50jqJuESQNX0Qas64B5JZBQTIiq1",
|
||||||
"c5fc1514-1a94-4f8c-a046-a62099097a50"
|
"2rtgJKmBXfWFzrtG8AjFgyrGBcp1"
|
||||||
],
|
],
|
||||||
"comments": "This is a random comment\nThis is a random comment\nThis is a random comment\nThis is a random comment\nThis is a random comment\n"
|
"comments": "This is a random comment\nThis is a random comment\nThis is a random comment\nThis is a random comment\nThis is a random comment\n"
|
||||||
},
|
},
|
||||||
@@ -29,12 +29,12 @@
|
|||||||
"stepType": "approval-by",
|
"stepType": "approval-by",
|
||||||
"stepNumber": 2,
|
"stepNumber": 2,
|
||||||
"completed": true,
|
"completed": true,
|
||||||
"completedBy": "rTh9yz6Z1WOidHlVOSGInlpoxrk1",
|
"completedBy": "50jqJuESQNX0Qas64B5JZBQTIiq1",
|
||||||
"completedDate": 1737712243906,
|
"completedDate": 1737712243906,
|
||||||
"assignees": [
|
"assignees": [
|
||||||
"fd5fce42-4bcc-4150-a143-b484e750b265",
|
"5fZibjknlJdfIZVndlV2FIdamtn1",
|
||||||
"rTh9yz6Z1WOidHlVOSGInlpoxrk1",
|
"50jqJuESQNX0Qas64B5JZBQTIiq1",
|
||||||
"c5fc1514-1a94-4f8c-a046-a62099097a50"
|
"2rtgJKmBXfWFzrtG8AjFgyrGBcp1"
|
||||||
],
|
],
|
||||||
"comments": "This is a random comment"
|
"comments": "This is a random comment"
|
||||||
},
|
},
|
||||||
@@ -43,9 +43,9 @@
|
|||||||
"stepNumber": 3,
|
"stepNumber": 3,
|
||||||
"completed": false,
|
"completed": false,
|
||||||
"assignees": [
|
"assignees": [
|
||||||
"fd5fce42-4bcc-4150-a143-b484e750b265",
|
"5fZibjknlJdfIZVndlV2FIdamtn1",
|
||||||
"231c84b2-a65a-49a9-803c-c664d84b13e0",
|
"50jqJuESQNX0Qas64B5JZBQTIiq1",
|
||||||
"c5fc1514-1a94-4f8c-a046-a62099097a50"
|
"2rtgJKmBXfWFzrtG8AjFgyrGBcp1"
|
||||||
],
|
],
|
||||||
"comments": "This is a random comment"
|
"comments": "This is a random comment"
|
||||||
},
|
},
|
||||||
@@ -54,7 +54,7 @@
|
|||||||
"stepNumber": 4,
|
"stepNumber": 4,
|
||||||
"completed": false,
|
"completed": false,
|
||||||
"assignees": [
|
"assignees": [
|
||||||
"fd5fce42-4bcc-4150-a143-b484e750b265"
|
"50jqJuESQNX0Qas64B5JZBQTIiq1"
|
||||||
],
|
],
|
||||||
"comments": "This is a random comment"
|
"comments": "This is a random comment"
|
||||||
},
|
},
|
||||||
@@ -64,8 +64,8 @@
|
|||||||
"completed": false,
|
"completed": false,
|
||||||
"finalStep": true,
|
"finalStep": true,
|
||||||
"assignees": [
|
"assignees": [
|
||||||
"rTh9yz6Z1WOidHlVOSGInlpoxrk1",
|
"50jqJuESQNX0Qas64B5JZBQTIiq1",
|
||||||
"c5fc1514-1a94-4f8c-a046-a62099097a50"
|
"2rtgJKmBXfWFzrtG8AjFgyrGBcp1"
|
||||||
],
|
],
|
||||||
"comments": "This is a random comment"
|
"comments": "This is a random comment"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -234,7 +234,7 @@ export default function Home({ user, workflow, workflowAssignees, workflowReques
|
|||||||
<span key={user.id}>
|
<span key={user.id}>
|
||||||
<UserWithProfilePic
|
<UserWithProfilePic
|
||||||
textSize="text-sm"
|
textSize="text-sm"
|
||||||
prefix={getUserTypeLabelShort(user.type)}
|
prefix={`- ${getUserTypeLabelShort(user.type)}`}
|
||||||
name={user.name}
|
name={user.name}
|
||||||
profileImage={user.profilePicture}
|
profileImage={user.profilePicture}
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -17,15 +17,15 @@ import clsx from "clsx";
|
|||||||
import { withIronSessionSsr } from "iron-session/next";
|
import { withIronSessionSsr } from "iron-session/next";
|
||||||
import Head from "next/head";
|
import Head from "next/head";
|
||||||
import Link from "next/link";
|
import Link from "next/link";
|
||||||
import { ChangeEvent, useEffect, useState } from "react";
|
import { useEffect, useState } from "react";
|
||||||
import { BsTrash } from "react-icons/bs";
|
import { BsTrash } from "react-icons/bs";
|
||||||
import { FaRegEdit } from "react-icons/fa";
|
import { FaRegEdit } from "react-icons/fa";
|
||||||
import { IoIosAddCircleOutline } from "react-icons/io";
|
import { IoIosAddCircleOutline } from "react-icons/io";
|
||||||
import { toast, ToastContainer } from "react-toastify";
|
import { toast, ToastContainer } from "react-toastify";
|
||||||
|
|
||||||
import approvalWorkflowsData from '../../demo/approval_workflows.json'; // to test locally
|
|
||||||
import { FaRegClone } from "react-icons/fa6";
|
|
||||||
import Input from "@/components/Low/Input";
|
import Input from "@/components/Low/Input";
|
||||||
|
import { FaRegClone } from "react-icons/fa6";
|
||||||
|
import approvalWorkflowsData from '../../demo/approval_workflows.json'; // to test locally
|
||||||
|
|
||||||
const columnHelper = createColumnHelper<ApprovalWorkflow>();
|
const columnHelper = createColumnHelper<ApprovalWorkflow>();
|
||||||
|
|
||||||
@@ -362,7 +362,7 @@ export default function ApprovalWorkflows({ user, workflows, workflowsAssignees,
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="px-6 pb-4 bg-purple-100 rounded-2xl">
|
<div className="px-6 pb-4 bg-mti-purple-ultralight rounded-2xl border-2 border-mti-purple-light border-opacity-40">
|
||||||
<table
|
<table
|
||||||
className="w-full table-auto border-separate border-spacing-y-2"
|
className="w-full table-auto border-separate border-spacing-y-2"
|
||||||
style={{ tableLayout: "auto" }}
|
style={{ tableLayout: "auto" }}
|
||||||
@@ -371,7 +371,7 @@ export default function ApprovalWorkflows({ user, workflows, workflowsAssignees,
|
|||||||
{table.getHeaderGroups().map((headerGroup) => (
|
{table.getHeaderGroups().map((headerGroup) => (
|
||||||
<tr key={headerGroup.id}>
|
<tr key={headerGroup.id}>
|
||||||
{headerGroup.headers.map((header) => (
|
{headerGroup.headers.map((header) => (
|
||||||
<th key={header.id} className="px-3 py-2 text-left text-purple-900">
|
<th key={header.id} className="px-3 py-2 text-left text-mti-purple-ultradark">
|
||||||
{header.isPlaceholder
|
{header.isPlaceholder
|
||||||
? null
|
? null
|
||||||
: flexRender(
|
: flexRender(
|
||||||
@@ -389,12 +389,12 @@ export default function ApprovalWorkflows({ user, workflows, workflowsAssignees,
|
|||||||
key={row.id}
|
key={row.id}
|
||||||
onClick={() => window.location.href = `/approval-workflows/${row.original.id}`}
|
onClick={() => window.location.href = `/approval-workflows/${row.original.id}`}
|
||||||
style={{ cursor: "pointer" }}
|
style={{ cursor: "pointer" }}
|
||||||
className="hover:bg-purple-100"
|
className="bg-purple-50"
|
||||||
>
|
>
|
||||||
{row.getVisibleCells().map((cell, cellIndex) => {
|
{row.getVisibleCells().map((cell, cellIndex) => {
|
||||||
const lastCellIndex = row.getVisibleCells().length - 1;
|
const lastCellIndex = row.getVisibleCells().length - 1;
|
||||||
|
|
||||||
let cellClasses = "pl-3 pr-4 py-2 bg-purple-50 border-y-2 border-purple-300";
|
let cellClasses = "pl-3 pr-4 py-2 border-y-2 border-mti-purple-light border-opacity-60";
|
||||||
if (cellIndex === 0) {
|
if (cellIndex === 0) {
|
||||||
cellClasses += " border-l-2 rounded-l-2xl";
|
cellClasses += " border-l-2 rounded-l-2xl";
|
||||||
}
|
}
|
||||||
@@ -414,10 +414,6 @@ export default function ApprovalWorkflows({ user, workflows, workflowsAssignees,
|
|||||||
|
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</Layout>
|
</Layout>
|
||||||
)}
|
)}
|
||||||
</>
|
</>
|
||||||
|
|||||||
Reference in New Issue
Block a user