Automates the production manager's manual workflow of checking xTuple WO Schedule + Kit Material Shortage for FA department work orders. Two tabs: WO Shortages (detail per WO + shortage line with customer name, YYYY-MM-DD dates) and Critical Parts (aggregated parts blocking near-term shipments with QOH from MPE warehouse). Nav button added to all pages. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
3.5 KiB
3.5 KiB
name, description
| name | description |
|---|---|
| navigation-button-add | Implements a new navigation button with the existing highlight/default colors. Use when the user asks to add buttons to the nav block, mentions page navigation, or instructs to keep the highlight behavior consistent with the latest change. |
Navigation Button Addition
Instructions
- Understand the current navigation canvas by checking
pages/*/widgets/Container1/. Each page reuses the same container structure. The navigation is organized into sections, each with a Text label and one or more buttons:- Sales section:
Text1(label),Button1(Capacity Planning),Button1Copy(Units Shipped),Button1Copy2(Units Ordered) - Pending POs section:
Text2(label),Button2(SLx Pending) - Future sections follow the same pattern (
Text3/Button3, etc.)
- Sales section:
- Follow the established color scheme:
- The highlighted button (current page) uses
appsmith.theme.colors.backgroundColor. - The inactive buttons use
#ffffff.
- The highlighted button (current page) uses
- When adding a new navigation button:
- Copy one of the existing
Button*definitions, adjustingtext,onClick,widgetId,widgetName,topRow,bottomRow, and any other placement metadata so it fits below the existing items in its section. - Set
buttonColorto#ffffff(inactive) unless the button is on its own page; then set its definition toappsmith.theme.colors.backgroundColorwithdynamicBindingPathList: [{"key": "buttonColor"}]. - Ensure
dynamicBindingPathListstays empty whenbuttonColoris static white. - Point
onClicktonavigateTo('<Page Name>', {}, 'SAME_WINDOW')and keepplacement/responsiveBehaviormatching other nav buttons. - Set
parentIdto the Canvas widget ID inside that page'sContainer1.json(thewidgetIdof theCANVAS_WIDGETchild). This varies per page -- always readContainer1.jsonto find the correct value.
- Copy one of the existing
- Add the button on ALL pages (not just pages in the same section). Every page gets the full navigation.
- If adding a button to a new section, follow the navigation-section-add skill first to create the section label.
- Run git status/diff to verify only the intended files changed before reporting back.
Row Layout
Each widget occupies 4 rows. Sections are separated by a 2-row gap:
| Widget | topRow | bottomRow |
|---|---|---|
| Text1 "Sales" | 0 | 4 |
| Button1 "Capacity Planning" | 4 | 8 |
| Button1Copy "Units Shipped" | 8 | 12 |
| Button1Copy2 "Units Ordered" | 12 | 16 |
| (2-row gap) | 16 | 18 |
| Text2 "Pending POs" | 18 | 22 |
| Button2 "SLx Pending" | 22 | 26 |
When adding a new button within a section, increment from the last button's bottomRow by 4. When adding a new section after the last one, add 2 rows gap, then 4 for the label, then 4 for each button.
Examples
-
Adding "Units Ordered" button to Sales section:
- Copy
Button1Copy(Units Shipped) in each page'sContainer1. - Set
textto "Units Ordered",onClicktonavigateTo('Sales - Units Ordered', {}, 'SAME_WINDOW');. - Assign
buttonColorto#fffffffor inactive cases and toappsmith.theme.colors.backgroundColorinside theSales - Units Orderedpage definition for highlight. - Set
topRow: 12,bottomRow: 16(next slot after Units Shipped).
- Copy
-
Adding a second button to Pending POs section:
- Create
Button2Copy.jsonin each page'sContainer1. - Set
topRow: 26,bottomRow: 30(next slot after SLx Pending at 22-26). - Follow the same highlight/inactive pattern.
- Create