@licklist/design 0.44.482 → 0.44.484
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"),
|
|
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"),i=require("react-bootstrap"),l=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");exports.TableRow=function(e){var f=e.note,E=e.onClick,b=e.onDeleteNote,g=o.useTranslation("Design").t,v=s.useId(),C=t.__read(r.useState(!1),2),j=C[0],N=C[1],T=u.DateTime.fromFormat(f.updatedAt,n.DATE_TIME_FULL_FORMAT,{zone:"utc"}).setZone(q.getClientTimeZone()).toFormat(n.DATE_TIME_FORMAT);return a.createElement("tr",{onClick:E},a.createElement("td",{className:"note-content"},f.note),a.createElement("td",{className:"note-author"},m.capitalize(f.user.firstName)," ",m.capitalize(f.user.lastName)),a.createElement("td",{className:"text-nowrap"},T),a.createElement("td",null,a.createElement("div",{className:"controls"},a.createElement("span",{className:"btn btn-sm eye"},a.createElement(l.default,{type:"eye",width:"20"})),a.createElement(i.OverlayTrigger,{trigger:"click",placement:"bottom",rootClose:!0,overlay:a.createElement(i.Popover,{id:v,className:c("product-set-card-popover",!j&&"d-none")},a.createElement(i.Popover.Content,{as:i.ListGroup,className:"product-set-card-menu",variant:"flush"},a.createElement(i.ListGroup.Item,{action:!0,className:"text-danger",as:"div"},a.createElement(d.ConfirmModal,null,(function(e){return a.createElement(p.MenuButton,{onClick:function(){N(!1),e((function(){return b(f.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(),N(!0)}},a.createElement(l.default,{type:"ellipsis-h"}))))))};
|
package/package.json
CHANGED
|
@@ -6,7 +6,11 @@ import { useTranslation } from "react-i18next";
|
|
|
6
6
|
import { Note } from "@licklist/core/dist/DataMapper/Order/NoteDataMapper";
|
|
7
7
|
import { capitalize } from "lodash";
|
|
8
8
|
import { DateTime } from "luxon";
|
|
9
|
-
import {
|
|
9
|
+
import {
|
|
10
|
+
DATE_TIME_FULL_FORMAT,
|
|
11
|
+
DATE_TIME_FORMAT,
|
|
12
|
+
} from "@licklist/core/dist/Config";
|
|
13
|
+
import { getClientTimeZone } from "@licklist/core/dist/Services";
|
|
10
14
|
import { ConfirmModal } from "../../modals";
|
|
11
15
|
import { MenuButton } from "../../table";
|
|
12
16
|
import { Icon } from "../../static";
|
|
@@ -22,10 +26,11 @@ export const TableRow = ({ note, onClick, onDeleteNote }: TableRowProps) => {
|
|
|
22
26
|
const popoverId = useId();
|
|
23
27
|
const [isOverlayVisibile, setIsOverlayVisible] = useState(false);
|
|
24
28
|
|
|
25
|
-
const date = DateTime.fromFormat(
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
+
const date = DateTime.fromFormat(note.updatedAt, DATE_TIME_FULL_FORMAT, {
|
|
30
|
+
zone: "utc",
|
|
31
|
+
})
|
|
32
|
+
.setZone(getClientTimeZone())
|
|
33
|
+
.toFormat(DATE_TIME_FORMAT);
|
|
29
34
|
|
|
30
35
|
return (
|
|
31
36
|
<tr onClick={onClick}>
|
|
@@ -33,7 +38,7 @@ export const TableRow = ({ note, onClick, onDeleteNote }: TableRowProps) => {
|
|
|
33
38
|
<td className="note-author">
|
|
34
39
|
{capitalize(note.user.firstName)} {capitalize(note.user.lastName)}
|
|
35
40
|
</td>
|
|
36
|
-
<td className="
|
|
41
|
+
<td className="text-nowrap">{date}</td>
|
|
37
42
|
<td>
|
|
38
43
|
<div className="controls">
|
|
39
44
|
<span className="btn btn-sm eye">
|