@conboai/app.db.query 0.3.15 → 0.3.17

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.
@@ -84358,34 +84358,37 @@ function eme({ siteId: t, UserProfile: e, onHomeClick: n }) {
84358
84358
  }
84359
84359
  Qr.extend(Km);
84360
84360
  Qr.extend(Zm);
84361
- const Lfe = (t, e, n, r) => [
84362
- { headerName: "Id", field: "id" },
84361
+ const Lfe = (t, e, n) => [
84362
+ { headerName: "ID", field: "id" },
84363
84363
  {
84364
84364
  headerName: "Start",
84365
84365
  field: "startDate",
84366
- renderCell: (o) => Qr(ha(o, t)).tz(t).format("DD/MM/YYYY, HH:mm")
84366
+ renderCell: (r) => Qr(ha(r, t)).tz(t).format("DD/MM/YYYY, HH:mm")
84367
84367
  },
84368
84368
  {
84369
84369
  headerName: "End",
84370
84370
  field: "endDate",
84371
- renderCell: (o) => Qr(ha(o, t)).tz(t).format("DD/MM/YYYY, HH:mm")
84371
+ renderCell: (r) => r && Qr(ha(r, t)).tz(t).format("DD/MM/YYYY, HH:mm")
84372
84372
  },
84373
84373
  {
84374
84374
  headerName: "Duration",
84375
84375
  field: "duration",
84376
- renderCell: () => mfe(n, r)
84376
+ renderCell: () => n.endDate ? mfe(
84377
+ n == null ? void 0 : n.startDate,
84378
+ n == null ? void 0 : n.endDate
84379
+ ) : "0 sec"
84377
84380
  },
84378
84381
  {
84379
84382
  headerName: "Action",
84380
84383
  field: "actionType",
84381
- renderCell: (o) => p1(o)
84384
+ renderCell: (r) => p1(r)
84382
84385
  },
84383
84386
  {
84384
84387
  headerName: "Feed Name",
84385
84388
  field: "assigned_feed_id",
84386
- renderCell: (o) => {
84387
- var i;
84388
- return (i = e.find((s) => s.id === o)) == null ? void 0 : i.name;
84389
+ renderCell: (r) => {
84390
+ var o;
84391
+ return (o = e.find((i) => i.id === r)) == null ? void 0 : o.name;
84389
84392
  }
84390
84393
  }
84391
84394
  ], Dfe = {
@@ -84602,52 +84605,52 @@ const Lfe = (t, e, n, r) => [
84602
84605
  }
84603
84606
  ];
84604
84607
  function jfe() {
84605
- var B, N, I, D;
84606
- const { selectedTableItemId: t, timezone: e, startTime: n, endTime: r } = so(Ic), { siteFeeds: o } = so(), {
84607
- getFeedImages: i,
84608
- feedImages: s,
84609
- objectImages: l,
84610
- getObjectImages: c,
84611
- getPolyline: u,
84612
- getTrail: d,
84613
- polyline: h,
84614
- trail: v
84615
- } = _f(), { data: g } = _f(), [f, p] = Be(!1), m = g.find(
84616
- (L) => L.id === t
84617
- ) || [], S = {
84618
- ...m,
84619
- duration: new Date(m.end).getTime() - new Date(m.start).getTime()
84608
+ var A, $, B, N;
84609
+ const { selectedTableItemId: t, timezone: e } = so(Ic), { siteFeeds: n } = so(), {
84610
+ getFeedImages: r,
84611
+ feedImages: o,
84612
+ objectImages: i,
84613
+ getObjectImages: s,
84614
+ getPolyline: l,
84615
+ getTrail: c,
84616
+ polyline: u,
84617
+ trail: d
84618
+ } = _f(), { data: h } = _f(), [v, g] = Be(!1), f = h.find(
84619
+ (I) => I.id === t
84620
+ ) || [], p = {
84621
+ ...f,
84622
+ duration: new Date(f.end).getTime() - new Date(f.start).getTime()
84620
84623
  };
84621
84624
  Me(() => {
84622
- t !== -1 && p(!0);
84625
+ t !== -1 && g(!0);
84623
84626
  }, [t]), Me(() => {
84624
84627
  if (t !== -1) {
84625
- const L = m.id;
84626
- i({ actionKey: L }), c({ actionKey: L }), u({ actionKey: L }), d({ actionKey: L });
84628
+ const I = f.id;
84629
+ r({ actionKey: I }), s({ actionKey: I }), l({ actionKey: I }), c({ actionKey: I });
84627
84630
  }
84628
- }, [m.id]);
84629
- const x = ZO(s || []), T = ZO(l || []), k = Za(
84631
+ }, [f.id]);
84632
+ const m = ZO(o || []), S = ZO(i || []), x = Za(
84630
84633
  () => ({
84631
- feedImages: x,
84632
- objectImages: T,
84633
- isFirstPage: f,
84634
- setIsFirstPage: p
84634
+ feedImages: m,
84635
+ objectImages: S,
84636
+ isFirstPage: v,
84637
+ setIsFirstPage: g
84635
84638
  }),
84636
84639
  [
84637
84640
  t,
84638
- f,
84639
- x,
84640
- T
84641
+ v,
84642
+ m,
84643
+ S
84641
84644
  ]
84642
- ), w = Ife(k), C = Rfe(x, T), A = _fe({
84643
- polylineProps: (B = h == null ? void 0 : h.geometry) == null ? void 0 : B.coordinates,
84645
+ ), T = Ife(x), k = Rfe(m, S), w = _fe({
84646
+ polylineProps: (A = u == null ? void 0 : u.geometry) == null ? void 0 : A.coordinates,
84644
84647
  trailProps: {
84645
- coordinates: (N = v == null ? void 0 : v.geometry) == null ? void 0 : N.coordinates,
84646
- url: x[0]
84648
+ coordinates: ($ = d == null ? void 0 : d.geometry) == null ? void 0 : $.coordinates,
84649
+ url: m[0]
84647
84650
  }
84648
- }), $ = Nfe(
84649
- (I = h == null ? void 0 : h.geometry) == null ? void 0 : I.coordinates,
84650
- (D = v == null ? void 0 : v.geometry) == null ? void 0 : D.coordinates
84651
+ }), C = Nfe(
84652
+ (B = u == null ? void 0 : u.geometry) == null ? void 0 : B.coordinates,
84653
+ (N = d == null ? void 0 : d.geometry) == null ? void 0 : N.coordinates
84651
84654
  );
84652
84655
  return /* @__PURE__ */ Ze.jsx($n, { bgcolor: "#F5F6FA", height: "100%", sx: { overflowY: "auto" }, children: /* @__PURE__ */ Ze.jsxs(Vpe, { children: [
84653
84656
  /* @__PURE__ */ Ze.jsx(VL, { title: "Details" }),
@@ -84658,16 +84661,15 @@ function jfe() {
84658
84661
  sx: { backgroundColor: "transparent", mt: "20px" },
84659
84662
  columnDefs: Lfe(
84660
84663
  e,
84661
- o,
84662
84664
  n,
84663
- r
84665
+ f
84664
84666
  ),
84665
- data: t !== -1 ? S : Dfe
84667
+ data: t !== -1 ? p : Dfe
84666
84668
  }
84667
84669
  ),
84668
84670
  /* @__PURE__ */ Ze.jsx(ho, {}),
84669
- /* @__PURE__ */ Ze.jsx(Qk, { tabsContent: A, tabs: $ }),
84670
84671
  /* @__PURE__ */ Ze.jsx(Qk, { tabsContent: w, tabs: C }),
84672
+ /* @__PURE__ */ Ze.jsx(Qk, { tabsContent: T, tabs: k }),
84671
84673
  /* @__PURE__ */ Ze.jsx(ho, {})
84672
84674
  ] })
84673
84675
  ] }) });
@@ -84940,18 +84942,18 @@ Qr.extend(Zm);
84940
84942
  const Ufe = (t, e) => [
84941
84943
  { key: "id", label: "ID" },
84942
84944
  {
84943
- key: "start_time",
84945
+ key: "startDate",
84944
84946
  label: "Start time",
84945
84947
  renderCell: (n) => Qr(ha(n, t)).tz(t).format("DD/MM/YYYY, HH:mm")
84946
84948
  },
84947
84949
  {
84948
- key: "end_time",
84950
+ key: "endDate",
84949
84951
  label: "End time",
84950
- renderCell: (n) => Qr(ha(n, t)).tz(t).format("DD/MM/YYYY, HH:mm")
84952
+ renderCell: (n) => n && Qr(ha(n, t)).tz(t).format("DD/MM/YYYY, HH:mm")
84951
84953
  },
84952
84954
  {
84953
84955
  key: "assigned_feed_id",
84954
- label: "Feed ID",
84956
+ label: "Feed Name",
84955
84957
  renderCell: (n) => {
84956
84958
  var r;
84957
84959
  return (r = e.find((o) => o.id === n)) == null ? void 0 : r.name;
@@ -1,5 +1,5 @@
1
1
 
2
- export declare const verticalTableColumnDefs: (timezone: string, feeds: any[], startDate: string | Date, endDate: string | Date) => ({
2
+ export declare const verticalTableColumnDefs: (timezone: string, feeds: any[], verticalData: any) => ({
3
3
  headerName: string;
4
4
  field: string;
5
5
  renderCell?: undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@conboai/app.db.query",
3
- "version": "0.3.15",
3
+ "version": "0.3.17",
4
4
  "type": "module",
5
5
  "main": "dist/app.db.query.js",
6
6
  "types": "dist/build/index.d.ts",