demos: mark price and total as having a database default

Aperta Adatta ai principianti
#186 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
1/5
Tempo stimato
Meno di un'ora
Idoneità per principianti
95/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
angular, supabase, typescript

Direzione di ricerca

In libs/demo-shared/src/lib/demo-resources.ts, trova il campo price di products e il campo total di orders; prima controlla l’opzione hasDefault in libs/core e la sua descrizione in docs/getting-started.md. Aggiungi hasDefault: true a entrambi i campi, poi esegui pnpm exec nx test demo-material e pnpm exec nx test demo-tailwind. Il lavoro è completato quando l’indicazione compare in entrambe le pagine di creazione e rimane nascosta nelle pagine di modifica.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

good first issue layer: demo

What is wrong

In the demo database, products.price and orders.total have a default (default 0), but the demos do not say so. The create form does not show the hint added in #110 ("leave it empty to use the database default") for these two fields.

How to see it

Run demo-material or demo-tailwind, sign in, open the create page of products or orders: price and total show no hint.

Where to look

  • libs/demo-shared/src/lib/demo-resources.ts: the price field of products and the total field of orders.
  • The hasDefault field option in libs/core (see how docs/getting-started.md describes it).

Steps

  1. Add hasDefault: true to price and total.
  2. Run both demos and check the create pages.
  3. Run the demo tests: pnpm exec nx test demo-material and pnpm exec nx test demo-tailwind.

Done when

  • The create page of products shows the hint under price, and the create page of orders under total, in both demos.
  • The edit pages do not show it (the hint is for create only).
Lingua principale
TypeScript
Stelle
2
Fork
2
Merge medio
9h 17m
PR unite (30g)
48

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di pidrang/pidrang

Tutte le issue di pidrang/pidrang

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.