Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
7449ce0
docs(core2): checklist unificado cliente+dash en rama Core2
danielitoCode Aug 18, 2026
f4269d3
docs(core2): marcar stock_movements creado en Appwrite con permisos
danielitoCode Aug 18, 2026
a0ad993
docs(core2): marcar schema Appwrite hecho + apuntar checklist unificado
danielitoCode Aug 18, 2026
44694b0
ci: desactivar workflow one-shot con YAML inválido
danielitoCode Aug 19, 2026
4bf9eaa
feat(core2/B2): domain contracts operator stock/finance
danielitoCode Aug 19, 2026
021ad7e
feat(core2/B2): net repos + ApplyOperatorStockDecision salida_venta/f…
danielitoCode Aug 19, 2026
3401b93
feat(core2/B2): ApplyOperatorStockDecisionCaseUse with movements and …
danielitoCode Aug 19, 2026
6dfacc3
feat(core2/B2): DI bindings movements + finance repos
danielitoCode Aug 19, 2026
7cc86ac
feat(core2/B2): BuildConfig STOCK_MOVEMENTS + SALE_FINANCE_EVENT tabl…
danielitoCode Aug 19, 2026
4f88e85
test(core2/B2): unit tests ApplyOperatorStockDecisionCaseUse
danielitoCode Aug 19, 2026
eed7cf5
docs(core2): marcar B2 operador como hecho en checklist
danielitoCode Aug 19, 2026
d646554
ci: disparar workflows en push/PR a Core2 (sin bloquear push)
danielitoCode Aug 19, 2026
7f5b485
fix(ci): unitTests returnDefaultValues en operador (Log stubs + corou…
danielitoCode Aug 19, 2026
769d9f8
fix(test): Triple invariante en FakeStockRepo (Double vs Double?)
danielitoCode Aug 19, 2026
9ef3378
fix(test): bySale MutableMap para getOrPut en FakeMovementRepo
danielitoCode Aug 21, 2026
27937c3
docs(core2): checklist — B3.1+CI verde, PRs merge, siguiente B3.2
danielitoCode Aug 21, 2026
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
2 changes: 2 additions & 0 deletions .github/workflows/android-tests-coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,13 @@ on:
- main
- master
- develop
- Core2
pull_request:
branches:
- main
- master
- develop
- Core2
workflow_dispatch:

permissions:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ci-android-client.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: CI Android Cliente

on:
push:
branches: [master, main]
branches: [master, main, Core2]
paths:
- "app/**"
- "shared-*/**"
Expand All @@ -16,7 +16,7 @@ on:
- "gradle.properties"
- ".github/workflows/ci-android-client.yml"
pull_request:
branches: [master, main]
branches: [master, main, Core2]
paths:
- "app/**"
- "shared-*/**"
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ci-android-operator.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: CI Android Operador

on:
push:
branches: [master, main]
branches: [master, main, Core2]
paths:
- "alejotallerscan/**"
- "shared-*/**"
Expand All @@ -16,7 +16,7 @@ on:
- "gradle.properties"
- ".github/workflows/ci-android-operator.yml"
pull_request:
branches: [master, main]
branches: [master, main, Core2]
paths:
- "alejotallerscan/**"
- "shared-*/**"
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ci-web.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ name: CI Web

on:
push:
branches: [master, main]
branches: [master, main, Core2]
paths:
- "web/**"
- ".github/workflows/ci-web.yml"
pull_request:
branches: [master, main]
branches: [master, main, Core2]
paths:
- "web/**"
- ".github/workflows/ci-web.yml"
Expand Down
33 changes: 6 additions & 27 deletions .github/workflows/fix-reservation-icon.yml
Original file line number Diff line number Diff line change
@@ -1,33 +1,12 @@
name: Fix reservation icon
# One-shot helper desactivado (el if sin comillas rompía el parseo YAML en Actions).
name: Fix reservation icon (disabled)

on:
push:
branches: [master]

permissions:
contents: write
workflow_dispatch:

jobs:
fix:
if: contains(github.event.head_commit.message, 'fix: reservation icon')
noop:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Replace unsupported icon
run: |
python - <<'PY'
from pathlib import Path
p = Path('web/src/core/infrastructure/presentation/routes/InternalReservationDetailScreen.svelte')
s = p.read_text(encoding='utf-8')
s = s.replace(' import shieldCheckIcon from "@ktibow/iconset-material-symbols/shield-check-rounded";\n', '')
s = s.replace('<Icon icon={shieldCheckIcon} />', '<Icon icon={checkCircleIcon} />')
p.write_text(s, encoding='utf-8')
PY
- name: Commit fix and remove helper workflow
run: |
rm -f .github/workflows/fix-reservation-icon.yml
git config user.name 'github-actions[bot]'
git config user.email '41898282+github-actions[bot]@users.noreply.github.com'
git add web/src/core/infrastructure/presentation/routes/InternalReservationDetailScreen.svelte .github/workflows/fix-reservation-icon.yml
git commit -m 'fix: remove unsupported reservation icon'
git push
- name: Disabled
run: echo "Workflow desactivado; se puede eliminar este archivo."
23 changes: 14 additions & 9 deletions .roadmap/Core2/APPWRITE_STOCK_MOVEMENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
| Recurso | ID propuesto | Estado |
|---------|--------------|--------|
| Database | el mismo `VITE_APPWRITE_DATABASE_ID` / `APPWRITE_DATABASE_ID` de Core 1 | ya en uso |
| Collection | **`stock_movements`** | **pendiente crear en consola** |
| Collection | **`stock_movements`** | **creada en consola** (2026-08-18, confirmado equipo) |
| Document `$id` | generado por Appwrite (o `{saleId}_{productId}` si se fuerza idempotencia) | — |

Convención alineada a colecciones ya usadas en web:
Expand All @@ -18,10 +18,13 @@ Convención alineada a colecciones ya usadas en web:
| `promotions` | promociones |
| `support_threads` / `support_messages` | soporte |
| **`stock_movements`** | Core 2 (este documento) |
| **`supplier`** | Core 2 finanzas entrada |
| **`purchase_entry`** / **`purchase_entry_line`** | Core 2 factura entrada |
| **`sale_finance_event`** | Core 2 ingreso/COGS al VERIFIED |

Android/operador leen product/sale vía `BuildConfig.PRODUCT_TABLE_ID` / `SALE_TABLE_ID` (local.properties). Cuando exista la collection, añadir p. ej. `STOCK_MOVEMENTS_TABLE_ID=stock_movements` (o hardcode del ID canónico si se mantiene estable).
Android/operador: añadir `STOCK_MOVEMENTS_TABLE_ID=stock_movements` (o hardcode del ID canónico) al cablear repos en bloque B1.

### Roles / permisos (MVP)
### Roles / permisos (MVP) — **aplicados en Appwrite**

| Actor | create | read | update | delete |
|-------|--------|------|--------|--------|
Expand All @@ -44,24 +47,26 @@ Android/operador leen product/sale vía `BuildConfig.PRODUCT_TABLE_ID` / `SALE_T
| `reason` | String | sí | |
| `user_id` | String | sí | operador o system |
| `sale_id` | String | no | obligatorio en práctica para `salida_venta` |
| `entry_id` | String | no | enlace a purchase_entry si aplica |

Índices sugeridos: `product_id`, `type`, `sale_id`, `$createdAt`.
Índices: `product_id`, `type`, `sale_id`, `$createdAt`.

**Carga inicial:** no requiere backfill histórico; registrar desde el día de activación.

---

## Verificación 0.2
## Verificación 0.2 / 2.1 schema

- [x] ID de collection **decidido**: `stock_movements`
- [x] Roles **decididos**: solo operador/admin (+ future Function); clientes sin acceso
- [ ] Collection **creada** en consola Appwrite del proyecto real
- [x] Roles **decididos** y **aplicados**: solo operador/admin (+ future Function); clientes sin acceso
- [x] Collection **creada** en consola Appwrite del proyecto real (2026-08-18)
- [x] Colecciones hermanas: `supplier`, `purchase_entry`, `purchase_entry_line`, `sale_finance_event`, `last_unit_cost` en product
- [ ] IDs reales del proyecto anotados aquí si difieren del canónico (pegar databaseId + collectionId)

Cuando esté creada, completar:
Cuando se anoten IDs reales:

```
databaseId: <VITE_APPWRITE_DATABASE_ID>
collectionId: stock_movements
createdAt: YYYY-MM-DD
createdAt: 2026-08-18
```
Loading
Loading