Aller au contenu

Pre-registering ear tags (Reserve tags)

Works for both regions

This screen is fully functional for both Iceland and Denmark — no Fjárvís-related restriction was found in it or in ReservedTagsService.

The tag itself is always scanned — never typed

"Manual" here refers to the lamb number being set manually (a start number, a mode choice, or a later correction) — the ear tag number itself is only ever entered by scanning it with an EID reader. There is no field to type an ear tag number directly.


1 · Open "Reserve tags"

On the Dashboard, under "Tags", the "Reserve tags" screen opens. This is both the registration screen and the list of every tag already reserved for the settlement — there's no separate list screen.

At the top, the reader's connection status shows: "Bluetooth connected — scan ear tags" or "Bluetooth not connected — connect a reader first." If the list is empty you'll see "Scan an ear tag to start."

2 · Choose a mode

A toggle at the top switches between two modes:

  • "Scan & Number" (default) — each scanned tag gets a lamb number immediately, in sequence from "Start lamb #:" (defaults to 0001, automatically continuing from the highest number already reserved).
  • "Scan All, Then Number" — scan the whole batch first with no numbers, then tap "Assign All" to number them in sequence starting from a chosen number.

3 · Scan tags

Each scanned tag is added to the top of the list. Confirmation appears as a green banner: "Tag saved: {tag} → Lamb #{number}" (in the first mode) or simply "Tag saved: {tag}" (in the second mode, before numbers are assigned).

The app's own duplicate check is in-memory only, not local-device-enforced

Scanning the same tag again shows "Tag already scanned: {tag}." This check only compares against the tags already loaded into the phone's local PowerSync database when the screen opened — the local table itself has no uniqueness constraint. Supabase (Postgres) does enforce a unique constraint on (tag, settlement_number) (reserved_tags_tag_settlement_unique, added 2026-04-20) — but writes land locally first and sync upward afterward, so a conflict between two devices wouldn't surface on this screen, only during that later sync. There is also no format validation — any scanned string is accepted as-is.

4 · Edit or delete a tag

Tags that haven't been assigned a number yet are marked "No number assigned." Tapping a tag opens a dialog to manually edit its lamb number ("Edit lamb number for {tag}", with the hint "e.g. 0001"). Tags can be deleted via the trash icon or a swipe, with a confirmation ("Remove tag {tag}?").


How this is used later

When an ear tag is scanned in birth registration and it matches a tag reserved here, both the ear-tag and lamb-number fields auto-fill on the "Register lamb" screen. If the tag doesn't match any reservation, this fails silently, and you just fill it in manually as usual.


Based on lamb41/lib/screens/tags/reserve_tags_screen.dart and lamb41/lib/services/reserved_tags_service.dart. See also Connect an EID reader to the app and Birth registration.