@lambda-development/erp-core 1.2.3 → 1.3.1

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.
@@ -0,0 +1,19 @@
1
+ export interface RecordNote {
2
+ id: string;
3
+ body: string;
4
+ author_name: string;
5
+ created_at: string;
6
+ updated_at: string;
7
+ edited: boolean;
8
+ can_edit: boolean;
9
+ can_delete: boolean;
10
+ }
11
+ /** Header shortcut: "3 internal notes" — jumps to the card at the page end. */
12
+ export declare function RecordNotesLink({ recordType, recordId }: {
13
+ recordType: string;
14
+ recordId?: string;
15
+ }): import("react/jsx-runtime").JSX.Element | null;
16
+ export declare function RecordNotes({ recordType, recordId }: {
17
+ recordType: string;
18
+ recordId: string;
19
+ }): import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1,9 @@
1
+ export declare function SaveButton({ dirty, saving, isNew, disabled, onClick, }: {
2
+ dirty: boolean;
3
+ saving: boolean;
4
+ /** A record that doesn't exist yet can always be saved. */
5
+ isNew?: boolean;
6
+ /** Extra reasons the save can't run (e.g. missing required fields). */
7
+ disabled?: boolean;
8
+ onClick: () => void;
9
+ }): import("react/jsx-runtime").JSX.Element;
@@ -5,6 +5,11 @@ declare const _default: {
5
5
  "common": {
6
6
  "save": "Speichern",
7
7
  "saving": "Speichern...",
8
+ "saved": "Gespeichert",
9
+ "unsavedTitle": "Ohne Speichern verlassen?",
10
+ "unsavedBody": "Ihre Änderungen auf dieser Seite sind nicht gespeichert und gehen verloren.",
11
+ "unsavedLeave": "Änderungen verwerfen",
12
+ "unsavedStay": "Weiter bearbeiten",
8
13
  "submit": "Buchen",
9
14
  "cancel": "Abbrechen",
10
15
  "cancelDoc": "Stornieren",
@@ -648,7 +653,8 @@ declare const _default: {
648
653
  "To": "Bis",
649
654
  "Purpose": "Zweck",
650
655
  "Purchase Date": "Kaufdatum",
651
- "Notes": "Notizen"
656
+ "Notes": "Notizen",
657
+ "Printed notes / terms": "Gedruckte Notizen / Konditionen"
652
658
  },
653
659
  "tables": {
654
660
  "items": "Positionen",
@@ -863,7 +869,7 @@ declare const _default: {
863
869
  },
864
870
  "notesMarkup": {
865
871
  "title": "Formatierungshilfe",
866
- "intro": "Der Text unter Notizen / Konditionen unterstützt eine einfache Formatierung im PDF:",
872
+ "intro": "Der Text unter Gedruckte Notizen / Konditionen unterstützt eine einfache Formatierung im PDF:",
867
873
  "heading": "fette Überschrift",
868
874
  "emphasis": "kursiv / fett",
869
875
  "rule": "horizontale Trennlinie",
@@ -1010,6 +1016,19 @@ declare const _default: {
1010
1016
  "markRead": "Als gelesen markieren",
1011
1017
  "previous": "Zurück",
1012
1018
  "next": "Weiter"
1019
+ },
1020
+ "recordNotes": {
1021
+ "title": "Interne Notizen",
1022
+ "private": "Nur für Ihr Team · wird nie gedruckt",
1023
+ "add": "Notiz hinzufügen",
1024
+ "placeholder": "Interne Notiz schreiben … mit @ jemanden aus dem Team benachrichtigen",
1025
+ "save": "Notiz speichern",
1026
+ "empty": "Noch keine internen Notizen.",
1027
+ "edited": "bearbeitet",
1028
+ "older": "Ältere Notizen anzeigen",
1029
+ "printedBadge": "Erscheint auf dem PDF",
1030
+ "count_one": "{{count}} interne Notiz",
1031
+ "count_other": "{{count}} interne Notizen"
1013
1032
  }
1014
1033
  }
1015
1034
  ;
@@ -5,6 +5,11 @@ declare const _default: {
5
5
  "common": {
6
6
  "save": "Save",
7
7
  "saving": "Saving...",
8
+ "saved": "Saved",
9
+ "unsavedTitle": "Leave without saving?",
10
+ "unsavedBody": "Your changes on this page have not been saved and will be lost.",
11
+ "unsavedLeave": "Discard changes",
12
+ "unsavedStay": "Keep editing",
8
13
  "submit": "Submit",
9
14
  "cancel": "Cancel",
10
15
  "cancelDoc": "Cancel",
@@ -690,7 +695,8 @@ declare const _default: {
690
695
  "To": "To",
691
696
  "Purpose": "Purpose",
692
697
  "Purchase Date": "Purchase Date",
693
- "Notes": "Notes"
698
+ "Notes": "Notes",
699
+ "Printed notes / terms": "Printed notes / terms"
694
700
  },
695
701
  "tables": {
696
702
  "accounts": "accounts",
@@ -863,7 +869,7 @@ declare const _default: {
863
869
  },
864
870
  "notesMarkup": {
865
871
  "title": "Formatting help",
866
- "intro": "The Notes / Terms text supports light formatting on the PDF:",
872
+ "intro": "The printed notes / terms text supports light formatting on the PDF:",
867
873
  "heading": "bold heading",
868
874
  "emphasis": "italic / bold",
869
875
  "rule": "horizontal divider line",
@@ -1010,6 +1016,19 @@ declare const _default: {
1010
1016
  "markRead": "Mark read",
1011
1017
  "previous": "Previous",
1012
1018
  "next": "Next"
1019
+ },
1020
+ "recordNotes": {
1021
+ "title": "Internal notes",
1022
+ "private": "Private to your team · never printed",
1023
+ "add": "Add note",
1024
+ "placeholder": "Write an internal note… type @ to notify a colleague",
1025
+ "save": "Save note",
1026
+ "empty": "No internal notes yet.",
1027
+ "edited": "edited",
1028
+ "older": "Show older notes",
1029
+ "printedBadge": "Printed on the PDF",
1030
+ "count_one": "{{count}} internal note",
1031
+ "count_other": "{{count}} internal notes"
1013
1032
  }
1014
1033
  }
1015
1034
  ;
@@ -5,6 +5,11 @@ declare const _default: {
5
5
  "common": {
6
6
  "save": "Enregistrer",
7
7
  "saving": "Enregistrement...",
8
+ "saved": "Enregistré",
9
+ "unsavedTitle": "Quitter sans enregistrer ?",
10
+ "unsavedBody": "Vos modifications sur cette page ne sont pas enregistrées et seront perdues.",
11
+ "unsavedLeave": "Abandonner les modifications",
12
+ "unsavedStay": "Continuer la modification",
8
13
  "submit": "Valider",
9
14
  "cancel": "Annuler",
10
15
  "cancelDoc": "Annuler",
@@ -648,7 +653,8 @@ declare const _default: {
648
653
  "To": "Au",
649
654
  "Purpose": "Objet",
650
655
  "Purchase Date": "Date d'achat",
651
- "Notes": "Notes"
656
+ "Notes": "Notes",
657
+ "Printed notes / terms": "Notes / conditions imprimées"
652
658
  },
653
659
  "tables": {
654
660
  "items": "Lignes",
@@ -863,7 +869,7 @@ declare const _default: {
863
869
  },
864
870
  "notesMarkup": {
865
871
  "title": "Aide au formatage",
866
- "intro": "Le texte des Notes / Conditions prend en charge une mise en forme légère sur le PDF :",
872
+ "intro": "Le texte des notes / conditions imprimées prend en charge une mise en forme légère sur le PDF :",
867
873
  "heading": "titre en gras",
868
874
  "emphasis": "italique / gras",
869
875
  "rule": "ligne de séparation horizontale",
@@ -1010,6 +1016,19 @@ declare const _default: {
1010
1016
  "markRead": "Marquer comme lue",
1011
1017
  "previous": "Précédent",
1012
1018
  "next": "Suivant"
1019
+ },
1020
+ "recordNotes": {
1021
+ "title": "Notes internes",
1022
+ "private": "Réservées à votre équipe · jamais imprimées",
1023
+ "add": "Ajouter une note",
1024
+ "placeholder": "Écrire une note interne… tapez @ pour prévenir un collègue",
1025
+ "save": "Enregistrer la note",
1026
+ "empty": "Aucune note interne pour l’instant.",
1027
+ "edited": "modifiée",
1028
+ "older": "Afficher les notes plus anciennes",
1029
+ "printedBadge": "Imprimé sur le PDF",
1030
+ "count_one": "{{count}} note interne",
1031
+ "count_other": "{{count}} notes internes"
1013
1032
  }
1014
1033
  }
1015
1034
  ;
package/dist/index.d.ts CHANGED
@@ -18,6 +18,8 @@ export type { BootstrapOptions } from './bootstrap';
18
18
  export { AppShell } from './components/layout/app-shell';
19
19
  export { MentionEditor, mentionAction } from './components/mentions';
20
20
  export type { MentionUser } from './components/mentions';
21
+ export { RecordNotes, RecordNotesLink } from './components/record-notes';
22
+ export type { RecordNote } from './components/record-notes';
21
23
  export { buildRoutes, registerRoute } from './routes';
22
24
  export { registerDoctype, getDoctypeConfig, getAllDoctypeConfigs, } from './lib/doctypes';
23
25
  export type { DoctypeConfig, FieldDef, ChildTableDef, ConversionDef, } from './lib/doctypes';
@@ -28,6 +30,8 @@ export type { NavGroup, NavItem } from './lib/nav';
28
30
  export { registerComponent, getComponent } from './lib/component-registry';
29
31
  export { DialogProvider, useConfirm, usePrompt } from './components/ui/dialog';
30
32
  export { ConfirmButton } from './components/ui/confirm-button';
33
+ export { SaveButton } from './components/ui/save-button';
34
+ export { useUnsavedChanges } from './lib/use-unsaved-changes';
31
35
  export { DocPager } from './components/document/doc-pager';
32
36
  export { setListContext, getListContext } from './lib/doc-list-context';
33
37
  export type { ListContext } from './lib/doc-list-context';