| | |
| | | export function createBasStationAreaSearchState() { |
| | | return { |
| | | condition: '', |
| | | timeStart: '', |
| | | timeEnd: '', |
| | | stationAreaName: '', |
| | | stationAreaId: '', |
| | | type: '', |
| | |
| | | export function buildBasStationAreaSearchParams(params = {}) { |
| | | const searchParams = { |
| | | condition: normalizeText(params.condition), |
| | | timeStart: normalizeText(params.timeStart), |
| | | timeEnd: normalizeText(params.timeEnd), |
| | | stationAreaName: normalizeText(params.stationAreaName), |
| | | stationAreaId: normalizeText(params.stationAreaId), |
| | | type: |
| | |
| | | export function normalizeBasStationAreaListRow(record = {}, resolvers = {}) { |
| | | return normalizeBasStationAreaDetailRecord(record, resolvers) |
| | | } |
| | | |
| | | export function buildBasStationAreaPrintRows(records = [], resolvers = {}) { |
| | | if (!Array.isArray(records)) { |
| | | return [] |
| | | } |
| | | return records.map((record) => normalizeBasStationAreaListRow(record, resolvers)) |
| | | } |
| | | |
| | | export function buildBasStationAreaReportMeta({ |
| | | previewMeta = {}, |
| | | count = 0, |
| | | orientation = BAS_STATION_AREA_REPORT_STYLE.orientation |
| | | } = {}) { |
| | | return { |
| | | reportTitle: BAS_STATION_AREA_REPORT_TITLE, |
| | | reportDate: previewMeta.reportDate, |
| | | printedAt: previewMeta.printedAt, |
| | | operator: previewMeta.operator, |
| | | count, |
| | | reportStyle: { |
| | | ...BAS_STATION_AREA_REPORT_STYLE, |
| | | orientation |
| | | } |
| | | } |
| | | } |