@fayz-ai/plugin-fiscal-br 0.7.0 → 0.7.2
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.js +33 -19
- package/dist/index.js.map +1 -1
- package/dist/views/InboundNotesView.d.ts.map +1 -1
- package/package.json +5 -5
package/dist/index.js
CHANGED
|
@@ -2,8 +2,8 @@ import { recordRailFields, RECORD_GROUP, activeFacet, describeError, getSupabase
|
|
|
2
2
|
import React7, { useState, useCallback, useEffect, useMemo, useRef } from 'react';
|
|
3
3
|
import { ModalHeader, ModalTitle, ModalBody, Skeleton, AiActionButton, Dropdown, DropdownTrigger, Button, DropdownContent, DropdownItem, Hint, Card, SearchSelect, Input, EmBreve, DatePicker, ModalFooter, SubpageHeader, useFilterDraft, RowActions, PageHeaderActions, FilterPanel, FilterPanelField, Select, SelectTrigger, SelectValue, SelectContent, SelectItem, SearchField, TooltipProvider, DataTable, Tooltip, TooltipTrigger, TooltipContent, ListFilterBar, Modal, ModalContent, ModalDescription, Badge, SegmentedControl, ComingSoon, toast, CardHeader, CardTitle, CardContent, CardDescription, Switch } from '@fayz-ai/ui';
|
|
4
4
|
export { ComingSoon, EmBreve } from '@fayz-ai/ui';
|
|
5
|
-
import { registerDocumentOpener, PersonLink, getActiveTenantId, useUnitFilter, usePermissionOptional, UNIT_DETAIL_ZONES, adminNavigateTo } from '@fayz-ai/admin';
|
|
6
|
-
import { Loader2, Download, ChevronDown, FileCode2, FileText, RefreshCw, UserPlus, Gift, AlertTriangle, ChevronRight, Check, Trash2, Plus, Image, UploadCloud, Paperclip, ScanLine, Eye, ListChecks,
|
|
5
|
+
import { registerDocumentOpener, PersonLink, getActiveTenantId, useUnitFilter, PageActions, usePermissionOptional, UNIT_DETAIL_ZONES, adminNavigateTo } from '@fayz-ai/admin';
|
|
6
|
+
import { Loader2, Download, ChevronDown, FileCode2, FileText, RefreshCw, UserPlus, Gift, AlertTriangle, ChevronRight, Check, Trash2, Plus, Image, UploadCloud, Paperclip, ScanLine, Eye, ListChecks, KeyRound, Inbox, FileDown, ShieldCheck, ExternalLink, CheckCircle2, FileCheck2, XCircle, X, Info } from 'lucide-react';
|
|
7
7
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
8
8
|
import { FINANCIAL_INVOICE_ZONES } from '@fayz-ai/plugin-financial';
|
|
9
9
|
|
|
@@ -5107,7 +5107,7 @@ function InboundNotesView({ onOpenNote, onOpenManifest }) {
|
|
|
5107
5107
|
id: "supplier",
|
|
5108
5108
|
header: "Fornecedor",
|
|
5109
5109
|
accessorFn: (note) => note.supplierName,
|
|
5110
|
-
meta: { truncate: true },
|
|
5110
|
+
meta: { truncate: true, mobile: "title" },
|
|
5111
5111
|
cell: ({ row }) => /* @__PURE__ */ jsxs("div", { children: [
|
|
5112
5112
|
/* @__PURE__ */ jsx("p", { className: "font-medium leading-tight", children: row.original.supplierName || "\u2014" }),
|
|
5113
5113
|
/* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground tabular-nums", children: cnpj(row.original.supplierCnpj) })
|
|
@@ -5194,24 +5194,37 @@ function InboundNotesView({ onOpenNote, onOpenManifest }) {
|
|
|
5194
5194
|
/* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground", children: "As notas chegam da SEFAZ pela fila de manifesta\xE7\xE3o, ou voc\xEA arrasta o XML aqui." })
|
|
5195
5195
|
] });
|
|
5196
5196
|
return /* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
|
|
5197
|
-
/* @__PURE__ */
|
|
5198
|
-
|
|
5199
|
-
|
|
5200
|
-
|
|
5201
|
-
|
|
5202
|
-
|
|
5203
|
-
|
|
5204
|
-
|
|
5205
|
-
|
|
5206
|
-
|
|
5207
|
-
|
|
5208
|
-
|
|
5209
|
-
|
|
5210
|
-
|
|
5197
|
+
/* @__PURE__ */ jsx(PageHeaderActions, { children: /* @__PURE__ */ jsx(
|
|
5198
|
+
PageActions,
|
|
5199
|
+
{
|
|
5200
|
+
actions: [
|
|
5201
|
+
{
|
|
5202
|
+
// Picking an XML off a filesystem is a desk job.
|
|
5203
|
+
id: "import-xml",
|
|
5204
|
+
label: "Importar XML",
|
|
5205
|
+
icon: busy ? Loader2 : UploadCloud,
|
|
5206
|
+
intent: "primary",
|
|
5207
|
+
creates: true,
|
|
5208
|
+
desktopOnly: true,
|
|
5209
|
+
disabled: busy,
|
|
5210
|
+
onSelect: () => fileInput.current?.click()
|
|
5211
|
+
},
|
|
5212
|
+
{
|
|
5213
|
+
id: "pull-by-key",
|
|
5214
|
+
label: "Puxar por chave",
|
|
5215
|
+
icon: KeyRound,
|
|
5216
|
+
creates: true,
|
|
5217
|
+
testId: "pull-by-key",
|
|
5218
|
+
onSelect: () => setPullOpen(true)
|
|
5219
|
+
},
|
|
5220
|
+
...onOpenManifest ? [{ id: "manifest", label: "Fila da SEFAZ", icon: Inbox, onSelect: onOpenManifest }] : []
|
|
5221
|
+
]
|
|
5222
|
+
}
|
|
5223
|
+
) }),
|
|
5211
5224
|
/* @__PURE__ */ jsxs(
|
|
5212
5225
|
Card,
|
|
5213
5226
|
{
|
|
5214
|
-
className: `border-dashed p-6 text-center transition-colors ${dragging ? "border-primary bg-primary/5" : ""}`,
|
|
5227
|
+
className: `hidden border-dashed p-6 text-center transition-colors md:block ${dragging ? "border-primary bg-primary/5" : ""}`,
|
|
5215
5228
|
onDragOver: (e) => {
|
|
5216
5229
|
e.preventDefault();
|
|
5217
5230
|
setDragging(true);
|
|
@@ -5330,7 +5343,8 @@ function InboundNotesView({ onOpenNote, onOpenManifest }) {
|
|
|
5330
5343
|
loading,
|
|
5331
5344
|
getRowId: (note) => note.id,
|
|
5332
5345
|
onRowClick: (note) => onOpenNote(note.id),
|
|
5333
|
-
emptyMessage
|
|
5346
|
+
emptyMessage,
|
|
5347
|
+
mobileLayout: "cards"
|
|
5334
5348
|
}
|
|
5335
5349
|
) })
|
|
5336
5350
|
] })
|