This commit is contained in:
@@ -234,7 +234,7 @@ export function AdminManagementPage() {
|
|||||||
|
|
||||||
const columns = useMemo<Array<DataTableColumn<AdminRow>>>(
|
const columns = useMemo<Array<DataTableColumn<AdminRow>>>(
|
||||||
() => [
|
() => [
|
||||||
{ key: 'no', header: 'No.', className: 'w-20 px-5 py-3 font-medium', cell: (row) => <span className="font-semibold">{row.no}</span> },
|
{ key: 'no', header: 'No.', className: 'w-14 px-3 py-3 text-center font-medium', cell: (row) => <span className="block text-center font-semibold">{row.no}</span> },
|
||||||
{
|
{
|
||||||
key: 'name',
|
key: 'name',
|
||||||
header: '관리자',
|
header: '관리자',
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ import {
|
|||||||
|
|
||||||
type LicenseAssignmentRow = {
|
type LicenseAssignmentRow = {
|
||||||
id: string;
|
id: string;
|
||||||
|
no: number;
|
||||||
userId: string;
|
userId: string;
|
||||||
user: string;
|
user: string;
|
||||||
name: string;
|
name: string;
|
||||||
@@ -98,7 +99,10 @@ export function LicensesPage() {
|
|||||||
const [userKeyword, setUserKeyword] = useState('');
|
const [userKeyword, setUserKeyword] = useState('');
|
||||||
const loadingVisible = useMinimumLoading(loading);
|
const loadingVisible = useMinimumLoading(loading);
|
||||||
|
|
||||||
const rows = useMemo(() => assignmentRows(users), [users]);
|
const rows = useMemo(() => {
|
||||||
|
const assignments = assignmentRows(users);
|
||||||
|
return assignments.map((assignment, index) => ({ ...assignment, no: assignments.length - index }));
|
||||||
|
}, [users]);
|
||||||
const calculateExpiresAt = (licenseCode: string, startsAt: string) => {
|
const calculateExpiresAt = (licenseCode: string, startsAt: string) => {
|
||||||
const plan = plans.find((item) => item.code === licenseCode);
|
const plan = plans.find((item) => item.code === licenseCode);
|
||||||
return addDays(startsAt, plan?.defaultDurationDays);
|
return addDays(startsAt, plan?.defaultDurationDays);
|
||||||
@@ -278,6 +282,7 @@ export function LicensesPage() {
|
|||||||
|
|
||||||
const columns = useMemo<Array<DataTableColumn<LicenseAssignmentRow>>>(
|
const columns = useMemo<Array<DataTableColumn<LicenseAssignmentRow>>>(
|
||||||
() => [
|
() => [
|
||||||
|
{ key: 'no', header: 'No.', className: 'w-14 px-3 py-3 text-center font-medium', cell: (row) => <span className="block text-center font-semibold">{row.no}</span> },
|
||||||
{
|
{
|
||||||
key: 'user',
|
key: 'user',
|
||||||
header: '사용자',
|
header: '사용자',
|
||||||
@@ -376,7 +381,7 @@ export function LicensesPage() {
|
|||||||
</div>
|
</div>
|
||||||
<div className="mt-4">
|
<div className="mt-4">
|
||||||
<DataTableCard
|
<DataTableCard
|
||||||
title="부여 이력"
|
title="목록"
|
||||||
rows={rows}
|
rows={rows}
|
||||||
columns={columns}
|
columns={columns}
|
||||||
filters={filters}
|
filters={filters}
|
||||||
|
|||||||
@@ -232,7 +232,7 @@ export function NoticesPage() {
|
|||||||
|
|
||||||
const columns = useMemo<Array<DataTableColumn<(typeof rows)[number]>>>(
|
const columns = useMemo<Array<DataTableColumn<(typeof rows)[number]>>>(
|
||||||
() => [
|
() => [
|
||||||
{ key: 'no', header: 'No.', className: 'w-20 px-5 py-3 font-medium', cell: (row) => <span className="font-semibold">{row.no}</span> },
|
{ key: 'no', header: 'No.', className: 'w-14 px-3 py-3 text-center font-medium', cell: (row) => <span className="block text-center font-semibold">{row.no}</span> },
|
||||||
{
|
{
|
||||||
key: 'title',
|
key: 'title',
|
||||||
header: '공지',
|
header: '공지',
|
||||||
|
|||||||
@@ -88,7 +88,7 @@ export function OrganizationsPage() {
|
|||||||
|
|
||||||
const columns = useMemo<Array<DataTableColumn<Organization>>>(
|
const columns = useMemo<Array<DataTableColumn<Organization>>>(
|
||||||
() => [
|
() => [
|
||||||
{ key: 'no', header: 'No.', className: 'w-20 px-5 py-3 font-medium', cell: (row) => <span className="font-semibold">{row.no}</span> },
|
{ key: 'no', header: 'No.', className: 'w-14 px-3 py-3 text-center font-medium', cell: (row) => <span className="block text-center font-semibold">{row.no}</span> },
|
||||||
{
|
{
|
||||||
key: 'name',
|
key: 'name',
|
||||||
header: '조직명',
|
header: '조직명',
|
||||||
|
|||||||
Reference in New Issue
Block a user