Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,12 @@ A **catalog pack** is a ready-made catalog for one industry, shipped as seed
rows: `DULY_PACK=food-safety pnpm dev` opens an otherwise empty Duly with 38
recurring food-safety duties across 8 positions (食品安全周期性履职, written
from the PRC Food Safety Law, GB 14881-2013, SAMR Order No. 60 and HACCP),
ready to edit and apply to your people. It is a starting point, not legal
advice. **[What a pack is, how to choose, edit or remove one, and how to write
ready to edit and apply to your people. `DULY_PACK=iso-9001` does the same for
an ISO 9001 quality management system: 39 recurring duties across 9 positions
(ISO 9001 质量管理体系周期性履职: internal audit, management review, external
providers, calibration, nonconforming output, documented information), each
citing its ISO 9001:2015 clause by number and title. A pack is a starting
point, not legal or certification advice. **[What a pack is, how to choose, edit or remove one, and how to write
your own →](src/data/packs/README.md)**

## Try the demo
Expand Down
25 changes: 19 additions & 6 deletions src/data/packs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,24 @@ A pack is **data only**. It adds rows to the role catalog (`duly_catalog_item`),
the same rows you would otherwise import from a spreadsheet. It adds no
screens, fields or automation, and it creates no people, duties or tasks.

> **A pack is a starting point, not legal advice.** The food-safety pack is
> written from public sources. It is not a compliance opinion and not any
> company's actual list. Check it against the rules that apply to your plant,
> then change it until it describes your plant.
> **A pack is a starting point, not legal advice.** Every pack here is
> written from public sources. It is not a compliance opinion, not
> certification advice and not any company's actual list. Check it against the
> rules that apply to your plant, then change it until it describes your plant.

## The packs in this repo

| Id | What it covers | Positions | Duties |
|:---|:---|:---|:---|
| `food-safety` | Recurring food-safety duties of a food manufacturer (食品生产企业食品安全周期性履职): the PRC Food Safety Law, GB 14881-2013, SAMR Order No. 60 (日管控 / 周排查 / 月调度) and HACCP | 8 | 38 |
| `iso-9001` | Recurring duties of an ISO 9001 quality management system, for a manufacturer or a service business holding the certificate (ISO 9001 质量管理体系周期性履职): internal audit, management review, external providers, calibration, nonconforming output, documented information, customer satisfaction | 9 | 39 |

The `iso-9001` pack cites ISO 9001:2015 by **clause number and clause title
only**, in Chinese through GB/T 19001-2016, the identical national adoption.
The standard's text is copyrighted and none of it is reproduced: each duty's
wording is the pack's own. Its certification-audit row cites no clause,
because certification is the certification body's scheme, not a clause of
the standard.

## Turn a pack on

Expand All @@ -30,7 +38,9 @@ effect on the next start.
| An empty app (the default) | `pnpm dev` |
| An empty app with the food-safety catalog in it | `DULY_PACK=food-safety pnpm dev` |
| The same, in Chinese | `DULY_PACK=food-safety DULY_DEMO_LOCALE=zh-CN pnpm dev` |
| An empty app with the ISO 9001 catalog in it | `DULY_PACK=iso-9001 pnpm dev` |
| The demo (it loads `food-safety` by itself) | `pnpm demo` / `pnpm demo:zh` |
| The demo with the ISO 9001 pack instead | `DULY_PACK=iso-9001 pnpm demo:zh` |
| The demo without the pack | `DULY_PACK=none pnpm demo` |

On Windows, set the variable first (`set DULY_PACK=food-safety`, or
Expand All @@ -41,7 +51,10 @@ On Windows, set the variable first (`set DULY_PACK=food-safety`, or
demo uses. Starting a second time in the other language adds the other
language's rows next to the first ones, so start clean
(`rm -rf .objectstack/data`) when you switch.
- **Several packs.** Separate their ids with commas: `DULY_PACK=food-safety,another-pack`.
- **One pack, or several.** Naming a pack loads that pack and no other, the
demo's default included: `DULY_PACK=iso-9001 pnpm demo` has no food-safety
rows. To load several, separate their ids with commas:
`DULY_PACK=food-safety,iso-9001`.
- **A typo stops the start.** An id that names no pack is refused with the list
of ids there are. It never loads nothing quietly.

Expand Down Expand Up @@ -106,7 +119,7 @@ tells you, rather than a duty quietly going wrong.

### Add one duty

1. Open `src/data/packs/food-safety/pack.ts`.
1. Open the pack's file, such as `src/data/packs/food-safety/pack.ts`.
2. Copy an entry from the same position and change it.
3. Restart with the pack on. The new row is in the role catalog, and the rows
you already had are left alone.
Expand Down
3 changes: 2 additions & 1 deletion src/data/packs/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { cadenceOf, type DemoCatalogItem, type Form } from '../demo-catalog.js';
import { DEMO_LOCALE, type DemoLocale } from '../demo-locale.js';

import { FOOD_SAFETY } from './food-safety/pack.js';
import { ISO_9001 } from './iso-9001/pack.js';

/**
* Catalog packs — a starting list of recurring duties for one industry, as
Expand Down Expand Up @@ -75,7 +76,7 @@ export interface CatalogPack {
export const PACK_ENV_VAR = 'DULY_PACK';

/** Every pack this repo ships. A new pack is one import and one entry here. */
export const CATALOG_PACKS: readonly CatalogPack[] = [FOOD_SAFETY];
export const CATALOG_PACKS: readonly CatalogPack[] = [FOOD_SAFETY, ISO_9001];

/** Spellings that mean "no pack", besides leaving the variable unset. */
const NO_PACK = ['', 'none'];
Expand Down
Loading
Loading