Skip to content

Commit

Permalink
email column
Browse files Browse the repository at this point in the history
  • Loading branch information
armintalaie committed Sep 3, 2024
1 parent 3c928a2 commit 2023452
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 7 deletions.
6 changes: 6 additions & 0 deletions src/app/portal/admin/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,12 @@ export async function getAllFormDetails(
const formConfig = form.config as unknown as Record<string, any>;

if (formType === "recruitment") {
formFields["email"] = {
label: "Email",
id: "email",
type: "email",
};

if (formConfig["application"]) {
const subFields = formConfig["application"]["subfields"] || [];
subFields.forEach((field: any) => {
Expand Down
6 changes: 4 additions & 2 deletions src/app/portal/admin/forms/[id]/submissions/columns.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -242,16 +242,18 @@ export function createColumns<TData>(
return [
{
accessorKey: "popover",
header: "Applicant",
header: "",
enableColumnFilter: false,
size: 100,
maxSize: 100,
cell: ({ row }) => {
return (
<button
onClick={() => {
setAndOpen({ applicant: row });
}}
className={
"text-lp-300 font-bold rounded-lg p-4 py-7 w-full flex flex-1 border border-transparent hover:border-background-500 items-center justify-center gap-2 "
"text-lp-300 font-bold rounded-lg p-4 py-7 w-fit flex flex-1 border border-transparent hover:border-background-500 items-center justify-center gap-2 "
}
>
View
Expand Down
12 changes: 7 additions & 5 deletions src/app/portal/admin/forms/[id]/submissions/data-table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ const getCommonPinningStyles = (column: Column<any>): CSSProperties => {
position: isPinned ? "sticky" : "relative",
width: column.getSize() ? column.getSize() : "300px",
// zIndex: isPinned ? 1 : 0,
maxWidth: column.getSize() ? column.getSize() : "300px",
};
};

Expand Down Expand Up @@ -85,12 +86,15 @@ export function DataTable<TData, TValue>({
columnVisibility,
sorting,
columnOrder: [
"popover",
"status",
"level",
"reviewer_id",
"interviewer_id",
"notes",
"popover",
// "notes",
"email",
"student email",
"role",
],
},
});
Expand Down Expand Up @@ -185,9 +189,7 @@ export function DataTable<TData, TValue>({
{row.getVisibleCells().map((cell) => (
<td
key={cell.id}
className={
" h-full text-xs min-h-24 overflow-hidden "
}
className={" h-full text-xs overflow-hidden "}
style={{ ...getCommonPinningStyles(cell.column) }}
>
{flexRender(
Expand Down

0 comments on commit 2023452

Please sign in to comment.