260624_03_ENH: label 일괄 관리 및 문자 발송 팝업에 사용가능 변수 추가
This commit is contained in:
@@ -25,6 +25,7 @@ import {useMounted} from "@/hooks/useMounted";
|
||||
import {LoadingOverlay} from "@/components/common/LoadingOverlay";
|
||||
import {SMS_TEMPLATE_IDS} from "@/query/notification";
|
||||
import {buildPerformanceSmsParams} from "@/lib/gwcf/notification";
|
||||
import {PERFORMANCE_FIELD_LABELS} from "@/lib/gwcf/field-labels";
|
||||
|
||||
const AssignPage = () => {
|
||||
const mounted = useMounted();
|
||||
@@ -115,13 +116,13 @@ const AssignPage = () => {
|
||||
};
|
||||
|
||||
const columns = useMemo<DataTableColumn<PerformanceFull>[]>(() => [
|
||||
{accessorKey: "id", header: "연번", cell: ({row}) => row.original.id, enableSorting: true},
|
||||
{accessorKey: "performanceName", header: "사업명", enableSorting: true},
|
||||
{id: "area", header: "지역", cell: ({row}) => getCodeLabel(codes, "area", row.original.performanceArea)},
|
||||
{accessorKey: "performanceDtInfo", header: "사업 일정"},
|
||||
{accessorKey: "performanceTimeInfo", header: "운영 시간"},
|
||||
{id: "monitoringDate", header: "모니터링 일정", cell: ({row}) => row.original.performanceMonitoringSchedule?.monitoringDate ?? "", enableSorting: true},
|
||||
{id: "monitoringTime", header: "모니터링 시간", cell: ({row}) => row.original.performanceMonitoringSchedule?.monitoringTimeInfo ?? ""},
|
||||
{accessorKey: "id", header: PERFORMANCE_FIELD_LABELS.id, cell: ({row}) => row.original.id, enableSorting: true},
|
||||
{accessorKey: "performanceName", header: PERFORMANCE_FIELD_LABELS.performanceName, enableSorting: true},
|
||||
{id: "area", header: PERFORMANCE_FIELD_LABELS.performanceArea, cell: ({row}) => getCodeLabel(codes, "area", row.original.performanceArea)},
|
||||
{accessorKey: "performanceDtInfo", header: PERFORMANCE_FIELD_LABELS.performanceDtInfo},
|
||||
{accessorKey: "performanceTimeInfo", header: PERFORMANCE_FIELD_LABELS.performanceTimeInfo},
|
||||
{id: "monitoringDate", header: PERFORMANCE_FIELD_LABELS.monitoringDate, cell: ({row}) => row.original.performanceMonitoringSchedule?.monitoringDate ?? "", enableSorting: true},
|
||||
{id: "monitoringTime", header: PERFORMANCE_FIELD_LABELS.monitoringTimeInfo, cell: ({row}) => row.original.performanceMonitoringSchedule?.monitoringTimeInfo ?? ""},
|
||||
{id: "applyCount", header: "신청자 수", cell: ({row}) => applyCountMap.get(String(row.original.id)) ?? 0, enableSorting: true},
|
||||
{id: "requestCount", header: "확정요청 수", cell: ({row}) => getMonitoringAssigns(row.original).length},
|
||||
{id: "confirmedCount", header: "확정인원 수", cell: ({row}) => getMonitoringAssigns(row.original).filter((assign) => assign.assignConfirm).length},
|
||||
@@ -133,10 +134,10 @@ const AssignPage = () => {
|
||||
<div className="space-y-4">
|
||||
<PagePanel>
|
||||
<div className="grid gap-2 md:grid-cols-[160px_160px_180px_1fr_auto]">
|
||||
<MultiFilterSelect value={filters.businessType} onChange={(value) => updateFilters((prev) => ({...prev, businessType: value}))} options={codes.business_type} placeholder="사업 유형" />
|
||||
<MultiFilterSelect value={filters.area} onChange={(value) => updateFilters((prev) => ({...prev, area: value}))} options={codes.area} placeholder="지역" />
|
||||
<MultiFilterSelect value={filters.businessType} onChange={(value) => updateFilters((prev) => ({...prev, businessType: value}))} options={codes.business_type} placeholder={PERFORMANCE_FIELD_LABELS.businessType} />
|
||||
<MultiFilterSelect value={filters.area} onChange={(value) => updateFilters((prev) => ({...prev, area: value}))} options={codes.area} placeholder={PERFORMANCE_FIELD_LABELS.performanceArea} />
|
||||
<Input type="date" value={filters.monitoringDate} onChange={(event) => updateFilters((prev) => ({...prev, monitoringDate: event.target.value}))} />
|
||||
<Input value={filters.keyword} onChange={(event) => updateFilters((prev) => ({...prev, keyword: event.target.value}))} placeholder="연번 or 사업명" />
|
||||
<Input value={filters.keyword} onChange={(event) => updateFilters((prev) => ({...prev, keyword: event.target.value}))} placeholder={`${PERFORMANCE_FIELD_LABELS.id} or ${PERFORMANCE_FIELD_LABELS.performanceName}`} />
|
||||
<Button type="button" variant="outline" onClick={refreshAssignList}>
|
||||
<Search className="h-4 w-4" />
|
||||
검색
|
||||
@@ -199,6 +200,7 @@ const AssignPage = () => {
|
||||
newMessageTemplateIdx={SMS_TEMPLATE_IDS.CUSTOM}
|
||||
selectedUsers={smsTargetUsers}
|
||||
addParams={smsAddParam}
|
||||
denyParamKeys={["userCmpn", "userTeam", "userRole", "id"]}
|
||||
isBeforeSendPending={saveAssignMutation.isPending}
|
||||
onBeforeDefaultTemplateSend={async () => {
|
||||
if (!selected) throw new Error("공연 정보가 없습니다.");
|
||||
|
||||
Reference in New Issue
Block a user