15 Commits

Author SHA1 Message Date
chaim 21cf570cbc feat!: v2.0.0 — replace LegalAid entity with direct JSON-to-DOCX generation
Breaking change: LegalAid entity removed entirely. Reports are now
generated directly from JSON params to DOCX without any intermediate
entity or database table.

New:
- DirectAccessReportGenerator: takes JSON from Shira, generates DOCX
  via PHPWord, attaches as Document to Case (single PHP file)
- AfterUninstall: full cleanup script (drops tables, columns, templates)
- docs/examples/entity-reference-legalaid.md: full reference for future
  entity creation

Removed:
- LegalAid entity (entityDefs, scopes, clientDefs, layouts, i18n, controller)
- GenerateInitialReport tool (replaced by DirectAccessReportGenerator)
- Custom JS field view for cLegalAidNumber
- update_legal_aid and get_legal_aid tools
- Case link to legalAids

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
v2.0.0
2026-04-07 19:12:28 +00:00
chaim 4c0586cce8 feat: remove DirectAccessReport, keep only LegalAid entity
Complete removal of the old DirectAccessReport entity and all related
files. LegalAid is now the sole entity for legal aid data management.

- Remove DirectAccessReport: controller, service, hooks, entity defs,
  scopes, clientDefs, layouts, i18n (all 3 locales)
- Remove directAccessReports link from Case
- Rewrite GenerateInitialReport tool to work directly with LegalAid
- Clean up Case i18n (remove old field translations)
- Bump version to 1.5.0

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
v1.5.0
2026-04-07 17:44:24 +00:00
chaim b3c219aa57 feat: add LegalAid entity — centralized legal aid data management
Replace scattered Case fields with a dedicated LegalAid entity that
holds all legal aid data (aid type, urgency, client contact, proceeding
details, legal analysis, recommendation, etc.). DirectAccessReport now
pulls from LegalAid for DOCX generation with automatic checkbox mapping.

- Add LegalAid entity with controller, layouts, i18n (he/en/fa)
- Remove cAidType, cUrgencyLevel, cAppointmentDate, cFilingDeadline,
  cLegalAidType from Case (migrated to LegalAid)
- Add legalAidType field to LegalAid (DirectAccess/Regular/Duty)
- Update DirectAccessReportService to use LegalAid entity
- Add update_legal_aid and get_legal_aid SmartAssistant tools
- Fix AfterInstall template entityType to LegalAid

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
v1.4.1
2026-04-07 15:27:23 +00:00
chaim 31e6359df4 fix: update direct access report template
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-07 10:41:55 +00:00
chaim d4008569ca fix: add missing DirectAccessReport controller class
EspoCRM requires an explicit controller class for every entity — without
it the API returns 404. Added a simple Record controller for DirectAccessReport.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
v1.3.2
2026-04-06 22:31:00 +00:00
chaim 836594a863 chore: bump version to 1.3.1 for reinstall
Version 1.2.3 was installed on EspoCRM but DirectAccessReport entity
was returning 404. Bumped to 1.3.1 to allow clean upgrade install.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
v1.3.1
2026-04-06 22:10:51 +00:00
chaim 19db7c1093 feat: AfterInstall creates custom i18n directories for all locales
Ensures custom/Espo/Custom/Resources/i18n/{locale}/ exists for
en_US, fa_IR, he_IL, and the system language. Without this, Label
Manager fails with 500 on fresh installs using fa_IR (Hebrew RTL
wrapper) because the directory doesn't exist and EspoCRM doesn't
create it automatically.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
v1.3.0
2026-04-06 14:27:44 +00:00
chaim ee55f1ecef fix: repair broken Unicode characters in entityDefs and PHP service
- Case.json: "תחום א��ר" → "תחום אחר", "��הול" → "בהול"
- DirectAccessReportService.php: "גישה ישיר��" → "גישה ישירה", broken em-dash

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
v1.2.3
2026-04-06 13:20:29 +00:00
chaim 0cca55da0c fix: translate $LegalAssistance panel tab via "tabs" i18n key
Bottom panel tab labels with $ prefix resolve via translate(key, 'tabs', scope),
not 'labels'. Added "tabs" section to Case.json (fa_IR/he_IL/en_US).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
v1.2.2
2026-04-06 13:07:51 +00:00
chaim ca3d5e7890 fix: add Hebrew translation for LegalAssistance panel tab label
Translates the bottom panel tab "$LegalAssistance" → "סיוע משפטי"
in Case detail view (fa_IR + he_IL + en_US).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
v1.2.1
2026-04-06 12:54:14 +00:00
chaim be4de13618 fix: add fa_IR locale for Hebrew translations
The HebrewLanguage extension uses fa_IR as the locale code (RTL wrapper),
not he_IL. Without fa_IR translations, all labels show in English.
Copied he_IL → fa_IR. Bump to v1.2.0.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
v1.2.0
2026-04-06 12:51:21 +00:00
chaim 682f13543e fix: improve Shira plugin — add feature awareness + courtName enum
- prompts.json: rewrite in Hebrew with general awareness of "גישה ישירה"
  concept, trigger keywords, and structured 8-step conversation flow
- tools.json: add courtName enum with 6 valid court names (was free string)

These changes match what was deployed to ai-gateway plugins/legal-assistance/

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 12:47:01 +00:00
chaim c346642816 fix: add complete Hebrew & English i18n translations for all entities
- Add Global.json (he_IL + en_US) for scope names in navigation/menus
- Add en_US/Case.json for English field/option translations
- Add all enum option translations to DirectAccessReport (both languages)
- Bump version to 1.1.0
- Include updated extension ZIP package

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
v1.1.0
2026-04-06 12:14:29 +00:00
chaim 807fbcdde2 chore: add v1.0.0 extension ZIP package
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 07:22:03 +00:00
chaim e3dfd5f960 feat: LegalAssistance extension v1.0.0 — Direct Access Report
- DirectAccessReport entity (48 fields, status lifecycle, Case relationship)
- Case fields: cLegalAidType, cAppointmentDate, cAidType, cUrgencyLevel, cFilingDeadline
- Auto-tasks hook: creates 3 tasks when case set to Direct Access
- DOCX template with 72 placeholders (converted from original form)
- Shira plugin: generate_initial_report tool with structured conversation flow
- AfterInstall/AfterUninstall scripts for plugin deployment
- Hebrew + English translations

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
v1.0.0
2026-04-06 05:03:21 +00:00