Commit Graph

62 Commits

Author SHA1 Message Date
Ali 4d628576c7 feat(desk): expand layout config with block/hide rules + silk bg asset
- desk_layout.json: add blocked_doctypes and per-workspace hide/block
  rules across Assets, Buying, Invoicing, Manufacturing, Payroll,
  Recruitment, Selling, Stock (+ Landed Cost Voucher inject/order)
- add silk-bg.jpg (referenced by jey_theme.bundle.css)
- CLAUDE.md: doc updates

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-20 14:17:52 +00:00
Ali 8fcd2a5999 feat(silk): match chrome's coverage + fix chart animation & tooltip
Coverage parity — silk now styles the components chrome did but silk didn't
(ported into silk's glass/champagne idiom, not chrome's metal):
- child-table grids (flattened cells, glass focus well, read-only fill)
- alerts/toasts, awesomplete suggestion panel, danger button, form sidebar
- timeline connector + dot, list-view sticky right column, print reset
- misc: popover body, navbar links, breadcrumb container

Chart tooltip: was dark bg with silk's dark --charts-tooltip-* text vars
(dark-on-dark, unreadable) — now an ivory panel matching the dropdowns.

Chart entrance animation: frappe-charts mounts an empty flat skeleton, then
re-renders with real data async, replacing the line path — the old draw class
re-fired on each new path (flat line -> real -> flicker -> redraw), and the
skeleton axis morph (1..5 -> 100K) showed through. Now two-phase (drawChart in
jey_theme.js): .jey-chart-prep hides the whole chart until data settles, then
one .jey-chart-draw reveals it with a single left-to-right clip-path wipe so
line + area + dots draw on together. Verified headless: single wipe, no morph.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-20 13:33:29 +00:00
Ali dc36d3d46a fix(desk): full icon captions — no ellipsis, no collision
Frappe renders the desktop icon caption as a single nowrap + ellipsis line in a
127px cell, which broke two ways on long (az/ru) module names:

- main desk: .icon-caption is shrink-to-fit, so it grew past its cell and the
  ellipsis never triggered — the label spilled into the neighbouring icon.
- folder modal: our own -webkit-line-clamp:2 + ellipsis cut the label ("…").

Captions now take the full cell width and wrap over as many lines as they need;
the cell grows taller instead of overflowing. Cells widen to 152px above 1060px
(below that the 6-col grid is already at the viewport edge, so the stock width
stays); mobile is untouched. The folder modal card now sizes to its icon grid —
Bootstrap capped the dialog width, so the widened last column hung outside it.

Also carries the in-progress theme rename (modern → silk) in the JS bundle,
CLAUDE.md and az locale.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-14 10:23:57 +00:00
Ali 334f2c5f36 feat(i18n): add locale templates and az/ru translations 2026-07-06 17:04:42 +00:00
Ali 2e03ec2e91 perf(assets): bundle theme CSS into one hashed bundle
The 3 theme stylesheets were separate raw entries in both app_include_css
and web_include_css — 3 lines each in the preload header (edge proxy has a
~4 KB buffer; overflow → 502) and hashless /assets paths under nginx's
1-year cache. Merged into jey_theme.bundle.css (order preserved: shared →
theme_chrome → theme_modern); 3 → 1, now hashed → automatic cache-busting.
JS left as-is (theme logic, kept out of scope).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-24 10:28:30 +00:00
Ali 712d54b6e7 feat: enforce config doctype-block via permission hooks (SM-proof)
Move config-driven doctype blocking off before_request onto the permission
system so a System Manager cannot undo it from the UI:

- permission_query_conditions ("*") returns 1=0 for prod-blocked doctypes
  -> list views come back empty for everyone but Administrator.
- has_permission denies every per-doc op (read/create/write/delete).
- extend_bootinfo strips blocked doctypes from user.can_*.

Doctypes are deliberately NOT blocked at before_request: a blunt URL/API
block breaks search_link/dynamic links, while permission hooks are bypassed
by ignore_permissions so internal/framework reads keep working.

Split desk_layout gating: the visual overlay stays gated on is_enforcing();
access-block accessors (prod_blocked_*) gate on 'not is_design_mode()' so a
block only bites on production (the design machine keeps full access).
Reports/pages/workspaces blocking unchanged (before_request + has_permission).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-22 16:22:03 +00:00
Ali 20e7e834c2 feat: global blocked_doctypes list (block doctypes not on /desk)
desk_layout._build merges a top-level config 'blocked_doctypes' list into the
blocked-doctype set, so arbitrary doctypes (including ones absent from any
workspace card) are denied at before_request + has_permission when enforcing.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-21 09:58:43 +00:00
Ali acb1010324 fix: resolve desk originals defensively (Frappe version compat)
get_workspace_sidebar_items doesn't exist in every Frappe version (e.g. v14); the
hard 'from frappe.desk.desktop import ...' raised ImportError and broke the whole
desk_overrides module, taking the get_desktop_page override down with it
('Failed to get method ... cannot import name get_workspace_sidebar_items').
Resolve both originals via getattr(None) and guard the wrappers.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-19 09:02:29 +00:00
Ali d7af667d6e feat: design mode defaults on when jey_layout is installed
is_design_mode() now returns True automatically on machines where the jey_layout
editor app is installed (test/design machines), so site_config no longer needs
jey_design_mode. Production (jey_theme only) stays in always-enforce mode. An
explicit jey_design_mode in site_config still overrides (0/1).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-19 08:51:47 +00:00
Ali 3decdc6ae8 feat: desk layout engine for jey_layout (hide/block/add/reorder)
Non-destructive, server-side filtering/injection of desk workspaces/cards/links
driven by config/desk_layout.json. Adds desk_layout.py + desk_overrides.py,
extends access_control.py (Report/Page blocking, fail-open hooks), dynamically
loads the jey_layout editor in design mode, and documents the edge proxy
proxy_buffer_size gotcha in CLAUDE.md. Test snapshot cleared to empty.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-18 12:53:53 +00:00
Ali 8f95aecee5 chore(fixtures): re-export employees/taxes_az sidebar & desktop icons
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-12 16:19:28 +00:00
Ali e02e4204b4 feat(taxes): add Taxes Az desktop icons and workspace sidebar fixtures
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-11 11:46:04 +00:00
Ali c65eeb741a fix(sidebar): render fallback sidebar when no workspace matches route
Frappe v16's Sidebar.set_workspace_sidebar() leaves .sidebar-items empty
when a List/Form route's doctype is referenced by 2+ workspace sidebars
but none is the doctype's module home workspace — it falls through without
calling setup(). Symptom: sidebar goes blank on hard reload (e.g. after
clear-cache/migrate/build) and "self-heals" only via in-app navigation.

Repro: hard-reload /app/price-list (module Stock, linked only from the
Selling and Buying sidebars).

Patch the prototype so that if the items container is still empty after the
core method runs, it falls back to the first sidebar referencing the route's
doctype, else the route's module home workspace.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-11 10:55:57 +00:00
Ali 1c9c67f5d9 chore(workspace): remove Tax Article Items Report from Taxes workspace
The Tax Article Items Report doctype is removed in taxes_az; drop it from
the Taxes workspace SETUP_DOCTYPES.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-02 12:25:24 +00:00
Ali a1e3fe96ed feat(list,grid): period filter for date columns + dialog row fix
- list-view: replace single-date "=" standard filter with a DateRange
  "Between" control when the doctype carries posting_date as Date/Datetime.
  If posting_date isn't in standard_filter, inject the period control after
  the ID filter so it's always reachable.
- shared.css: size the period filter to fit "DD/MM/YYYY to DD/MM/YYYY"
  without being squashed by the surrounding flex layout.
- shared.css: let rows in the grid "Configure Columns" dialog grow with
  content. Frappe hardcodes height:32px inline on each .fields_order row
  in grid_row.js, which clips long translated labels (eg. Azerbaijani
  "Əsas Tarif (Anbar Ölçü Vahidinə görə)") so the wrapped portion overflows
  into the next row and the help text. Switch to flex centering with
  min-height; reset inline padding-tops that were calibrated for fixed
  32px rows.
- shared.css: hide the ERPNext desktop icon by default (same treatment as
  Organization).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-25 17:31:33 +00:00
Ali c145f584bd Drop E-Taxes Obligation Pact from taxes workspace shortcuts
Doctype is being removed; stop linking to it from the workspace.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-15 16:07:10 +00:00
Ali 26d827148a css: hide check input-area when read-only to remove duplicate toggle
Our Check-field input-area override had higher specificity than Frappe's
.hide (.d-none), so submitted/read-only forms rendered both the real
input and the disp-area's formatted checkbox.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-15 15:05:48 +00:00
Ali 98e13585c0 chrome: scope grid-row input flattening to .data-row only
The flatten / focused / disabled rules for grid-cell inputs matched
every input under .grid-row, but .form-in-grid (the row-edit modal) is
also a descendant of .grid-row, so its inputs lost their background and
border too — rendering as plain text labels. Anchor the selectors to
.grid-row > .data-row so only the inline cells get the flat treatment;
the modal keeps standard form-control styling.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-14 12:44:39 +00:00
Ali e79cea96b7 css: fix child-table row edit blocked by freeze backdrop
The jey-section-in keyframe animated opacity + transform with
animation-fill-mode: both, which leaves a persistent stacking context on
.section-body in Firefox. That trapped Frappe's .form-in-grid (z-index
1021) under #freeze.modal-backdrop (z-index 1020), so every mouse click
on the row-edit form got captured by #freeze and closed the form. Tab
and typing still worked. Slide via top instead of transform, drop the
opacity keyframe entirely. Also stop lifting .form-section on
focus-within (same trap mechanism); lift the awesomplete listbox itself
instead so Link-field dropdowns still escape sibling sections.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-14 12:41:05 +00:00
Ali 3dd6c325f5 preloader: shrink splash image to 64px
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-04 16:24:11 +00:00
Ali 59b1b7f0f1 preloader: shrink splash image to 96px
Was rendering ~200px (matching Frappe's inline max-width), which felt
too large on smaller screens. Override with !important since the
template uses inline styling.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-04 16:23:22 +00:00
Ali 0753a36275 workspace: fold invoice_az e-taxes doctypes into Taxes Az
Adds three new cards (E-Taxes Setup, Reference, Documents) under a
"E-Taxes & ƏMAS" header so Asan Login, E-Taxes Settings, and the rest
of the standalone invoice_az doctypes are reachable from the Taxes Az
workspace and sidebar.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-04 16:18:32 +00:00
Ali f9c89eecec preloader: replace placeholder image
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-04 15:50:55 +00:00
Ali 7649b42ba6 setup: route Employees icon directly to Employee list, no Workspace
Drop the auxiliary Workspace 'Employees' page and let the sidebar's
single DocType link drive get_route_for_icon — clicking the icon now
jumps straight to /app/employee instead of through a workspace card.
_cleanup_obsolete_workspace removes the page from older deployments
on next migrate.

Workspace Sidebar.app stays 'hrms' so the sidebar header subtitle
resolves to the HRMS app_title via choose_app_name in sidebar.js,
not 'Jey Theme'.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-04 15:50:55 +00:00
Ali bc994927c8 setup: re-add Employees /desk icon under Frappe HR
HRMS v16 dropped the old Employee Lifecycle workspace (see
hrms/patches/v16_0/delete_old_workspaces.py), which removed its
desktop icon from the Frappe HR folder. This adds it back as a
jey_theme-owned record so HRMS upgrades stay untouched.

The icon is link_type='Workspace Sidebar' pointing to a minimal
Workspace Sidebar 'Employees' that has a single DocType link to
Employee — Frappe's DesktopIcon.is_permitted requires a sidebar
named after the icon's label or it filters the icon out of bootinfo,
so an External link alone is not enough. No Workspace page is
created. Click routes to /app/employee via get_route_for_icon.

Idempotent setup runs on after_migrate, mirroring taxes_workspace.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-04 15:35:39 +00:00
Ali ff5f771ce2 preloader: override Frappe desk splash image
CSS swaps the <img> inside templates/includes/splash_screen.html via
content: url(...) so the desk loading screen shows our PNG instead of
the default blue "E" framework logo. Image lives at
public/images/preloader.png — served via the existing assets symlink,
no bench build needed.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-04 15:35:27 +00:00
Ali 54f34b26e1 js: remove ERPNext/Frappe → Jey ERP text rebrand
Drops the MutationObserver-driven rebrand IIFE and the desktop label
overrides (Frappe HR → HR, ERPNext Settings → Settings). Original
labels are now shown as-is.
2026-05-04 15:33:52 +00:00
Ali 2230a2854f sidebar: smooth collapse/expand transition for custom labeled actions
CSS:
- Force min-width:0 on .body-sidebar-bottom so it can shrink to the 50px
  collapsed width instead of refusing to clip past its widest label.
- Animate label max-width and margin-left with the same 0.3s
  cubic-bezier as the sidebar width — labels now slide smoothly
  under their icons on collapse instead of leaving an ellipsized
  letter at the edge.
- Hide v16.17's native .sidebar-bottom-actions row (about + collapse
  icon-buttons) since our labeled .jey-collapse-link replaces it.
- Animate .nav-item padding so it stays in sync with the sidebar
  width transition (Frappe v16 toggles padding 0→8px instantly).

JS:
- Update collapse-link DOM in place (svg href + span text) instead of
  rebuilding innerHTML, so the span keeps its identity and the
  max-width transition plays smoothly across collapse/expand toggles.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-01 12:52:09 +00:00
Ali 534c98e062 sidebar: stop anchoring on collapse-sidebar-link in v16.17
Frappe v16.17 reintroduced .collapse-sidebar-link as a tiny icon-button
inside a horizontal flex row (.sidebar-bottom-actions). Our v15
fallback was finding it and inserting our three labeled links into
that flex row, pushing them off the right edge of the sidebar.

Anchor only on .body-sidebar-bottom now.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-29 11:19:30 +00:00
Ali 94b6f4f75e access_control: return True for pass-through in has_permission
Frappe's has_controller_permissions treats any falsy return as denial, so
returning None was blocking every non-admin user on every doctype.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-22 09:20:06 +00:00
Ali 692dbb2b52 activity/comment-box: strip background so panel blends with form
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-21 12:15:45 +00:00
Ali 575b7a7168 shared: pair -webkit-line-clamp with standard line-clamp
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-20 12:52:19 +00:00
Ali f0cc94d96f form: hide sidebar by default; icons: swap like/comment sprites
Form sidebar is hidden for saved docs by default; user's explicit
toggle persists via localStorage (jey-form-sidebar).

Swap Frappe's hard-coded sprite refs on render:
  #icon-heart -> #icon-star (like action)
  #es-line-chat-alt -> #jey-icon-comment (local sprite, 2-line bubble)
Injected sprite + MutationObserver keep swaps applied as nodes stream in.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-20 12:49:12 +00:00
Ali 373ffd73b8 chrome list: sticky right column; comment-count: stroke render
Sticky .level-right on list rows gets a translucent metallic gradient
so horizontally-overflowing columns don't leak through under it, with
a visible left border as a separator. Hover state slightly brighter.
.comment-count svg forced to fill:none + stroke:currentColor so the
swapped-in lucide comment sprite renders as an outline, not a blob.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-20 12:49:02 +00:00
Ali 38bee59283 desktop modal: fit-to-content, crisp text, matched border radius
Captions wrap to 2 lines with ellipsis inside grid track instead of
overflowing into neighbouring icons. Modal header loses its gradient
bar (title only). Body stops forcing an inner scrollbar when icons
fit. Chrome modal border switches from border-image (sharp rect) to
a plain 1px border that follows border-radius.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-20 12:48:53 +00:00
Ali 5e78072b0a report view: themed compact checkboxes + filter row flex
The global toggle-switch styling for input[type=checkbox] doesn't fit
the 32px select column or 37px index column in frappe-datatable, so
content was clipped and checkboxes sat flush to the cell baseline.

- Compact 14x14 themed square checkbox (same paint as grid .row-check)
  inside .datatable, with ::after pseudo disabled.
- Flex-center the cell when the only child is a checkbox.
- Let the filter input shrink instead of crushing its help-icon sibling.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-20 11:39:53 +00:00
Ali 4e038cf050 list: drag-to-resize and drag-to-reorder for columns
Mirrors the grid module's UX in Frappe's desk list view — drag the right
edge of a header to resize, drag the header itself to reorder. Widths
and order persist per doctype in localStorage.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-20 11:23:48 +00:00
Ali fe9dc89eb6 sidebar: restore jey buttons under Frappe v16
v16 removed the .collapse-sidebar-link anchor the Full Width / Switch
Theme buttons inserted before, so they silently stopped rendering.
Add a jeySidebarAnchor() helper that falls back to .body-sidebar-bottom,
and re-add a Collapse/Expand button (calls frappe.app.sidebar.toggle_width)
to replace the default v15 link Frappe dropped.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-20 09:42:32 +00:00
Ali 953bf8b2c8 grids: polish child-table active/read-only cells; misc chrome polish
- Chrome theme: active grid row now visually matches the static row —
  flattened inputs, forced bottom border, padding match, pressed-in
  button-style effect on focused cells with smooth 0.45s transition.
- Read-only grid cells get a distinct lighter-grey bg only while their
  row is the active one (uses Frappe's display:none on .field-area).
- Button press animations: expanded shadow set + explicit transitions
  so press/release is symmetric and eased.
- Shared: fixed section-in keyframe leaving a stacking context that
  clipped Link autocomplete dropdowns; dropdown fade-out without
  Popper position reset; smooth sidebar expand to match collapse.
- JS: clip section overflow during collapse transition, restore after
  transitionend; freeze dropdown position during Bootstrap hide.
- CLAUDE.md: rewritten as Claude Code guidance doc.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-17 17:08:50 +00:00
Ali 5cbc36566b animations: add UI animations across desk for a polished, alive feel
- Dropdowns: smooth fade in/out via visibility+opacity transition
- Modals/Dialogs: entrance with translateY+scale+opacity (0.5s)
- Search dialog: fade in/out with slide, backdrop cleanup, input re-focus
- Form sections: cascade entrance animation on load and tab switch
- Form tabs: sliding active indicator via ::after scaleX
- Collapse/expand: smooth max-height transition with JS-calculated height
- Sidebar: hover padding shift, icon scale, active accent bar
- List view: staggered row entrance from left
- Workspace cards: slower entrance (0.7s), number value delayed fade-in
- Widget z-index: open dropdown (200) above hovered neighbor (100)
- Report summary: cascade card entrance
- Link fields: awesomplete dropdown fade-in
- Input focus: inset press effect
- Buttons: shine sweep on hover, inset shadow on click
- Chrome theme: tab indicator uses ::after instead of border-bottom
- Observer fix: null-check parentNode for detached text nodes

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-16 14:01:53 +00:00
Ali 12f3e16b18 revert notifications position 2026-04-16 09:54:12 +00:00
Ali bae6c16a6b bug fixes and qol changes 2026-04-16 09:49:27 +00:00
Ali 7486c80656 icons: remap user menu lucide sprites and full-width button
Rewrites <use href="#icon-NAME"> inside .frappe-menu dropdown items
(the user/settings menu at top-left) to semantically similar but
visually distinct lucide ids — home→house, sliders-horizontal→
settings-2, rotate-ccw→refresh-ccw, maximize→chevrons-left-right,
moon→moon-star, info→life-buoy, logout→log-out. Idempotent via
.jey-menu-remap-done marker. Wired into processAll + rebuildAllIcons
so it runs on boot, theme switch and DOM mutations.

Also switches the custom .jey-fullwidth-link button to the same
chevrons-left-right icon so its appearance matches the menu entry.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-14 13:20:46 +00:00
Ali 084c92466a taxes workspace: add Taxes Az subsystem via after_migrate setup
Creates a custom /desk subsystem "Taxes Az" listing user-facing doctypes
from the taxes_az module in three cards (Declarations & Returns, Setup &
Reference, Period Closing & Tools). The doctype list is a STATIC snapshot
baked into taxes_workspace.py — adding a new DocType to taxes_az will not
automatically put it into the workspace; edit the tuples and re-run setup.

- Uses "Taxes Az" name (not "Taxes") to avoid collision with erpnext's
  built-in Workspace Sidebar "Taxes", which otherwise hijacks routing to
  /app/sales-taxes-and-charges-template.
- Creates a matching Workspace Sidebar whose first Link is link_type=
  "Workspace" so Frappe's desktop.js get_route() generates a clean
  /app/taxes-az route and the click stays in-tab (standard behaviour).
- Desktop Icon with idx=999 pins it to the end of the /desk grid.
- Cleanup of the obsolete "Taxes" doc we created earlier is idempotent
  and scoped to jey_theme-owned records (never touches erpnext's).

Registered via after_migrate hook so every `bench migrate` re-asserts
the configuration. setup() is idempotent.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-14 13:10:04 +00:00
Ali 6c59231f43 icons: resolve localized menu labels via img src
Menu titles in the app switcher dropdown and sidebar header are
translated (e.g. Azerbaijani), so looking up THEME_ICONS by textContent
missed everything. resolveEnglishKey() now extracts the untranslated
icon name from the <img src> URL, falls back to scanning
frappe.boot.desktop_icons for a matching __(label), then the text.

Also adds a "taxes az" alias to THEME_ICONS.chrome so our new
Taxes Az desktop icon renders the tax document SVG instead of the
alphabet fallback.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-14 13:09:48 +00:00
Ali 96099513a1 access control: hide Quality and Subcontracting modules
Adds jey_theme.access_control with a single source of truth (BLOCKED_MODULES,
BLOCKED_DOCTYPES_EXTRA) and three Frappe hooks:

- before_request: HTTP-level block on /api/resource/<Doctype>, /app/<slug>
  and any whitelisted method passing `doctype` in form_dict. Runs before the
  Administrator bypass in frappe.permissions, so it blocks every user.
- extend_bootinfo: strips blocked modules/doctypes/workspaces from bootinfo
  (workspaces.pages, module_wise_workspaces, app_data, desktop_icons,
  user.can_read/...) so the client router never registers routes for them
  and the sidebar/switcher hide them.
- has_permission wildcard: per-doc safety net for non-Administrator users.

shared.css gets desktop-icon[data-id] fallbacks for Quality/Subcontracting.

Reversal: clear BLOCKED_MODULES in access_control.py and run
`bench --site <site> clear-cache && bench restart`. No DB writes are made.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-13 11:54:48 +00:00
Ali a217ea104a icons: sidebar item icon remap and desktop label overrides
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-13 11:54:35 +00:00
Ali 843774e695 icons 2026-04-13 09:22:23 +00:00
Ali 96638dd26f add missing chrome styles + animations across app
- List activity area: timestamps, comments, like button with heart animation
- Indicator pills: metallic colored variants (blue, green, red, orange, etc)
- SVG icons: chrome tinting with drop-shadow
- Tag pills: metallic gradient styling
- Filter area: chrome popover, remove button hover
- List sidebar: buttons, links, filter pills
- Filter/sort selector button groups: metallic gradient
- Animations: dropdown slide-down, modal scale-in, toast slide-up,
  button metal-press + shine sweep, list row glint on hover,
  popover fade-scale, sidebar slide, navbar lift, card transitions,
  number widget hover scale, comment box focus glow

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-10 09:38:10 +00:00
Ali 513522efb8 full chrome metallic theme for entire app
Extended chrome theme from desktop icons only to the full ERPNext UI:
navbar, sidebar, buttons, inputs, forms, lists, tables, modals,
dropdowns, tabs, timeline, scrollbars. Uses 45° multi-stop reflective
gradients, beveled shadows, conic-gradient accents, and polished
metal body background.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-09 17:18:59 +00:00