@licklist/design 0.44.476-dev.11 → 0.44.476-dev.12
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NotesTableRow.d.ts","sourceRoot":"","sources":["../../../src/sales/notes/NotesTableRow.tsx"],"names":[],"mappings":";AAKA,OAAO,EAAE,IAAI,EAAE,MAAM,qDAAqD,CAAC;
|
|
1
|
+
{"version":3,"file":"NotesTableRow.d.ts","sourceRoot":"","sources":["../../../src/sales/notes/NotesTableRow.tsx"],"names":[],"mappings":";AAKA,OAAO,EAAE,IAAI,EAAE,MAAM,qDAAqD,CAAC;AAY3E,oBAAY,aAAa,GAAG;IAC1B,IAAI,EAAE,IAAI,CAAC;IACX,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,YAAY,EAAE,CAAC,MAAM,EAAE,IAAI,CAAC,IAAI,CAAC,KAAK,IAAI,CAAC;CAC5C,CAAC;AAEF,eAAO,MAAM,QAAQ,oCAAqC,aAAa,gBA2EtE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";function e(e){return e&&"object"==typeof e&&"default"in e?e.default:e}Object.defineProperty(exports,"__esModule",{value:!0});var t=require("tslib"),r=require("react"),a=e(r),n=require("@licklist/core/dist/Config"),o=require("react-i18next"),l=require("react-bootstrap"),i=require("../../static/Icon.js"),s=require("@react-aria/utils"),c=e(require("clsx")),u=require("luxon");require("../../static/index.js");var m=require("lodash"),d=require("../../modals/confirmation/ConfirmModal.js");require("../../modals/dialog/Dialog.js"),require("../../modals/dialog/DialogContext.js");var p=require("../../table/MenuButton.js");require("../../table/FilterHelperComponent.js"),require("../../table/PaginationHelperComponent.js"),require("../../table/PerPageHelperComponent.js"),require("../../table/StaticTable.js"),require("../../table/TableHelperComponent.js"),require("../../table/ReactTableHelperComponent.js");exports.TableRow=function(e){var b=e.note,
|
|
1
|
+
"use strict";function e(e){return e&&"object"==typeof e&&"default"in e?e.default:e}Object.defineProperty(exports,"__esModule",{value:!0});var t=require("tslib"),r=require("react"),a=e(r),n=require("@licklist/core/dist/Config"),o=require("react-i18next"),l=require("react-bootstrap"),i=require("../../static/Icon.js"),s=require("@react-aria/utils"),c=e(require("clsx")),u=require("luxon");require("../../static/index.js");var m=require("lodash"),d=require("../../modals/confirmation/ConfirmModal.js");require("../../modals/dialog/Dialog.js"),require("../../modals/dialog/DialogContext.js");var p=require("../../table/MenuButton.js"),q=require("@licklist/core/dist/Services");require("../../table/FilterHelperComponent.js"),require("../../table/PaginationHelperComponent.js"),require("../../table/PerPageHelperComponent.js"),require("../../table/StaticTable.js"),require("../../table/TableHelperComponent.js"),require("../../table/ReactTableHelperComponent.js");exports.TableRow=function(e){var b=e.note,f=e.onClick,E=e.onDeleteNote,g=o.useTranslation("Design").t,C=s.useId(),v=t.__read(r.useState(!1),2),j=v[0],T=v[1],N=u.DateTime.fromFormat(b.updatedAt,n.DATE_TIME_FULL_FORMAT,{zone:"utc"}).setZone(q.getClientTimeZone()).toFormat(n.DATE_TIME_FORMAT);return a.createElement("tr",{onClick:f},a.createElement("td",{className:"note-content"},b.note),a.createElement("td",{className:"note-author"},m.capitalize(b.user.firstName)," ",m.capitalize(b.user.lastName)),a.createElement("td",{className:"text-nowrap"},N),a.createElement("td",null,a.createElement("div",{className:"controls"},a.createElement("span",{className:"btn btn-sm eye"},a.createElement(i.default,{type:"eye",width:"20"})),a.createElement(l.OverlayTrigger,{trigger:"click",placement:"bottom",rootClose:!0,overlay:a.createElement(l.Popover,{id:C,className:c("product-set-card-popover",!j&&"d-none")},a.createElement(l.Popover.Content,{as:l.ListGroup,className:"product-set-card-menu",variant:"flush"},a.createElement(l.ListGroup.Item,{action:!0,className:"text-danger",as:"div"},a.createElement(d.ConfirmModal,null,(function(e){return a.createElement(p.MenuButton,{onClick:function(){T(!1),e((function(){return E(b.id)}))},name:g("remove"),icon:"trash-alt",className:"product-set-card-menu-item-text d-flex w-100 align-items-center",rightIcon:!0})})))))},a.createElement("button",{type:"button",className:"product-set-card-menu-button",onClick:function(e){e.stopPropagation(),T(!0)}},a.createElement(i.default,{type:"ellipsis-h"}))))))};
|
package/package.json
CHANGED
|
@@ -10,6 +10,7 @@ import {
|
|
|
10
10
|
DATE_TIME_FORMAT,
|
|
11
11
|
DATE_TIME_FULL_FORMAT,
|
|
12
12
|
} from "@licklist/core/dist/Config";
|
|
13
|
+
import { getClientTimeZone } from "@licklist/core/dist/Services";
|
|
13
14
|
import { ConfirmModal } from "../../modals";
|
|
14
15
|
import { MenuButton } from "../../table";
|
|
15
16
|
import { Icon } from "../../static";
|
|
@@ -25,10 +26,11 @@ export const TableRow = ({ note, onClick, onDeleteNote }: TableRowProps) => {
|
|
|
25
26
|
const popoverId = useId();
|
|
26
27
|
const [isOverlayVisibile, setIsOverlayVisible] = useState(false);
|
|
27
28
|
|
|
28
|
-
const date = DateTime.fromFormat(
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
29
|
+
const date = DateTime.fromFormat(note.updatedAt, DATE_TIME_FULL_FORMAT, {
|
|
30
|
+
zone: "utc",
|
|
31
|
+
})
|
|
32
|
+
.setZone(getClientTimeZone())
|
|
33
|
+
.toFormat(DATE_TIME_FORMAT);
|
|
32
34
|
|
|
33
35
|
return (
|
|
34
36
|
<tr onClick={onClick}>
|