@realtek/core-theme 0.0.235 → 0.0.236

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-lib/index.js CHANGED
@@ -16485,7 +16485,8 @@ var Py = "submissionManager", Fy = "onboardingManager", Iy = "cfo", Ly = "onlyFi
16485
16485
  key: "approve",
16486
16486
  label: "Approve",
16487
16487
  tone: "primary",
16488
- api: "submissionApprove"
16488
+ api: "submissionApprove",
16489
+ requireProposedRate: !0
16489
16490
  },
16490
16491
  reject: {
16491
16492
  key: "reject",
@@ -16948,14 +16949,14 @@ function bb({ type: e, record: t, lookups: n, identity: r, referralOptions: i, o
16948
16949
  v,
16949
16950
  oe,
16950
16951
  d
16951
- ]), F = P.currency, ce = d.readOnly, le = Number(P.proposedRate) > 0, ue = Number(d.margin?.minMarginPercent ?? 20), de = Number(P.netProposedRate) > 0 ? Number(P.totalMargin) / Number(P.netProposedRate) * 100 : 0, fe = P.marginPositive ? de < ue ? "fa-warn" : "fa-good" : "fa-bad", pe = P.isW2 ? "Candidate" : "Employer", me = !!d.sections.rateBreakdown?.proposed?.editable, he = Number(P.clientJobRate) || 0, ge = me && he > 0 && Number(m) > he, _e = (e) => {
16952
+ ]), F = P.currency, ce = d.readOnly, le = Number(P.proposedRate) > 0, ue = Number(d.margin?.minMarginPercent ?? 20), de = Number(P.netProposedRate) > 0 ? Number(P.totalMargin) / Number(P.netProposedRate) * 100 : 0, fe = P.marginPositive ? de < ue ? "fa-warn" : "fa-good" : "fa-bad", pe = P.isW2 ? "Candidate" : "Employer", me = !!d.sections.rateBreakdown?.proposed?.editable, he = Number(P.clientJobRate) || 0, ge = me && he > 0 && Number(m) > he, _e = d.actions?.primary, ve = !!_e?.requireProposedRate && !(Number(P.proposedRate) > 0), ye = ve ? "Enter the Proposed Rate first — it drives the margin and the rate sent for approval." : ge ? `Proposed rate can’t exceed the Client Job Rate (${fb(he, F)}/hr).` : "", be = (e) => {
16952
16953
  _(e), ee(!1);
16953
16954
  let t = (i ?? []).find((t) => t.value === e);
16954
16955
  t?.lastRate != null && y(Number(t.lastRate) || 0), t?.type && x(t.type), a?.(e, t);
16955
- }, ve = (e) => {
16956
+ }, xe = (e) => {
16956
16957
  let t = e.target.checked;
16957
16958
  ne(t), ee(t);
16958
- }, ye = (e) => /* @__PURE__ */ Z("div", { children: [e, o && /* @__PURE__ */ X("div", {
16959
+ }, Se = (e) => /* @__PURE__ */ Z("div", { children: [e, o && /* @__PURE__ */ X("div", {
16959
16960
  className: "fa-referral-dropdown-footer",
16960
16961
  children: /* @__PURE__ */ X(Cu, {
16961
16962
  className: "fa-referral-add-btn",
@@ -16966,10 +16967,10 @@ function bb({ type: e, record: t, lookups: n, identity: r, referralOptions: i, o
16966
16967
  },
16967
16968
  children: "Add"
16968
16969
  })
16969
- })] }), be = async (e) => {
16970
+ })] }), Ce = async (e) => {
16970
16971
  if (!e) return;
16971
- if (e === d.actions.primary && ge) {
16972
- J.error(`Proposed rate can't exceed the Client Job Rate (${fb(he, F)}/hr).`);
16972
+ if (e === d.actions.primary && ye) {
16973
+ J.error(ye);
16973
16974
  return;
16974
16975
  }
16975
16976
  if (e.requireReason && !S.trim()) {
@@ -17009,7 +17010,7 @@ function bb({ type: e, record: t, lookups: n, identity: r, referralOptions: i, o
17009
17010
  } finally {
17010
17011
  j("");
17011
17012
  }
17012
- }, xe = d.actions.primary, Se = d.actions.reject;
17013
+ }, we = d.actions.primary, Te = d.actions.reject;
17013
17014
  return /* @__PURE__ */ Z("div", {
17014
17015
  className: `fa-panel fa-variant-${u}`,
17015
17016
  children: [
@@ -17290,6 +17291,14 @@ function bb({ type: e, record: t, lookups: n, identity: r, referralOptions: i, o
17290
17291
  className: "fa-editable-sub",
17291
17292
  children: "rate we ask the client for"
17292
17293
  }),
17294
+ ve && /* @__PURE__ */ Z("div", {
17295
+ className: "fa-reason-error",
17296
+ children: [
17297
+ "! Enter the proposed rate to enable ",
17298
+ _e?.label ?? "approval",
17299
+ "."
17300
+ ]
17301
+ }),
17293
17302
  ge && /* @__PURE__ */ Z("div", {
17294
17303
  className: "fa-reason-error",
17295
17304
  children: [
@@ -17348,7 +17357,7 @@ function bb({ type: e, record: t, lookups: n, identity: r, referralOptions: i, o
17348
17357
  className: "fa-referral-toggle",
17349
17358
  children: [/* @__PURE__ */ X(rr, {
17350
17359
  checked: te,
17351
- onChange: ve,
17360
+ onChange: xe,
17352
17361
  children: /* @__PURE__ */ X("span", {
17353
17362
  className: "fa-rt-title",
17354
17363
  children: N.toggleLabel ?? "Add Referral"
@@ -17385,14 +17394,14 @@ function bb({ type: e, record: t, lookups: n, identity: r, referralOptions: i, o
17385
17394
  placeholder: "Select a referral",
17386
17395
  open: M,
17387
17396
  value: g ?? void 0,
17388
- onChange: _e,
17397
+ onChange: be,
17389
17398
  options: i ?? [],
17390
17399
  showSearch: !0,
17391
17400
  optionFilterProp: "label",
17392
17401
  onDropdownVisibleChange: ee,
17393
17402
  onOpenChange: ee,
17394
- popupRender: ye,
17395
- dropdownRender: ye
17403
+ popupRender: Se,
17404
+ dropdownRender: Se
17396
17405
  })]
17397
17406
  }),
17398
17407
  /* @__PURE__ */ Z("div", {
@@ -17541,10 +17550,10 @@ function bb({ type: e, record: t, lookups: n, identity: r, referralOptions: i, o
17541
17550
  ] })
17542
17551
  })]
17543
17552
  }),
17544
- Se?.requireReason && /* @__PURE__ */ Z("div", {
17553
+ Te?.requireReason && /* @__PURE__ */ Z("div", {
17545
17554
  className: "fa-reason",
17546
17555
  children: [
17547
- Se.requireCategory && /* @__PURE__ */ Z(Y, { children: [
17556
+ Te.requireCategory && /* @__PURE__ */ Z(Y, { children: [
17548
17557
  /* @__PURE__ */ Z("label", {
17549
17558
  className: "fa-reason-label",
17550
17559
  htmlFor: "fa-rejection-category",
@@ -17598,11 +17607,16 @@ function bb({ type: e, record: t, lookups: n, identity: r, referralOptions: i, o
17598
17607
  })
17599
17608
  ]
17600
17609
  }),
17601
- d.actions?.show !== !1 && (xe || Se) && /* @__PURE__ */ Z("div", {
17610
+ d.actions?.show !== !1 && (we || Te) && /* @__PURE__ */ Z("div", {
17602
17611
  className: "fa-action-bar",
17603
17612
  children: [/* @__PURE__ */ X("div", {
17604
17613
  className: "fa-action-note",
17605
- children: e === "cfo" ? /* @__PURE__ */ Z(Y, { children: [
17614
+ children: ve ? /* @__PURE__ */ Z(Y, { children: [
17615
+ /* @__PURE__ */ X("b", { children: "Proposed rate required" }),
17616
+ " — enter it above to enable ",
17617
+ we?.label ?? "approval",
17618
+ "."
17619
+ ] }) : e === "cfo" ? /* @__PURE__ */ Z(Y, { children: [
17606
17620
  "Approving finalizes payroll at ",
17607
17621
  /* @__PURE__ */ Z("b", { children: [fb(P.proposedRate, F), "/hr"] }),
17608
17622
  ae ? /* @__PURE__ */ Z(Y, { children: [
@@ -17626,20 +17640,27 @@ function bb({ type: e, record: t, lookups: n, identity: r, referralOptions: i, o
17626
17640
  onClick: l,
17627
17641
  children: "Cancel"
17628
17642
  }),
17629
- Se && /* @__PURE__ */ X(Cu, {
17643
+ Te && /* @__PURE__ */ X(Cu, {
17630
17644
  danger: !0,
17631
- loading: A === Se.key,
17645
+ loading: A === Te.key,
17632
17646
  disabled: !!A,
17633
- onClick: () => be(Se),
17634
- children: Se.label
17647
+ onClick: () => Ce(Te),
17648
+ children: Te.label
17635
17649
  }),
17636
- xe && /* @__PURE__ */ X(Cu, {
17637
- variant: "primary",
17638
- icon: /* @__PURE__ */ X(Yr, {}),
17639
- loading: A === xe.key,
17640
- disabled: !!A || ge,
17641
- onClick: () => be(xe),
17642
- children: xe.label
17650
+ we && /* @__PURE__ */ X(q, {
17651
+ title: ye || "",
17652
+ placement: "top",
17653
+ children: /* @__PURE__ */ X("span", {
17654
+ className: "fa-btn-tip",
17655
+ children: /* @__PURE__ */ X(Cu, {
17656
+ variant: "primary",
17657
+ icon: /* @__PURE__ */ X(Yr, {}),
17658
+ loading: A === we.key,
17659
+ disabled: !!A || !!ye,
17660
+ onClick: () => Ce(we),
17661
+ children: we.label
17662
+ })
17663
+ })
17643
17664
  })
17644
17665
  ]
17645
17666
  })]