Skip to content

Commit

Permalink
Merge branch 'staging' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
teguhbayu authored Sep 18, 2024
2 parents a835be7 + 7a1331c commit f3307d3
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 11 deletions.
24 changes: 14 additions & 10 deletions src/app/(admin)/admin/tim/[id]/components/ProfileTim.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,14 @@ function TimLayout({ tim }: Readonly<{ tim: TimWithRelations }>) {
const [official] = useState(
tim.anggotas.find((value) => value.posisi === "OFFICIAL")
);

const [cc1] = useState(
tim.anggotas.find((value) => value.posisi === "CERDAS_CERMAT1")
);
const [cc2] = useState(
tim.anggotas.find((value) => value.posisi === "CERDAS_CERMAT2")
);

const tim_id = tim.id;

return (
Expand Down Expand Up @@ -82,23 +90,19 @@ function TimLayout({ tim }: Readonly<{ tim: TimWithRelations }>) {
<AnggotaCardsWrapper>
<AnggotaCard
href={`/admin/tim/${tim_id}/cerdas_cermat1`}
image={tim.foto_mascot ?? "/placeholder-profile-picture.jpg"}
image={cc1?.foto ?? "/placeholder-profile-picture.jpg"}
name={
tim.foto_mascot
? "cerdas cermat 1 " + tim.nama_tim
: "Belum Diisi"
cc1?.foto ? "cerdas cermat 1 " + tim.nama_tim : "Belum Diisi"
}
posisi={"Cerdas Cermat 2"}
posisi={"Cerdas Cermat 1"}
/>
<AnggotaCard
href={`/admin/tim/${tim_id}/cerdas_cermat2`}
image={tim.foto_mascot ?? "/placeholder-profile-picture.jpg"}
image={cc2?.foto ?? "/placeholder-profile-picture.jpg"}
name={
tim.foto_mascot
? "cerdas cermat 2 " + tim.nama_tim
: "Belum Diisi"
cc2?.foto ? "cerdas cermat 2 " + tim.nama_tim : "Belum Diisi"
}
posisi={"Cerdas Cermat 1"}
posisi={"Cerdas Cermat 2"}
/>
</AnggotaCardsWrapper>
)}
Expand Down
3 changes: 2 additions & 1 deletion src/app/(admin)/admin/tim/components/Table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,9 @@ export default function TimTable({ data }: { data: TimWithRelations[] }) {
cell: (row: TimWithRelations) => (
<span className={"bg-[#]"}>{row.anggotas.length}</span>
),
selector: (row: TimWithRelations) => row.anggotas.length,

sortable: false,
sortable: true,
},
];

Expand Down

0 comments on commit f3307d3

Please sign in to comment.