feat: introduce archify skill for generating architecture diagrams
- Added a new Archify skill, enabling users to create polished architecture, workflow, sequence, data-flow, and lifecycle diagrams. - Implemented comprehensive functionality including rendering, validation, and delivery of diagrams in various formats. - Integrated a user-friendly command-line interface for generating and previewing diagrams. - Developed supporting files including package.json, LICENSE, and SKILL.md for documentation and licensing. - Added unit tests to ensure reliability and functionality of the new skill. These changes enhance the application by providing a structured approach to visualizing system architecture and workflows, improving user experience and data representation.
This commit is contained in:
@@ -56,6 +56,14 @@ const config = withMermaid(
|
||||
{ text: 'Form Primitives', link: '/packages/ui/FORM-COMPONENTS' },
|
||||
],
|
||||
},
|
||||
{
|
||||
text: 'TrackGo Web',
|
||||
collapsed: false,
|
||||
items: [
|
||||
{ text: 'Overview', link: '/apps/web/' },
|
||||
{ text: 'Sales Workflow', link: '/apps/web/SALES_WORKFLOW' },
|
||||
],
|
||||
},
|
||||
{
|
||||
text: 'Desktop Ecosystem',
|
||||
collapsed: false,
|
||||
|
||||
@@ -0,0 +1,188 @@
|
||||
# Sales Workflow
|
||||
|
||||
How to run a sale in TrackGo: from a request or order, through packing and invoicing, to payment.
|
||||
|
||||
You need permission to view each menu. Status buttons (Process, Complete, Submit, Approve, and so on) appear only if you are allowed to edit.
|
||||
|
||||
---
|
||||
|
||||
## Before you start
|
||||
|
||||
Set up the records that every sales document needs:
|
||||
|
||||
| You need | Where to create it |
|
||||
| --- | --- |
|
||||
| Division, branch, customer, product | **Settings → Data** |
|
||||
| Salesperson | **Sales → Data → Employees** |
|
||||
|
||||
If a menu is missing, ask an administrator to give your privilege **View** (and **Update** for status buttons) on that area.
|
||||
|
||||
---
|
||||
|
||||
## The usual flow
|
||||
|
||||
```mermaid
|
||||
flowchart LR
|
||||
subgraph sales [Sales]
|
||||
R[Sales Request]
|
||||
O[Sales Order]
|
||||
P[Process]
|
||||
I[Sales Invoice]
|
||||
PAY[Sales Payment]
|
||||
end
|
||||
subgraph logistics [Logistics]
|
||||
PS[Packing Slip]
|
||||
C[Complete]
|
||||
end
|
||||
R -.->|optional| O
|
||||
O --> P
|
||||
P --> I
|
||||
P -->|unless you skip it| PS
|
||||
PS --> C
|
||||
I --> PAY
|
||||
```
|
||||
|
||||
1. Optionally create and approve a **sales request**.
|
||||
2. Create a **sales order** (from the request, or from scratch).
|
||||
3. Open the draft order and click **Process**. Leave **Generate packing slip** checked unless you do not need delivery paperwork. Processing creates a **sales invoice**, and a **packing slip** unless you skip it.
|
||||
4. If there is a packing slip, open **Logistics → Packing slips**, then **Complete** and enter how much was delivered.
|
||||
5. Open the invoice and click **Create Sales Payment**. **Submit** the payment, then **Approve** it (or **Reject** / **Rollback**).
|
||||
|
||||
---
|
||||
|
||||
## Sales request
|
||||
|
||||
**Menu:** Sales → Activities → Sales Requests
|
||||
|
||||
A request is optional. You can go straight to a sales order.
|
||||
|
||||
1. Click **Create**. Fill in date, salesperson, branch, division, customer, address, and at least one product with a quantity. Product price and document code are optional. Save.
|
||||
2. While the status is **Draft**, click **Submit** to send it for approval. You can also use **Change status** to mark it **Rejected**.
|
||||
3. While it is **Pending**, click **Approve** or **Reject**. **Change status** can send it back to **Draft**.
|
||||
4. After it is **Approved**, there is nothing more to do on the request itself.
|
||||
5. On the request detail page, click **Create Sales Order**. The order form opens with the request’s customer, location, and products already filled in.
|
||||
|
||||
---
|
||||
|
||||
## Sales order
|
||||
|
||||
**Menu:** Sales → Activities → Sales Orders
|
||||
|
||||
1. Click **Create**. Fill in the same kind of details as a request. On a new order you can pick a sales request under **Source**; that copies the request into the form. Save. A new order starts as **Draft**.
|
||||
2. On a **Draft** order, click **Process**.
|
||||
- You will see: *Processing creates a sales invoice and, unless skipped, a packing slip.*
|
||||
- **Generate packing slip** is checked by default. Uncheck it if you do not want a packing slip.
|
||||
3. On **Draft** or **Processed**, you can **Cancel**. There is no **Complete** button on orders. If the order later shows **Completed**, that was not something you clicked on this screen.
|
||||
4. On the order detail page you can see linked packing slips and invoices, and click **Create Sales Invoice**.
|
||||
|
||||
You can select several orders and Process or Cancel them together, as long as they are all in a status that allows that action.
|
||||
|
||||
---
|
||||
|
||||
## Packing slip
|
||||
|
||||
**Menu:** Logistics → Activities → Packing slips
|
||||
|
||||
Packing slips live under **Logistics**, not Sales. You can also create one by hand and link it to a sales order.
|
||||
|
||||
1. If the status is **Draft**, use **Change status** to move it to **Processed**, or **Cancel** it. There is no **Process** button here.
|
||||
2. When it is **Processed**, click **Complete**. Enter the **delivered quantity** for each product. Remaining quantity opens a **new packing slip**.
|
||||
3. You can **Cancel** a slip while it is **Draft** or **Processed**.
|
||||
|
||||
---
|
||||
|
||||
## Sales invoice
|
||||
|
||||
**Menu:** Sales → Activities → Sales Invoices
|
||||
|
||||
Invoices appear when you **Process** an order. You can also create one yourself, optionally from an order or a packing slip.
|
||||
|
||||
On the invoice, the only status button is **Cancel** (while the invoice is **Draft**, **Processed**, or **Partial**). You cannot choose Processed, Partial, or Completed yourself. Those labels can still show on the invoice.
|
||||
|
||||
On the invoice detail page, click **Create Sales Payment**. The payment form opens with that invoice and its remaining balance.
|
||||
|
||||
---
|
||||
|
||||
## Sales plan
|
||||
|
||||
**Menu:** Sales → Activities → Sales Plans
|
||||
|
||||
When you create or edit a **sales** plan, you can attach one or more invoices. Saving the plan does not change the invoice status.
|
||||
|
||||
(Logistics plans attach packing slips instead.)
|
||||
|
||||
---
|
||||
|
||||
## Sales payment
|
||||
|
||||
**Menu:** Sales → Activities → Sales Payments
|
||||
|
||||
1. Click **Create**. Enter the date and at least one line: an invoice and an amount. Images and notes are optional. Save. A new payment starts as **Draft**.
|
||||
2. Click **Submit** to move it to **Pending**. You can also use **Change status** to mark it **Rejected**.
|
||||
3. While it is **Pending**, click **Approve**, **Reject**, or **Rollback** (back to **Draft**).
|
||||
4. After **Approved**, you cannot change the status further. A **Rejected** payment can be sent back to **Draft** with **Change status**.
|
||||
|
||||
Approving a payment does not change the invoice status from this screen. Refresh the invoice if you need to see an updated balance.
|
||||
|
||||
---
|
||||
|
||||
## What you can do at each status
|
||||
|
||||
**Buttons** are the labelled actions on the list or detail page. **Change status** is a separate dialog that lists the statuses you may pick. Invoices do not have Change status.
|
||||
|
||||
### Sales request and sales payment
|
||||
|
||||
Both use Draft → Pending → Approved or Rejected.
|
||||
|
||||
| Current status | Buttons | Change status |
|
||||
| --- | --- | --- |
|
||||
| Draft | Submit | Rejected |
|
||||
| Pending | Approve, Reject. Payments also have Rollback (back to Draft) | Draft, Approved, Rejected |
|
||||
| Approved | — | — |
|
||||
| Rejected | — | Draft |
|
||||
|
||||
### Sales order
|
||||
|
||||
| Current status | Buttons | Change status |
|
||||
| --- | --- | --- |
|
||||
| Draft | Process, Cancel | Processed, Cancelled |
|
||||
| Processed | Cancel | Cancelled |
|
||||
| Completed | — | — |
|
||||
| Cancelled | — | — |
|
||||
|
||||
**Process** always opens the packing-slip checkbox dialog (not Change status).
|
||||
|
||||
### Packing slip
|
||||
|
||||
| Current status | Buttons | Change status |
|
||||
| --- | --- | --- |
|
||||
| Draft | Cancel | Processed, Cancelled |
|
||||
| Processed | Complete, Cancel | Completed, Cancelled |
|
||||
| Completed | — | — |
|
||||
| Cancelled | — | — |
|
||||
|
||||
**Complete** always asks for delivered quantities.
|
||||
|
||||
### Sales invoice
|
||||
|
||||
You may see Draft, Processed, Partial, Completed, or Cancelled.
|
||||
|
||||
| Current status | What you can do |
|
||||
| --- | --- |
|
||||
| Draft, Processed, or Partial | Cancel |
|
||||
| Completed | No status buttons |
|
||||
| Cancelled | No status buttons |
|
||||
|
||||
---
|
||||
|
||||
## What you should not expect to click
|
||||
|
||||
These are not buttons on the screens:
|
||||
|
||||
- **Complete** on a sales order
|
||||
- Setting an invoice to Processed, Partial, or Completed yourself
|
||||
- Changing an invoice’s status by putting it on a sales plan
|
||||
- Changing an invoice’s status by approving a payment
|
||||
- Cancelling an order, packing slip, or invoice in one click for all related documents — **Cancel** applies only to the document you are looking at
|
||||
|
||||
If a related document’s status changes after you act, open that document again to see the latest value.
|
||||
@@ -0,0 +1,24 @@
|
||||
# TrackGo Web
|
||||
|
||||
The TrackGo application you use in the browser (or in the desktop app).
|
||||
|
||||
Use the sidebar to open **Sales** for day-to-day selling, **Logistics** for packing and delivery, and **Settings** for company data and user access.
|
||||
|
||||
---
|
||||
|
||||
## Where to find things
|
||||
|
||||
| Area | Menu | What you do there |
|
||||
| --- | --- | --- |
|
||||
| Sales | Sales → Activities | Requests, orders, invoices, payments, visit plans |
|
||||
| Logistics | Logistics → Activities | Packing slips, delivery plans |
|
||||
| Company data | Settings → Data | Divisions, branches, customers, products |
|
||||
| Access | Settings → User | Users and privileges |
|
||||
|
||||
If a menu item is missing, your privilege does not include **View** for that area.
|
||||
|
||||
---
|
||||
|
||||
## Guides
|
||||
|
||||
- [Sales workflow](/apps/web/SALES_WORKFLOW) — from a sales request or order through packing, invoicing, and payment
|
||||
@@ -39,6 +39,7 @@ The main consumer-facing application.
|
||||
|
||||
- Imports business logic from `@repo/utils`
|
||||
- Uses shared UI components from `@repo/ui`
|
||||
- End-user guide: [Sales workflow](/apps/web/SALES_WORKFLOW)
|
||||
|
||||
**Tech Stack**:
|
||||
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
let's screening and review sales flow
|
||||
|
||||
- Sales order has status (draft, processed, completed, cancelled)
|
||||
When sales order change status from draft to processed, generate packing slip and sales invoice, but in special case, packing slip can be not generated
|
||||
When sales order has packing slip, when packing slip is completed, make sales order status to completed, but if not have packing slip, make sales order status to completed (not waiting for packing slip)
|
||||
- Packing slip has status (draft, processed, completed, cancelled)
|
||||
When packing is generated from sales order, make packing status to processed
|
||||
When packing qty is updated and all qty is delivered, make packing status to completed
|
||||
When packing qty is updated and not all qty is delivered, make packing status to completed, but generate new packing slip with remaining qty and not update status sales to completed, sales completed only all packing is completed
|
||||
- Sales invoice has status (draft, processed, partial, completed, cancelled)
|
||||
Processed when invoice is add to sales plan
|
||||
Completed when invoice is paid
|
||||
Partial when invoice is paid partially
|
||||
- Sales payment has status (draft, pending, approved, rejected)
|
||||
|
||||
Make status change flow:
|
||||
Sale order
|
||||
Draft to Processed trigger by action from user
|
||||
Processed to completed trigger by packing slip completed
|
||||
Cancelled trigger by action from user and make sure to cancel packing slip and sales invoice
|
||||
Packing slip
|
||||
Processed to completed trigger by action from user
|
||||
Cancelled trigger by action from user and cancel sales order
|
||||
Sales invoice
|
||||
Draft to Processed when invoice is add to sales plan
|
||||
Partial when invoice is paid partially
|
||||
Completed when invoice is all paid
|
||||
Sales payment
|
||||
Draft to pending trigger by action from user
|
||||
Pending can be approved or rejected by action from user, or rollback by action from user
|
||||
Reference in New Issue
Block a user