sales-frontend-components 0.0.80 → 0.0.81
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs.js
CHANGED
|
@@ -283,6 +283,73 @@ function JobSearchCategory({ filteredJobs, onJobSelect, searchTerm }) {
|
|
|
283
283
|
] }) });
|
|
284
284
|
}
|
|
285
285
|
|
|
286
|
+
function JobSearchDetail({ occupationTypeCode, occupationIndustryCode }) {
|
|
287
|
+
const { data: detail } = method.useSearchOccupationDetailQuery({
|
|
288
|
+
occupationIndustryCode,
|
|
289
|
+
occupationIndustryTypeCode: occupationTypeCode
|
|
290
|
+
});
|
|
291
|
+
if (!detail || !detail.data) {
|
|
292
|
+
return null;
|
|
293
|
+
}
|
|
294
|
+
const {
|
|
295
|
+
/** @description 직종해설내용 */
|
|
296
|
+
occupationExplanationContent,
|
|
297
|
+
/** @description 직업예시명 */
|
|
298
|
+
occupationExampleName,
|
|
299
|
+
/** @description 위험등급명 */
|
|
300
|
+
riskGradeName,
|
|
301
|
+
/** @description 위험등급코드 */
|
|
302
|
+
riskGradeCode,
|
|
303
|
+
/** @description 상해위험등급코드명 */
|
|
304
|
+
injuryRiskGradeCodeName,
|
|
305
|
+
/** @description 상해위험등급코드 */
|
|
306
|
+
injuryRiskGradeCode,
|
|
307
|
+
/** @description 입원등급코드명 */
|
|
308
|
+
hospitalizationGradeCodeName,
|
|
309
|
+
/** @description 입원등급코드 */
|
|
310
|
+
hospitalizationGradeCode,
|
|
311
|
+
/** @description 상해직종코드 */
|
|
312
|
+
injuryOccupationCode
|
|
313
|
+
} = detail.data;
|
|
314
|
+
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Table, { variant: "horizontal", children: /* @__PURE__ */ jsxRuntime.jsxs("tbody", { children: [
|
|
315
|
+
/* @__PURE__ */ jsxRuntime.jsxs("tr", { children: [
|
|
316
|
+
/* @__PURE__ */ jsxRuntime.jsx("th", { className: "px-small", children: "\uC9C1\uC885 \uD574\uC124" }),
|
|
317
|
+
/* @__PURE__ */ jsxRuntime.jsx("td", { className: "px-small", children: occupationExplanationContent })
|
|
318
|
+
] }),
|
|
319
|
+
/* @__PURE__ */ jsxRuntime.jsxs("tr", { children: [
|
|
320
|
+
/* @__PURE__ */ jsxRuntime.jsx("th", { className: "px-small", children: "\uC9C1\uC885 \uC608\uC2DC" }),
|
|
321
|
+
/* @__PURE__ */ jsxRuntime.jsx("td", { className: "px-small", children: occupationExampleName })
|
|
322
|
+
] }),
|
|
323
|
+
/* @__PURE__ */ jsxRuntime.jsxs("tr", { children: [
|
|
324
|
+
/* @__PURE__ */ jsxRuntime.jsx("th", { className: "px-small", children: "\uC704\uD5D8 \uB4F1\uAE09" }),
|
|
325
|
+
/* @__PURE__ */ jsxRuntime.jsxs("td", { className: "px-small", children: [
|
|
326
|
+
riskGradeName,
|
|
327
|
+
"(",
|
|
328
|
+
riskGradeCode,
|
|
329
|
+
")"
|
|
330
|
+
] })
|
|
331
|
+
] }),
|
|
332
|
+
/* @__PURE__ */ jsxRuntime.jsxs("tr", { children: [
|
|
333
|
+
/* @__PURE__ */ jsxRuntime.jsx("th", { className: "px-small", children: "\uC785\uC6D0 \uB4F1\uAE09" }),
|
|
334
|
+
/* @__PURE__ */ jsxRuntime.jsxs("td", { className: "px-small", children: [
|
|
335
|
+
hospitalizationGradeCodeName,
|
|
336
|
+
"(",
|
|
337
|
+
hospitalizationGradeCode,
|
|
338
|
+
")"
|
|
339
|
+
] })
|
|
340
|
+
] }),
|
|
341
|
+
/* @__PURE__ */ jsxRuntime.jsxs("tr", { children: [
|
|
342
|
+
/* @__PURE__ */ jsxRuntime.jsx("th", { className: "px-small", children: "\uC0C1\uD574 \uB4F1\uAE09" }),
|
|
343
|
+
/* @__PURE__ */ jsxRuntime.jsxs("td", { className: "px-small", children: [
|
|
344
|
+
injuryRiskGradeCodeName,
|
|
345
|
+
"(",
|
|
346
|
+
injuryRiskGradeCode,
|
|
347
|
+
")"
|
|
348
|
+
] })
|
|
349
|
+
] })
|
|
350
|
+
] }) }) });
|
|
351
|
+
}
|
|
352
|
+
|
|
286
353
|
const cx$d = classNames.bind(styles);
|
|
287
354
|
function JobSearchFavorite({ filteredJobs, onJobSelect }) {
|
|
288
355
|
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cx$d("popular-jobs"), children: [
|
|
@@ -308,7 +375,13 @@ function JobSearchFavorite({ filteredJobs, onJobSelect }) {
|
|
|
308
375
|
]
|
|
309
376
|
}
|
|
310
377
|
) }),
|
|
311
|
-
/* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Accordion.Content, { variant: "text", children:
|
|
378
|
+
/* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Accordion.Content, { variant: "text", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
379
|
+
JobSearchDetail,
|
|
380
|
+
{
|
|
381
|
+
occupationTypeCode: job.occupationTypeCode || "",
|
|
382
|
+
occupationIndustryCode: job.occupationIndustryCode
|
|
383
|
+
}
|
|
384
|
+
) })
|
|
312
385
|
]
|
|
313
386
|
},
|
|
314
387
|
`item-${job.occupationIndustryCode}-${index}`
|
|
@@ -341,22 +414,13 @@ function JobSearchResult({ filteredJobs, onJobSelect, searchTerm }) {
|
|
|
341
414
|
children: highlightOnSearchKeyword$1(job.occupationIndustryName, searchTerm)
|
|
342
415
|
}
|
|
343
416
|
) }) }),
|
|
344
|
-
/* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Accordion.Content, { variant: "text", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
/* @__PURE__ */ jsxRuntime.jsxs("tr", { children: [
|
|
352
|
-
/* @__PURE__ */ jsxRuntime.jsx("th", { children: "\uD5E4\uB354 2" }),
|
|
353
|
-
/* @__PURE__ */ jsxRuntime.jsx("td", { className: "pl-24 pr-16", colSpan: 3, children: /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "d-flex-center-center", children: [
|
|
354
|
-
"2\uD589 1\uBC88\uC9F8 ",
|
|
355
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex-1 pipe-left", children: "\uC11C\uBE0C\uD14D\uC2A4\uD2B8" }),
|
|
356
|
-
/* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Button, { variant: "neutral", size: "xsmall", appearance: "outline", children: "\uBC84\uD2BC\uBA85" })
|
|
357
|
-
] }) })
|
|
358
|
-
] })
|
|
359
|
-
] }) }) })
|
|
417
|
+
/* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Accordion.Content, { variant: "text", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
418
|
+
JobSearchDetail,
|
|
419
|
+
{
|
|
420
|
+
occupationTypeCode: job.occupationTypeCode || "",
|
|
421
|
+
occupationIndustryCode: job.occupationIndustryCode
|
|
422
|
+
}
|
|
423
|
+
) })
|
|
360
424
|
]
|
|
361
425
|
},
|
|
362
426
|
job.occupationIndustryCode
|
|
@@ -2386,34 +2450,20 @@ const JobSearchModal = ({ onClose }) => {
|
|
|
2386
2450
|
] });
|
|
2387
2451
|
};
|
|
2388
2452
|
|
|
2389
|
-
const mockCustomers = [
|
|
2390
|
-
{ customerId: "1", customerName: "\uAE40\uD55C\uD654", birthDate: "1999.01.01", genderCode: "\uB0A8\uC131" },
|
|
2391
|
-
{
|
|
2392
|
-
customerId: "2",
|
|
2393
|
-
customerName: "\uAE40\uD55C\uD654\uC0DD\uBA85",
|
|
2394
|
-
birthDate: "1989.01.01",
|
|
2395
|
-
genderCode: "\uC5EC\uC131",
|
|
2396
|
-
baseAddress: "\uC11C\uC6B8\uC2DC \uB9C8\uD3EC\uAD6C"
|
|
2397
|
-
},
|
|
2398
|
-
{
|
|
2399
|
-
customerId: "3",
|
|
2400
|
-
customerName: "\uAE40\uD55C\uD654\uC190\uD574\uBCF4\uD5D8",
|
|
2401
|
-
birthDate: "1999.01.01",
|
|
2402
|
-
genderCode: "\uB0A8\uC131",
|
|
2403
|
-
baseAddress: "\uC11C\uC6B8\uC2DC \uB9C8\uD3EC\uAD6C"
|
|
2404
|
-
}
|
|
2405
|
-
];
|
|
2406
2453
|
const useCustomerSearch = (onSelect) => {
|
|
2407
2454
|
const { triggerRef, isOpen, setIsOpen, DropDown } = salesFrontendDesignSystem.useDropDown();
|
|
2408
2455
|
const [searchKeyword, setSearchKeyword] = React.useState("");
|
|
2409
2456
|
const [searchInput, setSearchInput] = React.useState("");
|
|
2410
2457
|
const [customerList, setCustomerList] = React.useState([]);
|
|
2411
2458
|
const [selectedCustomer, setSelectedCustomer] = React.useState(null);
|
|
2459
|
+
const { data } = method.useSearchCustomerListQuery({ customerName: searchKeyword });
|
|
2412
2460
|
const search = () => {
|
|
2413
2461
|
if (searchInput.length >= 2) {
|
|
2414
2462
|
setSearchKeyword(searchInput);
|
|
2415
|
-
const filtered =
|
|
2416
|
-
|
|
2463
|
+
const filtered = data?.data?.custList?.filter(
|
|
2464
|
+
(c) => c.customerName?.toLowerCase().includes(searchInput.toLowerCase())
|
|
2465
|
+
);
|
|
2466
|
+
setCustomerList(filtered || []);
|
|
2417
2467
|
setIsOpen(true);
|
|
2418
2468
|
} else {
|
|
2419
2469
|
setCustomerList([]);
|