diff --git a/AGENTS.md b/AGENTS.md index 937ae96..924100e 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -39,6 +39,15 @@ - ✅ Good: `() => props.getComponent()` - ❌ Avoid: `() => { return isEnabled ? EnabledComponent : DisabledComponent }` - Use multi-line arrow functions only when necessary for complex logic +- **Variable Usage**: Avoid unnecessary variables and inline when appropriate + - ✅ Good: `settings.value = getSettings(await getPickers())` + - ❌ Avoid: `const pickers = await getPickers(); settings.value = getSettings(pickers)` + - Only create variables when the value is used multiple times or improves readability +- **Guard Clauses**: Use guard clauses instead of wrapping if blocks when possible + - ✅ Good: `if (!condition) { return; }` followed by main logic + - ❌ Avoid: `if (condition) { main logic }` when condition is a validation check + - Reduces nesting and improves readability for validation/error cases + - **IMPORTANT**: Always use braces for if blocks (enforced by ESLint `curly` rule) ### Git Workflow diff --git a/app/eslint.config.ts b/app/eslint.config.ts index 58de045..4327f16 100644 --- a/app/eslint.config.ts +++ b/app/eslint.config.ts @@ -15,7 +15,7 @@ export default defineConfigWithVueTs( files: ['**/*.{ts,mts,tsx,vue}'], }, - globalIgnores(['**/dist/**', '**/dist-ssr/**', '**/coverage/**']), + globalIgnores(['**/dist/**', '**/dist-ssr/**', '**/coverage/**', '**/.vite/**']), pluginVue.configs['flat/essential'], vueTsConfigs.recommended, @@ -29,4 +29,10 @@ export default defineConfigWithVueTs( 'prefer-arrow-callback': 'error', }, }, + { + name: 'app/code-style', + rules: { + 'curly': 'error', + }, + }, ) diff --git a/app/specs/63-experimental-daily-count-ui.md b/app/specs/63-experimental-daily-count-ui.md index 72ff6ae..c0105c1 100644 --- a/app/specs/63-experimental-daily-count-ui.md +++ b/app/specs/63-experimental-daily-count-ui.md @@ -19,20 +19,23 @@ Instead of inputting each individual bin, allow the user to input the daily coun - [x] `/add` should use new `AddDailyCountView` - [x] `/pending` should use new `PendingDailyCountsView` - [x] `/history` should use new `DailyCountsHistoryView` -- [ ] `AddDailyCountView` should be the same as `AddBinView`, but instead should: - - [ ] Allow the user to input daily count rather than block, size, and bin ID - - [ ] Display the list of daily count options directly in the view to make the UX more efficient - - [ ] Use a 5 column grid from 1-25 to display the daily count options -- [ ] `PendingDailyCountsView` should be the same as `PendingBinsView`, but instaed should: - - [ ] Display the list of pending daily counts, with: - - [ ] Picker - - [ ] Count - - [ ] Delete button - - [ ] Should include the following in the SMS message - - [ ] Date - - [ ] Picker - - [ ] Daily count - - [ ] Weekly count +- [x] `AddDailyCountView` should be the same as `AddBinView`, but instead should: + - [x] Allow the user to input daily count rather than block, size, and bin ID + - [x] Display the list of daily count options directly in the view to make the UX more efficient + - [x] Use a 5 column grid from 1-25 to display the daily count options +- [x] `PendingDailyCountsView` should be the same as `PendingBinsView`, but instead should: + - [x] Display the list of pending daily counts, with: + - [x] Picker + - [x] Count + - [x] Tapping this should open dialog with number input to allow any count + - [x] Delete button + - [x] Include the total number of bins at the top of the page + - [x] This should be a sticky header at the top of the page + - [x] Should include the following in the SMS message + - [x] Date + - [x] Picker + - [x] Daily count + - [x] Weekly count - [ ] `DailyCountsHistoryView` should be the same as `BinsHistoryView`, but instead should: - [ ] Display the list of send daily count messages, with: - [ ] Picker diff --git a/app/src/lib/utils.ts b/app/src/lib/utils.ts index cbf3b65..4b5c182 100644 --- a/app/src/lib/utils.ts +++ b/app/src/lib/utils.ts @@ -5,7 +5,7 @@ import type { Picker } from '@/models/picker' // Second number is month // Third number is day // Fourth number is release index for that day (starts at 0) -export const appVersion = '2025.10.17.3' +export const appVersion = '2025.10.17.4' export const getUserProfile = async () => { const { diff --git a/app/src/views/PendingDailyCountsView.vue b/app/src/views/PendingDailyCountsView.vue index bec1dc8..0c4fd80 100644 --- a/app/src/views/PendingDailyCountsView.vue +++ b/app/src/views/PendingDailyCountsView.vue @@ -1,7 +1,233 @@ \ No newline at end of file +
+
+ + Sending... +
+
+
+ +
+
+
+
+ Total Bins: {{ totalCount }} +
+ +
+
+
+ + +
+
+ No pending daily counts +
+ + +
+
+

+ Edit Count for {{ editingCount.picker }} +

+ + + +
+ + +
+
+
+