forlogic-core 1.20.0 → 2.0.0
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/.note/memory/patterns/alias-url-resolution.md +5 -2
- package/.note/memory/patterns/single-scroll-pattern.md +30 -12
- package/dist/action-plans/components/ActionPlanAttachmentsTab.d.ts +18 -0
- package/dist/action-plans/components/ActionPlanCommentsTab.d.ts +18 -0
- package/dist/action-plans/components/ActionPlanCostTab.d.ts +10 -0
- package/dist/action-plans/components/ActionPlanGeneralTab.d.ts +18 -0
- package/dist/action-plans/components/ActionPlanHistoryTab.d.ts +13 -0
- package/dist/action-plans/components/ActionPlanPage.d.ts +25 -0
- package/dist/action-plans/components/ActionPlanPredecessorsTab.d.ts +10 -0
- package/dist/action-plans/components/ActionPlanProgressDialog.d.ts +13 -0
- package/dist/action-plans/components/ActionPlanProgressTab.d.ts +5 -0
- package/dist/action-plans/components/ActionPlanStatusBadge.d.ts +11 -0
- package/dist/action-plans/constants.d.ts +42 -0
- package/dist/action-plans/hooks/useActionPlan.d.ts +14 -0
- package/dist/action-plans/hooks/useActionPlanProgress.d.ts +15 -0
- package/dist/action-plans/index.d.ts +15 -0
- package/dist/action-plans/types.d.ts +353 -0
- package/dist/action-plans/utils/formatTime.d.ts +15 -0
- package/dist/approval-flow/components/ApprovalSidenav.d.ts +16 -0
- package/dist/approval-flow/components/ApproveDialog.d.ts +13 -0
- package/dist/approval-flow/components/SelectApproverDialog.d.ts +11 -0
- package/dist/approval-flow/index.d.ts +4 -0
- package/dist/approval-flow/types.d.ts +76 -0
- package/dist/assets/index.d.ts +1 -0
- package/dist/audit-trail/components/AuditTrailDetails.d.ts +17 -0
- package/dist/audit-trail/components/AuditTrailFilter.d.ts +19 -0
- package/dist/audit-trail/components/AuditTrailPage.d.ts +30 -0
- package/dist/audit-trail/index.d.ts +9 -0
- package/dist/audit-trail/types.d.ts +151 -0
- package/dist/audit-trail/utils.d.ts +38 -0
- package/dist/components/dashboards/dashboard-form.d.ts +50 -0
- package/dist/components/dashboards/dashboard-general-view.d.ts +109 -0
- package/dist/components/dashboards/dashboard-grid.d.ts +41 -0
- package/dist/components/dashboards/dashboard-list.d.ts +31 -0
- package/dist/components/dashboards/dashboard-panel-renderer.d.ts +21 -0
- package/dist/components/dashboards/dashboard-view.d.ts +38 -0
- package/dist/components/dashboards/helpers.d.ts +47 -0
- package/dist/components/dashboards/index.d.ts +9 -0
- package/dist/components/dashboards/panels/burndown-panel.d.ts +26 -0
- package/dist/components/dashboards/panels/cartesian-panel.d.ts +46 -0
- package/dist/components/dashboards/panels/index.d.ts +14 -0
- package/dist/components/dashboards/panels/list-panel.d.ts +30 -0
- package/dist/components/dashboards/panels/matrix-risk-panel.d.ts +49 -0
- package/dist/components/dashboards/panels/numeric-panel.d.ts +22 -0
- package/dist/components/dashboards/panels/panel-error.d.ts +8 -0
- package/dist/components/dashboards/panels/panel-header.d.ts +17 -0
- package/dist/components/dashboards/panels/panel-loader.d.ts +7 -0
- package/dist/components/dashboards/panels/panel-no-data.d.ts +6 -0
- package/dist/components/dashboards/panels/panel-unavailable.d.ts +6 -0
- package/dist/components/dashboards/panels/pareto-panel.d.ts +20 -0
- package/dist/components/dashboards/panels/performance-panel.d.ts +24 -0
- package/dist/components/dashboards/panels/pie-panel.d.ts +19 -0
- package/dist/components/dashboards/panels/text-panel.d.ts +18 -0
- package/dist/components/dashboards/types.d.ts +525 -0
- package/dist/components/ui/electronic-signature-dialog.d.ts +21 -0
- package/dist/components/ui/export-dialog.d.ts +28 -0
- package/dist/components/ui/iframe-dialog.d.ts +14 -0
- package/dist/components/ui/multiselect-permissions.d.ts +59 -0
- package/dist/components/ui/online-editor-dialog.d.ts +18 -0
- package/dist/components/ui/report-request-list.d.ts +44 -0
- package/dist/components/ui/stimulsoft-viewer.d.ts +20 -0
- package/dist/components/ui/terms-of-use-dialog.d.ts +56 -0
- package/dist/components/ui/timepicker.d.ts +11 -0
- package/dist/components/ui/users-groups-selector.d.ts +44 -0
- package/dist/components/ui/viewer-dialog.d.ts +77 -0
- package/dist/custom-form-fields/components/CustomFormFields.d.ts +8 -0
- package/dist/custom-form-fields/fields/FormDateField.d.ts +6 -0
- package/dist/custom-form-fields/fields/FormMultiSelectionField.d.ts +6 -0
- package/dist/custom-form-fields/fields/FormNumericField.d.ts +6 -0
- package/dist/custom-form-fields/fields/FormQuestionsField.d.ts +6 -0
- package/dist/custom-form-fields/fields/FormSingleSelectionField.d.ts +6 -0
- package/dist/custom-form-fields/fields/FormTextField.d.ts +6 -0
- package/dist/custom-form-fields/fields/FormTimeField.d.ts +6 -0
- package/dist/custom-form-fields/fields/FormUrlField.d.ts +6 -0
- package/dist/custom-form-fields/fields/ReadOnlyTextField.d.ts +6 -0
- package/dist/custom-form-fields/index.d.ts +13 -0
- package/dist/custom-form-fields/types.d.ts +143 -0
- package/dist/exports/action-plans.d.ts +16 -0
- package/dist/exports/audit-trail.d.ts +1 -0
- package/dist/exports/custom-form-fields.d.ts +1 -0
- package/dist/exports/file-upload.d.ts +1 -0
- package/dist/exports/ui.d.ts +12 -0
- package/dist/file-upload/components/SingleFileUpload.d.ts +43 -0
- package/dist/file-upload/index.d.ts +6 -0
- package/dist/file-upload/types.d.ts +11 -0
- package/dist/file-upload/utils/formatBytes.d.ts +1 -0
- package/dist/file-upload/utils/getFileExtension.d.ts +1 -0
- package/dist/hooks/useSidebarResize.d.ts +1 -1
- package/dist/index.css +1 -1
- package/dist/index.css.map +1 -1
- package/dist/index.d.ts +6 -0
- package/dist/index.esm.js +1 -1
- package/dist/index.js +1 -1
- package/dist/team-selector/components/TeamSelector.d.ts +24 -0
- package/dist/team-selector/index.d.ts +2 -0
- package/dist/team-selector/types.d.ts +10 -0
- package/docs/ICON_MIGRATION_GUIDE.md +177 -0
- package/package.json +1 -1
- package/dist/assets/AccordionDoc-BVPUJk8G.js +0 -31
- package/dist/assets/ActionButtonDoc-DLJ_K9ib.js +0 -47
- package/dist/assets/AlertDoc-CY1ybZeG.js +0 -37
- package/dist/assets/AppHeaderDoc-Crkw4dA9.js +0 -67
- package/dist/assets/AppSidebarDoc-ET-4j6wV.js +0 -204
- package/dist/assets/AuthDoc-B4v4Nci5.js +0 -192
- package/dist/assets/AvatarDoc-BLdMoyJd.js +0 -11
- package/dist/assets/BadgeDoc-CSNM1b6b.js +0 -36
- package/dist/assets/BaseFormDoc-DXiYuN6-.js +0 -169
- package/dist/assets/BodyContentDoc-Bp6YmUWX.js +0 -83
- package/dist/assets/BreadcrumbDoc-D7tqqTvo.js +0 -75
- package/dist/assets/ButtonDoc-C4JwIvU3.js +0 -41
- package/dist/assets/ButtonGroupDoc-QFfjC7Pm.js +0 -7
- package/dist/assets/CalendarDoc-COlEKqmv.js +0 -81
- package/dist/assets/CardDoc-BVhMoC2w.js +0 -49
- package/dist/assets/ChartDoc-BJ14EjI2.js +0 -111
- package/dist/assets/CheckboxDoc-Bcqpln9_.js +0 -55
- package/dist/assets/ColorPickerDoc-CcfmSwyC.js +0 -10
- package/dist/assets/ColorsFoundationDoc-uO6IiJbS.js +0 -13
- package/dist/assets/ComboTreeDoc-R4qE6XwB.js +0 -46
- package/dist/assets/ComboboxDoc-JIo_-gSN.js +0 -134
- package/dist/assets/ComponentDocTemplate-CRbRY-v5.js +0 -1
- package/dist/assets/ContextMenuDoc-C4-_0NLp.js +0 -182
- package/dist/assets/ContextsDoc-Cj9Aaoyo.js +0 -184
- package/dist/assets/CreateCrudPageDoc-D_SnMRJ2.js +0 -106
- package/dist/assets/CrudActionBarDoc-BYqtIabp.js +0 -112
- package/dist/assets/CrudGridDoc-DspxQrq5.js +0 -85
- package/dist/assets/CrudOverviewDoc-DLcOL_HZ.js +0 -14
- package/dist/assets/CrudPrimitivesDoc-BRS86nWg.js +0 -164
- package/dist/assets/CrudTableDoc-Daw8u2G_.js +0 -113
- package/dist/assets/DataListDoc-BrgVNhhR.js +0 -13
- package/dist/assets/DesignSystemHome-BFBNqq1J.js +0 -1
- package/dist/assets/DialogDoc-DCpRy4rg.js +0 -981
- package/dist/assets/DropdownMenuDoc-DT6LBa8Z.js +0 -175
- package/dist/assets/EmptyStateDoc-wydc09gG.js +0 -35
- package/dist/assets/EnvironmentsDoc-amIriwDD.js +0 -96
- package/dist/assets/ErrorBoundaryDoc-BEixy_Gl.js +0 -111
- package/dist/assets/FormDoc-DxoRt6p7.js +0 -81
- package/dist/assets/FoundationOverview-CxSbumIt.js +0 -1
- package/dist/assets/GridDoc-BpQqCMUE.js +0 -28
- package/dist/assets/HooksDoc-JNODhbaF.js +0 -665
- package/dist/assets/HoverCardDoc-CdqiYrIb.js +0 -31
- package/dist/assets/I18nDoc-B6LMXnE3.js +0 -232
- package/dist/assets/IconPickerDoc-BRdy58IC.js +0 -10
- package/dist/assets/IconsFoundationDoc-CrymfxTI.js +0 -33
- package/dist/assets/InputDoc-BK-SdpJ7.js +0 -211
- package/dist/assets/LabelDoc-DHvgzhaJ.js +0 -42
- package/dist/assets/LeadershipDoc-DRiB0spL.js +0 -416
- package/dist/assets/MediaDoc-B_vqnf72.js +0 -459
- package/dist/assets/MenubarDoc-Zvgczxe2.js +0 -165
- package/dist/assets/ModuleAccessDoc-Nuxb4S27.js +0 -153
- package/dist/assets/ModulesDialogDoc-iJWLkOZo.js +0 -46
- package/dist/assets/NavigationMenuDoc-CeWun1VF.js +0 -116
- package/dist/assets/OnboardingDialogDoc-xBL-rXeZ.js +0 -55
- package/dist/assets/PaginationDoc-CfvwxCMe.js +0 -98
- package/dist/assets/PaginationDoc-DqtRgXnF.js +0 -27
- package/dist/assets/PlacesDoc-nckioEzg.js +0 -226
- package/dist/assets/PopoverDoc-C3o2CZCT.js +0 -64
- package/dist/assets/ProgressDoc-BmWBNMPA.js +0 -29
- package/dist/assets/QualiexUserFieldDoc-CE1e4mx6.js +0 -149
- package/dist/assets/RadioGroupDoc-DMZH6NmR.js +0 -57
- package/dist/assets/RadiusDoc-BOZD3gPV.js +0 -7
- package/dist/assets/RequiredFieldsCounterDoc-CG-lmSSy.js +0 -58
- package/dist/assets/ResizableDoc-CqGkv6Cd.js +0 -104
- package/dist/assets/RichTextEditorDoc-m50ll-Od.js +0 -24
- package/dist/assets/ScrollAreaDoc-BzJ-APXo.js +0 -28
- package/dist/assets/SecurityDoc-B34gVeiV.js +0 -204
- package/dist/assets/SelectDoc-DXRv7QHK.js +0 -80
- package/dist/assets/SeparatorDoc-DcNh8k0P.js +0 -4
- package/dist/assets/ServicesDoc-8aXBd6yg.js +0 -308
- package/dist/assets/ShadowsDoc-Brl4hIDI.js +0 -9
- package/dist/assets/SignDoc-BdwerR-2.js +0 -66
- package/dist/assets/SkeletonDoc-BWgqgbDY.js +0 -54
- package/dist/assets/SliderDoc-E-NjbYVk.js +0 -41
- package/dist/assets/SpacingDoc-BzburM-r.js +0 -12
- package/dist/assets/SplitButtonDoc-BYUysmJp.js +0 -53
- package/dist/assets/StepSelectorDoc-PB1k4v7F.js +0 -41
- package/dist/assets/SwitchDoc-BLOG6kfj.js +0 -56
- package/dist/assets/TableDoc-Dwcs-lop.js +0 -128
- package/dist/assets/TabsDoc-Ovkh8ArV.js +0 -42
- package/dist/assets/TextareaDoc-DsBYxmbr.js +0 -46
- package/dist/assets/ToastDoc-BbZaFE_A.js +0 -157
- package/dist/assets/ToggleDoc-C28vbvhp.js +0 -51
- package/dist/assets/TooltipDoc-DL5cnLak.js +0 -58
- package/dist/assets/TruncatedCellDoc-BuDA8QcY.js +0 -12
- package/dist/assets/TypographyFoundationDoc-CPdH4PHa.js +0 -7
- package/dist/assets/UtilitiesDoc-CrQhyEfz.js +0 -145
- package/dist/assets/blocks-DO93nPjs.js +0 -1
- package/dist/assets/calendar-days-cMfwBSZx.js +0 -1
- package/dist/assets/circle-plus-D3NftMzS.js +0 -1
- package/dist/assets/circle-x-BVAVJ_oz.js +0 -1
- package/dist/assets/crown-B2MTZDnM.js +0 -1
- package/dist/assets/date-picker-zhJU-_kM.js +0 -1
- package/dist/assets/disabled-menu-item-C16xsaVs.js +0 -1
- package/dist/assets/drawer-oTqCOtsC.js +0 -3
- package/dist/assets/file-pen-line-CXv-Eye-.js +0 -1
- package/dist/assets/git-branch-V6-h6P9K.js +0 -1
- package/dist/assets/globe-CaUBIJU8.js +0 -1
- package/dist/assets/hash-B4MTXppl.js +0 -1
- package/dist/assets/hover-card-DEuucfxP.js +0 -1
- package/dist/assets/index-CE0k7Rdh.js +0 -312
- package/dist/assets/index-Cx3adT_u.css +0 -1
- package/dist/assets/life-buoy-BRndExxh.js +0 -1
- package/dist/assets/lucide-react-t7dCa4lv.js +0 -1
- package/dist/assets/monitor-Dg3HKTSE.js +0 -1
- package/dist/assets/package-3G45ARQh.js +0 -1
- package/dist/assets/pen-BYSSwjK4.js +0 -1
- package/dist/assets/pin-CMYagNhs.js +0 -1
- package/dist/assets/radio-group-BVun_Tmt.js +0 -1
- package/dist/assets/server-p0Sb0mKI.js +0 -1
- package/dist/assets/share-2-D-ZhCCq2.js +0 -1
- package/dist/assets/shield-x-Q7hAXWsG.js +0 -1
- package/dist/assets/step-selector-DHxgT2FL.js +0 -1
- package/dist/assets/text-align-start-6aYQqbX4.js +0 -1
- package/dist/assets/trash-DveAOiLF.js +0 -1
- package/dist/assets/useMockCrud-GY0KxHXr.js +0 -1
- package/dist/assets/user-check-CoGNBfIk.js +0 -1
- package/dist/assets/user-plus-Bad2xWIT.js +0 -1
- package/dist/index.html +0 -35
- package/dist/leadership/components/LeaderRow.d.ts +0 -9
|
@@ -22,9 +22,12 @@ Hook que extrai o alias do param de rota e valida contra `companies` do `useAuth
|
|
|
22
22
|
Retorna: `{ urlAlias, isAliasMismatch, isValidAlias, isMissing, matchedCompany }`
|
|
23
23
|
|
|
24
24
|
### `AliasRouteGuard`
|
|
25
|
-
Wrapper de rota com **
|
|
25
|
+
Wrapper de rota com **auto-detect de modo**:
|
|
26
26
|
|
|
27
|
-
|
|
27
|
+
- **Modo URL** (`:alias` presente na rota): comportamento padrão com 1 effect de decisão
|
|
28
|
+
- **Modo Legado** (sem `:alias` na rota): passthrough transparente, sem redirects
|
|
29
|
+
|
|
30
|
+
| Cenário (Modo URL) | Ação |
|
|
28
31
|
|---------|------|
|
|
29
32
|
| Alias ausente na URL | Redireciona para `/{aliasAtivo}/{path}` |
|
|
30
33
|
| Alias inválido | Redireciona para `/{aliasAtivo}/{path}` |
|
|
@@ -3,20 +3,38 @@ Updated: now
|
|
|
3
3
|
|
|
4
4
|
O padrão de Scroll Único evita barras de rolagem duplicadas na aplicação.
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
|------------|------------------|
|
|
8
|
-
| `AppLayout` | `overflow-hidden` - delega scroll para filhos |
|
|
9
|
-
| `BodyContent` | `h-full overflow-y-auto` - gerencia scroll da página |
|
|
10
|
-
| Custom | `h-full` + `ScrollArea` interno quando necessário |
|
|
6
|
+
## Cadeia de layout do AppLayout
|
|
11
7
|
|
|
12
|
-
|
|
8
|
+
```text
|
|
9
|
+
div.h-screen.overflow-hidden ← preso ao viewport, sem scroll
|
|
10
|
+
├─ header (sticky top-0) ← cabeçalho fixo
|
|
11
|
+
└─ div.sidebar-container.flex-1.overflow-hidden
|
|
12
|
+
├─ AppSidebar ← sidebar com scroll próprio
|
|
13
|
+
└─ main.flex-1.overflow-hidden
|
|
14
|
+
└─ div.flex-1.min-h-0.overflow-y-auto ← SCROLL ATIVO aqui
|
|
15
|
+
└─ BodyContent (h-full)
|
|
16
|
+
└─ ContentContainer (overflow-visible) ← delega scroll para cima
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
| Componente | Classes | Responsabilidade |
|
|
20
|
+
|------------|---------|------------------|
|
|
21
|
+
| `AppLayout` raiz | `h-screen overflow-hidden` | Prende layout ao viewport |
|
|
22
|
+
| Container de conteúdo | `flex-1 min-h-0 overflow-y-auto` | Gerencia scroll da página |
|
|
23
|
+
| `BodyContent` | `h-full` | Container flexível |
|
|
24
|
+
| `ContentContainer` | `overflow-visible` | Delega scroll para o pai |
|
|
25
|
+
|
|
26
|
+
**Regra**: Apenas UM nível da hierarquia deve ter scroll ativo — o `div.overflow-y-auto` dentro do `<main>`.
|
|
13
27
|
|
|
14
28
|
```tsx
|
|
15
|
-
// ❌ ERRADO - h-screen
|
|
16
|
-
<div className="h-screen overflow-auto">
|
|
29
|
+
// ❌ ERRADO - min-h-screen permite crescer além do viewport
|
|
30
|
+
<div className="min-h-screen overflow-auto">
|
|
17
31
|
|
|
18
|
-
// ✅ CORRETO - h-
|
|
19
|
-
<
|
|
20
|
-
|
|
21
|
-
|
|
32
|
+
// ✅ CORRETO - h-screen trava no viewport
|
|
33
|
+
<div className="h-screen overflow-hidden">
|
|
34
|
+
...
|
|
35
|
+
<div className="flex-1 min-h-0 overflow-y-auto">
|
|
36
|
+
<BodyContent>...</BodyContent>
|
|
37
|
+
</div>
|
|
22
38
|
```
|
|
39
|
+
|
|
40
|
+
**`min-h-0`** é essencial no container com `overflow-y-auto` — sem ele, flex items não encolhem abaixo do tamanho do conteúdo.
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { ActionPlanAttachment } from '../types';
|
|
2
|
+
interface ActionPlanAttachmentsTabProps {
|
|
3
|
+
attachments?: ActionPlanAttachment[];
|
|
4
|
+
onUpload?: (file: File) => Promise<any> | void;
|
|
5
|
+
onDelete?: (attachmentId: string) => Promise<any> | void;
|
|
6
|
+
onRename?: (attachmentId: string, newName: string) => Promise<any> | void;
|
|
7
|
+
onDownload?: (attachmentId: string) => Promise<any> | void;
|
|
8
|
+
onView?: (attachmentId: string) => Promise<any> | void;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Aba de Anexos do Plano de Ação
|
|
13
|
+
*
|
|
14
|
+
* Portado de FlcAttachmentsComponent (flc-attachments).
|
|
15
|
+
* Suporta upload, visualização, download, renomear e exclusão de arquivos.
|
|
16
|
+
*/
|
|
17
|
+
export declare function ActionPlanAttachmentsTab({ attachments, onUpload, onDelete, onRename, onDownload, onView, disabled, }: ActionPlanAttachmentsTabProps): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { ActionPlanComment } from '../types';
|
|
2
|
+
interface ActionPlanCommentsTabProps {
|
|
3
|
+
comments?: ActionPlanComment[];
|
|
4
|
+
currentUserId?: string;
|
|
5
|
+
onAdd?: (text: string) => Promise<any> | void;
|
|
6
|
+
onEdit?: (comment: ActionPlanComment) => Promise<any> | void;
|
|
7
|
+
onDelete?: (commentId: string) => Promise<any> | void;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
maxLength?: number;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Aba de Comentários do Plano de Ação
|
|
13
|
+
*
|
|
14
|
+
* Portado de FlcCommentsComponent (flc-comments).
|
|
15
|
+
* Suporta criação, edição e exclusão de comentários com avatar e timestamp.
|
|
16
|
+
*/
|
|
17
|
+
export declare function ActionPlanCommentsTab({ comments, currentUserId, onAdd, onEdit, onDelete, disabled, maxLength, }: ActionPlanCommentsTabProps): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { ActionPlanCost } from '../types';
|
|
2
|
+
interface ActionPlanCostTabProps {
|
|
3
|
+
costs?: ActionPlanCost[];
|
|
4
|
+
onAdd?: (cost: Omit<ActionPlanCost, 'id'>) => void;
|
|
5
|
+
onEdit?: (cost: ActionPlanCost) => void;
|
|
6
|
+
onDelete?: (costId: string) => void;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
}
|
|
9
|
+
export declare function ActionPlanCostTab({ costs, onAdd, onEdit, onDelete, disabled, }: ActionPlanCostTabProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { ActionPlan, ActionPlanPageProps } from '../types';
|
|
2
|
+
interface ActionPlanGeneralTabProps {
|
|
3
|
+
formData: Partial<ActionPlan>;
|
|
4
|
+
updateField: (field: keyof ActionPlan, value: any) => void;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
users?: ActionPlanPageProps['users'];
|
|
7
|
+
places?: ActionPlanPageProps['places'];
|
|
8
|
+
actionTypes?: ActionPlanPageProps['actionTypes'];
|
|
9
|
+
causes?: ActionPlanPageProps['causes'];
|
|
10
|
+
parentActions?: ActionPlanPageProps['parentActions'];
|
|
11
|
+
config?: ActionPlanPageProps['config'];
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Aba Geral do formulário de Plano de Ação
|
|
15
|
+
* Contém todos os campos principais configuráveis
|
|
16
|
+
*/
|
|
17
|
+
export declare function ActionPlanGeneralTab({ formData, updateField, disabled, users, places, actionTypes, causes, parentActions, config, }: ActionPlanGeneralTabProps): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { ActionPlanHistoryItem } from '../types';
|
|
2
|
+
interface ActionPlanHistoryTabProps {
|
|
3
|
+
history?: ActionPlanHistoryItem[];
|
|
4
|
+
isLoading?: boolean;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Aba de Histórico do Plano de Ação
|
|
8
|
+
*
|
|
9
|
+
* Portado de FlcHistoryComponent (flc-history).
|
|
10
|
+
* Exibe uma timeline de eventos do plano de ação.
|
|
11
|
+
*/
|
|
12
|
+
export declare function ActionPlanHistoryTab({ history, isLoading, }: ActionPlanHistoryTabProps): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { ActionPlanPageProps } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* ActionPlanPage — Componente orquestrador de página full para planos de ação
|
|
4
|
+
*
|
|
5
|
+
* Renderiza o formulário completo com tabs: Geral, Progresso, Predecessores, Custos,
|
|
6
|
+
* Anexos, Comentários e Histórico.
|
|
7
|
+
*
|
|
8
|
+
* O componente é agnóstico de backend — recebe todos os dados e callbacks via props.
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```tsx
|
|
12
|
+
* <ActionPlanPage
|
|
13
|
+
* actionPlan={actionPlan}
|
|
14
|
+
* config={{ enablePredecessors: true, enableCosts: true }}
|
|
15
|
+
* users={users}
|
|
16
|
+
* places={places}
|
|
17
|
+
* progress={progress}
|
|
18
|
+
* onSave={handleSave}
|
|
19
|
+
* onCancel={() => navigate(-1)}
|
|
20
|
+
* onChangeStatus={handleChangeStatus}
|
|
21
|
+
* onReportProgress={handleReportProgress}
|
|
22
|
+
* />
|
|
23
|
+
* ```
|
|
24
|
+
*/
|
|
25
|
+
export declare function ActionPlanPage(props: ActionPlanPageProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { ActionPlanPredecessor, ActionPlanOption } from '../types';
|
|
2
|
+
interface ActionPlanPredecessorsTabProps {
|
|
3
|
+
predecessors?: ActionPlanPredecessor[];
|
|
4
|
+
availablePredecessors?: ActionPlanOption[];
|
|
5
|
+
onAdd?: (predecessorId: string) => void;
|
|
6
|
+
onRemove?: (predecessorId: string) => void;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
}
|
|
9
|
+
export declare function ActionPlanPredecessorsTab({ predecessors, availablePredecessors, onAdd, onRemove, disabled, }: ActionPlanPredecessorsTabProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { ActionPlanReport } from '../types';
|
|
2
|
+
interface ActionPlanProgressDialogProps {
|
|
3
|
+
open: boolean;
|
|
4
|
+
onOpenChange: (open: boolean) => void;
|
|
5
|
+
report: ActionPlanReport | null;
|
|
6
|
+
onSave: (report: ActionPlanReport) => void;
|
|
7
|
+
isSubmitting?: boolean;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Dialog para editar um relatório de progresso existente
|
|
11
|
+
*/
|
|
12
|
+
export declare function ActionPlanProgressDialog({ open, onOpenChange, report, onSave, isSubmitting, }: ActionPlanProgressDialogProps): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ETaskPlanStatus } from '../types';
|
|
2
|
+
interface ActionPlanStatusBadgeProps {
|
|
3
|
+
status: ETaskPlanStatus;
|
|
4
|
+
labels?: Record<ETaskPlanStatus, string>;
|
|
5
|
+
className?: string;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Badge de status do plano de ação com cores dinâmicas
|
|
9
|
+
*/
|
|
10
|
+
export declare function ActionPlanStatusBadge({ status, labels, className }: ActionPlanStatusBadgeProps): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { ETaskPlanStatus, ETaskPlanPriority } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Cores de background por status
|
|
4
|
+
* Portado de FlcActionPlansService.getStatusColorById
|
|
5
|
+
*/
|
|
6
|
+
export declare const STATUS_COLORS: Record<ETaskPlanStatus, string>;
|
|
7
|
+
/**
|
|
8
|
+
* Cores de texto por status
|
|
9
|
+
*/
|
|
10
|
+
export declare const STATUS_TEXT_COLORS: Record<ETaskPlanStatus, string>;
|
|
11
|
+
/**
|
|
12
|
+
* Mapa de status para chave i18n / identificador
|
|
13
|
+
* Portado de FlcActionPlansService.getTaskPlanStatusMap
|
|
14
|
+
*/
|
|
15
|
+
export declare const STATUS_MAP: Record<ETaskPlanStatus, string>;
|
|
16
|
+
/**
|
|
17
|
+
* Labels padrão para status (pt-BR)
|
|
18
|
+
*/
|
|
19
|
+
export declare const STATUS_LABELS: Record<ETaskPlanStatus, string>;
|
|
20
|
+
/**
|
|
21
|
+
* Tipos de ação padrão
|
|
22
|
+
*/
|
|
23
|
+
export declare const DEFAULT_ACTION_TYPES: {
|
|
24
|
+
id: string;
|
|
25
|
+
label: string;
|
|
26
|
+
}[];
|
|
27
|
+
/**
|
|
28
|
+
* Prioridades padrão
|
|
29
|
+
*/
|
|
30
|
+
export declare const PRIORITIES: {
|
|
31
|
+
id: ETaskPlanPriority;
|
|
32
|
+
label: string;
|
|
33
|
+
color: string;
|
|
34
|
+
}[];
|
|
35
|
+
/**
|
|
36
|
+
* Status considerados "fechados" (não editáveis)
|
|
37
|
+
*/
|
|
38
|
+
export declare const CLOSED_STATUSES: ETaskPlanStatus[];
|
|
39
|
+
/**
|
|
40
|
+
* Status que permitem reporte de progresso
|
|
41
|
+
*/
|
|
42
|
+
export declare const PROGRESS_ALLOWED_STATUSES: ETaskPlanStatus[];
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { ActionPlan, ActionPlanPageProps, ETaskPlanStatus } from '../types';
|
|
2
|
+
export declare function useActionPlan(props: ActionPlanPageProps): {
|
|
3
|
+
formData: Partial<ActionPlan>;
|
|
4
|
+
isLoading: boolean;
|
|
5
|
+
isSaving: boolean;
|
|
6
|
+
activeTab: string;
|
|
7
|
+
isFormDisabled: boolean;
|
|
8
|
+
updateField: (field: keyof ActionPlan, value: any) => void;
|
|
9
|
+
setActiveTab: (tab: string) => void;
|
|
10
|
+
save: () => Promise<void>;
|
|
11
|
+
changeStatus: (newStatus: ETaskPlanStatus) => Promise<void>;
|
|
12
|
+
remove: () => Promise<void>;
|
|
13
|
+
cancel: () => void;
|
|
14
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { ActionPlanReport, ActionPlanPageProps } from '../types';
|
|
2
|
+
export declare function useActionPlanProgress(props: ActionPlanPageProps): {
|
|
3
|
+
progress: import("..").ActionPlanProgress;
|
|
4
|
+
canReportProgress: boolean;
|
|
5
|
+
isSubmitting: boolean;
|
|
6
|
+
editingReport: ActionPlanReport;
|
|
7
|
+
setEditingReport: import("react").Dispatch<import("react").SetStateAction<ActionPlanReport>>;
|
|
8
|
+
reportProgress: (data: {
|
|
9
|
+
percentProgress: number;
|
|
10
|
+
timeProgress: string;
|
|
11
|
+
comments?: string;
|
|
12
|
+
}) => Promise<void>;
|
|
13
|
+
editProgress: (report: ActionPlanReport) => Promise<void>;
|
|
14
|
+
deleteProgress: (reportId: string) => Promise<void>;
|
|
15
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export { ActionPlanPage } from './components/ActionPlanPage';
|
|
2
|
+
export { ActionPlanGeneralTab } from './components/ActionPlanGeneralTab';
|
|
3
|
+
export { ActionPlanProgressTab } from './components/ActionPlanProgressTab';
|
|
4
|
+
export { ActionPlanPredecessorsTab } from './components/ActionPlanPredecessorsTab';
|
|
5
|
+
export { ActionPlanCostTab } from './components/ActionPlanCostTab';
|
|
6
|
+
export { ActionPlanCommentsTab } from './components/ActionPlanCommentsTab';
|
|
7
|
+
export { ActionPlanHistoryTab } from './components/ActionPlanHistoryTab';
|
|
8
|
+
export { ActionPlanAttachmentsTab } from './components/ActionPlanAttachmentsTab';
|
|
9
|
+
export { ActionPlanStatusBadge } from './components/ActionPlanStatusBadge';
|
|
10
|
+
export { ActionPlanProgressDialog } from './components/ActionPlanProgressDialog';
|
|
11
|
+
export { useActionPlan } from './hooks/useActionPlan';
|
|
12
|
+
export { useActionPlanProgress } from './hooks/useActionPlanProgress';
|
|
13
|
+
export * from './types';
|
|
14
|
+
export * from './constants';
|
|
15
|
+
export { formatTime, formatTimeProgress, getProgressColor } from './utils/formatTime';
|
|
@@ -0,0 +1,353 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Status do plano de ação
|
|
3
|
+
* Portado de EQexTaskPlanStatus / EFlcTaskPlanStatus
|
|
4
|
+
*/
|
|
5
|
+
export declare enum ETaskPlanStatus {
|
|
6
|
+
waitingStart = 1,
|
|
7
|
+
running = 2,
|
|
8
|
+
effectivenessCheck = 3,
|
|
9
|
+
done = 4,
|
|
10
|
+
suspended = 5,
|
|
11
|
+
canceled = 6
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Prioridade do plano de ação
|
|
15
|
+
* Portado de EQexTaskPlanPriorityType
|
|
16
|
+
*/
|
|
17
|
+
export declare enum ETaskPlanPriority {
|
|
18
|
+
low = 0,
|
|
19
|
+
medium = 1,
|
|
20
|
+
high = 2
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Tipo de associação do plano de ação
|
|
24
|
+
* Portado de EQexTaskPlanAssociationType
|
|
25
|
+
*/
|
|
26
|
+
export declare enum ETaskPlanAssociationType {
|
|
27
|
+
plan = 2,
|
|
28
|
+
occurrence = 3,
|
|
29
|
+
risk = 4,
|
|
30
|
+
decisions = 5,
|
|
31
|
+
audit = 6,
|
|
32
|
+
strategyExtension = 7,
|
|
33
|
+
standardization = 8,
|
|
34
|
+
supplier = 9,
|
|
35
|
+
auditItems = 10
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Tipo de progresso
|
|
39
|
+
* Portado de EQexTaskPlanTypeProgress
|
|
40
|
+
*/
|
|
41
|
+
export declare enum ETaskPlanTypeProgress {
|
|
42
|
+
currentProgress = 1,
|
|
43
|
+
cumulativeProgress = 2
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Relatório individual de progresso
|
|
47
|
+
*/
|
|
48
|
+
export interface ActionPlanReport {
|
|
49
|
+
id: string;
|
|
50
|
+
name?: string;
|
|
51
|
+
code?: string;
|
|
52
|
+
percentProgress: number;
|
|
53
|
+
timeProgress: string;
|
|
54
|
+
userId: string;
|
|
55
|
+
userPhotoUrl?: string;
|
|
56
|
+
userName: string;
|
|
57
|
+
userType?: number;
|
|
58
|
+
date: Date | string;
|
|
59
|
+
lastModified?: Date | string;
|
|
60
|
+
status?: ETaskPlanStatus;
|
|
61
|
+
typeProgress?: number;
|
|
62
|
+
comments?: string;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Dados de progresso do plano de ação
|
|
66
|
+
*/
|
|
67
|
+
export interface ActionPlanProgress {
|
|
68
|
+
id: string;
|
|
69
|
+
percentProgress: number;
|
|
70
|
+
timeProgress: string;
|
|
71
|
+
hasChildren: boolean;
|
|
72
|
+
idResponsibleUser: string;
|
|
73
|
+
status: ETaskPlanStatus;
|
|
74
|
+
reports: ActionPlanReport[];
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Plano de ação principal
|
|
78
|
+
*/
|
|
79
|
+
export interface ActionPlan {
|
|
80
|
+
id: string;
|
|
81
|
+
code?: string;
|
|
82
|
+
name: string;
|
|
83
|
+
responsibleId?: string;
|
|
84
|
+
responsibleName?: string;
|
|
85
|
+
checkerId?: string;
|
|
86
|
+
checkerName?: string;
|
|
87
|
+
placeId?: string;
|
|
88
|
+
placeName?: string;
|
|
89
|
+
typeId?: string;
|
|
90
|
+
typeName?: string;
|
|
91
|
+
priorityType?: ETaskPlanPriority;
|
|
92
|
+
parentId?: string;
|
|
93
|
+
parentName?: string;
|
|
94
|
+
startDate?: Date | string | null;
|
|
95
|
+
endDate?: Date | string | null;
|
|
96
|
+
duration?: number;
|
|
97
|
+
estimatedCost?: number;
|
|
98
|
+
causeId?: string;
|
|
99
|
+
causeName?: string;
|
|
100
|
+
description?: string;
|
|
101
|
+
justification?: string;
|
|
102
|
+
statusId: ETaskPlanStatus;
|
|
103
|
+
percentProgress?: number;
|
|
104
|
+
progress?: ActionPlanProgress;
|
|
105
|
+
associationType?: ETaskPlanAssociationType;
|
|
106
|
+
associationId?: string;
|
|
107
|
+
actionSource?: string;
|
|
108
|
+
phaseId?: string;
|
|
109
|
+
createdAt?: Date | string;
|
|
110
|
+
updatedAt?: Date | string;
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* Configuração de campos obrigatórios/visíveis
|
|
114
|
+
* Portado de IQexRequiredFieldsPlanTask
|
|
115
|
+
*/
|
|
116
|
+
export interface ActionPlanRequiredFields {
|
|
117
|
+
responsibleWho?: boolean;
|
|
118
|
+
checkerWho?: boolean;
|
|
119
|
+
place?: boolean;
|
|
120
|
+
planType?: boolean;
|
|
121
|
+
startDate?: boolean;
|
|
122
|
+
endDate?: boolean;
|
|
123
|
+
estimatedCost?: boolean;
|
|
124
|
+
description?: boolean;
|
|
125
|
+
justification?: boolean;
|
|
126
|
+
priority?: boolean;
|
|
127
|
+
responsibleWhoVisible?: boolean;
|
|
128
|
+
checkerWhoVisible?: boolean;
|
|
129
|
+
placeVisible?: boolean;
|
|
130
|
+
planTypeVisible?: boolean;
|
|
131
|
+
startDateVisible?: boolean;
|
|
132
|
+
endDateVisible?: boolean;
|
|
133
|
+
estimatedCostVisible?: boolean;
|
|
134
|
+
descriptionVisible?: boolean;
|
|
135
|
+
justificationVisible?: boolean;
|
|
136
|
+
priorityVisible?: boolean;
|
|
137
|
+
percentProgress?: boolean;
|
|
138
|
+
duration?: boolean;
|
|
139
|
+
descriptionProgress?: boolean;
|
|
140
|
+
value?: boolean;
|
|
141
|
+
descriptionCost?: boolean;
|
|
142
|
+
}
|
|
143
|
+
/**
|
|
144
|
+
* Permissões para planos de ação
|
|
145
|
+
* Portado de IQexPlansPermissions
|
|
146
|
+
*/
|
|
147
|
+
export interface ActionPlanPermissions {
|
|
148
|
+
canCreateActionPlans: boolean;
|
|
149
|
+
canEditAllActionPlanOpen: boolean;
|
|
150
|
+
canEditActionPlanOpenOnlyMyPlace?: boolean;
|
|
151
|
+
canEditAllActionPlanClosed: boolean;
|
|
152
|
+
canEditActionPlanClosedOnlyMyPlace?: boolean;
|
|
153
|
+
canEditActionPlanOpenResponsibleChecker: boolean;
|
|
154
|
+
canEditActionPlanClosedResponsibleChecker: boolean;
|
|
155
|
+
canChangeStatusAllActionPlanOpen?: boolean;
|
|
156
|
+
canChangeStatusActionPlanOpenOnlyMyPlace?: boolean;
|
|
157
|
+
canChangeStatusAllActionPlanClosed?: boolean;
|
|
158
|
+
canChangeStatusActionPlanClosedOnlyMyPlace?: boolean;
|
|
159
|
+
canChangeStatusActionPlanOpenResponsibleChecker?: boolean;
|
|
160
|
+
canChangeStatusActionPlanClosedResponsibleChecker?: boolean;
|
|
161
|
+
canManageStatusAndReportAndCostAllActionPlanOpen?: boolean;
|
|
162
|
+
canManageStatusAndReportAndCostAllActionPlanClosed?: boolean;
|
|
163
|
+
canManageStatusAndReportAndCostPlanOpenResponsibleChecker?: boolean;
|
|
164
|
+
canManageStatusAndReportAndCostPlanClosedResponsibleChecker?: boolean;
|
|
165
|
+
canChangePhaseStatus?: boolean;
|
|
166
|
+
canRemove: boolean;
|
|
167
|
+
canRemoveOnlyMyPlace?: boolean;
|
|
168
|
+
isOnlyIssuer: boolean;
|
|
169
|
+
isTeam?: boolean;
|
|
170
|
+
}
|
|
171
|
+
/**
|
|
172
|
+
* Configuração do formulário de plano de ação
|
|
173
|
+
*/
|
|
174
|
+
export interface ActionPlanFormConfig {
|
|
175
|
+
isCheckerRequired?: boolean;
|
|
176
|
+
allowCheckerResponsibleEquals?: boolean;
|
|
177
|
+
requiredFields?: ActionPlanRequiredFields;
|
|
178
|
+
hiddenFields?: string[];
|
|
179
|
+
visibleFields?: string[];
|
|
180
|
+
disableFields?: boolean;
|
|
181
|
+
allowTaskPlan?: boolean;
|
|
182
|
+
mandatoryAttachment?: boolean;
|
|
183
|
+
hasComments?: boolean;
|
|
184
|
+
typeProgress?: ETaskPlanTypeProgress;
|
|
185
|
+
permissions?: ActionPlanPermissions;
|
|
186
|
+
/** Tabs extras (além de Geral e Progresso) habilitadas */
|
|
187
|
+
enablePredecessors?: boolean;
|
|
188
|
+
enableCosts?: boolean;
|
|
189
|
+
enableAttachments?: boolean;
|
|
190
|
+
enableComments?: boolean;
|
|
191
|
+
enableHistory?: boolean;
|
|
192
|
+
}
|
|
193
|
+
/**
|
|
194
|
+
* Item de custo do plano de ação
|
|
195
|
+
*/
|
|
196
|
+
export interface ActionPlanCost {
|
|
197
|
+
id: string;
|
|
198
|
+
description: string;
|
|
199
|
+
value: number;
|
|
200
|
+
date?: Date | string;
|
|
201
|
+
userId?: string;
|
|
202
|
+
userName?: string;
|
|
203
|
+
}
|
|
204
|
+
/**
|
|
205
|
+
* Item predecessor
|
|
206
|
+
*/
|
|
207
|
+
export interface ActionPlanPredecessor {
|
|
208
|
+
id: string;
|
|
209
|
+
actionPlanId: string;
|
|
210
|
+
predecessorId: string;
|
|
211
|
+
predecessorName: string;
|
|
212
|
+
predecessorCode?: string;
|
|
213
|
+
predecessorStatus?: ETaskPlanStatus;
|
|
214
|
+
predecessorPercentProgress?: number;
|
|
215
|
+
}
|
|
216
|
+
/**
|
|
217
|
+
* Opção genérica para selects (tipo, causa, etc.)
|
|
218
|
+
*/
|
|
219
|
+
export interface ActionPlanOption {
|
|
220
|
+
id: string;
|
|
221
|
+
label: string;
|
|
222
|
+
}
|
|
223
|
+
/**
|
|
224
|
+
* Opção de usuário para combobox
|
|
225
|
+
*/
|
|
226
|
+
export interface ActionPlanUser {
|
|
227
|
+
id: string;
|
|
228
|
+
name: string;
|
|
229
|
+
photoUrl?: string;
|
|
230
|
+
email?: string;
|
|
231
|
+
}
|
|
232
|
+
/**
|
|
233
|
+
* Opção de local para combo tree
|
|
234
|
+
*/
|
|
235
|
+
export interface ActionPlanPlace {
|
|
236
|
+
id: string;
|
|
237
|
+
name: string;
|
|
238
|
+
parentId?: string | null;
|
|
239
|
+
children?: ActionPlanPlace[];
|
|
240
|
+
}
|
|
241
|
+
/**
|
|
242
|
+
* Comentário individual
|
|
243
|
+
* Portado de IFlcComment
|
|
244
|
+
*/
|
|
245
|
+
export interface ActionPlanComment {
|
|
246
|
+
id: string;
|
|
247
|
+
text: string;
|
|
248
|
+
stringText?: string;
|
|
249
|
+
userId: string;
|
|
250
|
+
userName: string;
|
|
251
|
+
userEmail?: string;
|
|
252
|
+
userPhotoUrl?: string;
|
|
253
|
+
userType?: number;
|
|
254
|
+
dateCreation: Date | string;
|
|
255
|
+
dateEdited?: Date | string | null;
|
|
256
|
+
isEditing?: boolean;
|
|
257
|
+
}
|
|
258
|
+
/**
|
|
259
|
+
* Item de histórico / audit trail
|
|
260
|
+
* Portado de IFlcTrail
|
|
261
|
+
*/
|
|
262
|
+
export interface ActionPlanHistoryItem {
|
|
263
|
+
id: string;
|
|
264
|
+
eventName: string;
|
|
265
|
+
eventDescription?: string;
|
|
266
|
+
translateEvent?: string;
|
|
267
|
+
icon?: string;
|
|
268
|
+
userName: string;
|
|
269
|
+
userEmail?: string;
|
|
270
|
+
userPhotoUrl?: string;
|
|
271
|
+
date: Date | string;
|
|
272
|
+
isMobileRequest?: boolean;
|
|
273
|
+
}
|
|
274
|
+
/**
|
|
275
|
+
* Status do item de anexo
|
|
276
|
+
*/
|
|
277
|
+
export declare enum EAttachmentItemStatus {
|
|
278
|
+
uploading = "uploading",
|
|
279
|
+
waiting = "waiting",
|
|
280
|
+
done = "done",
|
|
281
|
+
error = "error",
|
|
282
|
+
canceled = "canceled",
|
|
283
|
+
duplicateItem = "duplicateItem"
|
|
284
|
+
}
|
|
285
|
+
/**
|
|
286
|
+
* Item de anexo
|
|
287
|
+
* Portado de IFlcAttachmentItem
|
|
288
|
+
*/
|
|
289
|
+
export interface ActionPlanAttachment {
|
|
290
|
+
id: string;
|
|
291
|
+
name: string;
|
|
292
|
+
extension: string;
|
|
293
|
+
size: number;
|
|
294
|
+
status: EAttachmentItemStatus;
|
|
295
|
+
progress?: number;
|
|
296
|
+
file?: File;
|
|
297
|
+
url?: string;
|
|
298
|
+
}
|
|
299
|
+
/**
|
|
300
|
+
* Props do componente ActionPlanPage
|
|
301
|
+
*/
|
|
302
|
+
export interface ActionPlanPageProps {
|
|
303
|
+
/** Dados do plano de ação (null/undefined para novo) */
|
|
304
|
+
actionPlan?: ActionPlan | null;
|
|
305
|
+
/** Se é um novo plano */
|
|
306
|
+
isNew?: boolean;
|
|
307
|
+
/** Configuração do formulário */
|
|
308
|
+
config?: ActionPlanFormConfig;
|
|
309
|
+
/** Loading state */
|
|
310
|
+
isLoading?: boolean;
|
|
311
|
+
users?: ActionPlanUser[];
|
|
312
|
+
places?: ActionPlanPlace[];
|
|
313
|
+
actionTypes?: ActionPlanOption[];
|
|
314
|
+
causes?: ActionPlanOption[];
|
|
315
|
+
/** Lista de ações para "Pertence a" (parentId) */
|
|
316
|
+
parentActions?: ActionPlanOption[];
|
|
317
|
+
progress?: ActionPlanProgress;
|
|
318
|
+
predecessors?: ActionPlanPredecessor[];
|
|
319
|
+
availablePredecessors?: ActionPlanOption[];
|
|
320
|
+
costs?: ActionPlanCost[];
|
|
321
|
+
comments?: ActionPlanComment[];
|
|
322
|
+
history?: ActionPlanHistoryItem[];
|
|
323
|
+
attachments?: ActionPlanAttachment[];
|
|
324
|
+
attachmentsSlot?: React.ReactNode;
|
|
325
|
+
commentsSlot?: React.ReactNode;
|
|
326
|
+
historySlot?: React.ReactNode;
|
|
327
|
+
onSave?: (data: Partial<ActionPlan>) => Promise<any> | void;
|
|
328
|
+
onCancel?: () => void;
|
|
329
|
+
onDelete?: (id: string) => Promise<any> | void;
|
|
330
|
+
onChangeStatus?: (id: string, status: ETaskPlanStatus) => Promise<any> | void;
|
|
331
|
+
onReportProgress?: (data: {
|
|
332
|
+
id: string;
|
|
333
|
+
percentProgress: number;
|
|
334
|
+
timeProgress: string;
|
|
335
|
+
comments?: string;
|
|
336
|
+
conclude?: boolean;
|
|
337
|
+
}) => Promise<any> | void;
|
|
338
|
+
onEditProgress?: (report: ActionPlanReport) => Promise<any> | void;
|
|
339
|
+
onDeleteProgress?: (reportId: string) => Promise<any> | void;
|
|
340
|
+
onAddPredecessor?: (predecessorId: string) => Promise<any> | void;
|
|
341
|
+
onRemovePredecessor?: (predecessorId: string) => Promise<any> | void;
|
|
342
|
+
onAddCost?: (cost: Omit<ActionPlanCost, 'id'>) => Promise<any> | void;
|
|
343
|
+
onEditCost?: (cost: ActionPlanCost) => Promise<any> | void;
|
|
344
|
+
onDeleteCost?: (costId: string) => Promise<any> | void;
|
|
345
|
+
onAddComment?: (text: string) => Promise<any> | void;
|
|
346
|
+
onEditComment?: (comment: ActionPlanComment) => Promise<any> | void;
|
|
347
|
+
onDeleteComment?: (commentId: string) => Promise<any> | void;
|
|
348
|
+
onUploadAttachment?: (file: File) => Promise<any> | void;
|
|
349
|
+
onDeleteAttachment?: (attachmentId: string) => Promise<any> | void;
|
|
350
|
+
onRenameAttachment?: (attachmentId: string, newName: string) => Promise<any> | void;
|
|
351
|
+
onDownloadAttachment?: (attachmentId: string) => Promise<any> | void;
|
|
352
|
+
onViewAttachment?: (attachmentId: string) => Promise<any> | void;
|
|
353
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Formata string de tempo para HH:MM
|
|
3
|
+
* Portado de FlcActionPlansService.formatTimeProgress
|
|
4
|
+
*/
|
|
5
|
+
export declare function formatTimeProgress(valueTimeProgress: string | undefined): string;
|
|
6
|
+
/**
|
|
7
|
+
* Formata valor numérico de tempo para HH:MM
|
|
8
|
+
* Portado de FlcActionPlansService.formatTime
|
|
9
|
+
*/
|
|
10
|
+
export declare function formatTime(value: string | null | undefined): string;
|
|
11
|
+
/**
|
|
12
|
+
* Cor dinâmica da barra de progresso
|
|
13
|
+
* Portado de FlcActionPlansProgressComponent.dynamicColor
|
|
14
|
+
*/
|
|
15
|
+
export declare function getProgressColor(value: number): string;
|