Skip to content

release-20260212#218

Merged
iDome89 merged 5 commits intomainfrom
develop
Feb 12, 2026
Merged

release-20260212#218
iDome89 merged 5 commits intomainfrom
develop

Conversation

@Kariamos
Copy link
Contributor

This pull request updates how supplier and cost type options are generated and selected in the OtherCosts section. Instead of relying on array indices, the code now uses unique IDs from the backend for both suppliers and cost types. This improves data consistency and prevents potential issues if the order of items changes. Additionally, the supplier creation flow is updated to use the new ID returned from the backend.

Key improvements:

Option Value Handling

  • Updated useCostTypes and useSuppliers hooks to use each item's unique id as the option value instead of the array index, ensuring more reliable identification and selection of options. [1] [2]

Supplier Creation Flow

  • Modified the supplier creation process in FormContent to use the actual supplier_id returned from the backend API when adding a new supplier, rather than calculating a new ID based on the current array length.

@iDome89 iDome89 merged commit 4473ae1 into main Feb 12, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants