1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2025-03-15 12:29:16 +01:00

Merge branch 'dev' for release 5.6.8

This commit is contained in:
Sylvain 2023-01-26 10:09:16 +01:00
commit 010d92cfbc
4 changed files with 21 additions and 9 deletions

View File

@ -1,5 +1,9 @@
# Changelog Fab-manager
## v5.6.8 2023 January 26
- Fix a bug: plan prices are not reported correctly in the interface
## v5.6.7 2023 January 25
- Fix a bug: updating plan prices
@ -14,7 +18,8 @@
- Fix a bug: unable to run task fix_invoice_item when some invoice items are associated with errors
- Fix a bug: invalid event date reported when the timezone in before UTC
- Fix a bug: unable to run accounting export if a line label was not defined
- Fix a security issue: updated rack to 2.2.6.2 to fix [CVE-2022-44571](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-44571)
- Fix a security issue: updated rack to 2.2.6.2 to fix [CVE-2022-44571](https
- cgi-bin/cvename.cgi?name=CVE-2022-44571)
- Fix a security issue: updated globalid to 1.0.1 to fix [CVE-2023-22799](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2023-22799)
- [TODO DEPLOY] `rails fablab:fix:invoice_items_in_error` THEN `rails fablab:fix_invoice_items` THEN `rails db:migrate`
@ -66,6 +71,7 @@
- Ability to disable generation of invoices at zero
- Accounting data is now built each night and saved in database
- Ability to define multiple accounting journal codes
- Ability to define accounting codes per resources (aka. advanced accounting)
- Ability to change the name of the VAT
- Ability to cancel a running subscription from the member edition view for admin/managers
- OpenAPI endpoint to fetch accounting data
@ -82,6 +88,7 @@
- Report subsription mismatch with user's group
- Added sentry for error reporting
- Report details of the due for invoices related to a payment schedule
- Migrated plan/machine/space/event forms to react
- Fix a bug: unable to run test in negative timezones (#425)
- Fix a bug: providing an array of attributes to filter OpenApi data, results in error
- Fix a bug: unable to manage stocks on new products

View File

@ -30,7 +30,7 @@ interface PlanPricingFormProps<TContext extends object> {
*/
export const PlanPricingForm = <TContext extends object>({ register, control, formState, setValue, onError }: PlanPricingFormProps<TContext>) => {
const { t } = useTranslation('admin');
const { fields } = useFieldArray({ control, name: 'prices_attributes' });
const { fields } = useFieldArray<Plan, 'prices_attributes'>({ control, name: 'prices_attributes' });
const [machines, setMachines] = useState<Array<Machine>>(null);
const [spaces, setSpaces] = useState<Array<Space>>(null);
@ -104,16 +104,18 @@ export const PlanPricingForm = <TContext extends object>({ register, control, fo
machines && {
id: 'machines',
title: t('app.admin.plan_pricing_form.machines'),
content: fields.filter(p => p.priceable_type === 'Machine').map((price, index) =>
renderPriceElement(price, index)
)
content: fields.map((price, index) => {
if (price.priceable_type !== 'Machine') return false;
return renderPriceElement(price, index);
}).filter(Boolean)
},
spaces && {
id: 'spaces',
title: t('app.admin.plan_pricing_form.spaces'),
content: fields.filter(p => p.priceable_type === 'Space').map((price, index) =>
renderPriceElement(price, index)
)
content: fields.map((price, index) => {
if (price.priceable_type !== 'Space') return false;
return renderPriceElement(price, index);
}).filter(Boolean)
}
]} />}
</div>

View File

@ -1,6 +1,6 @@
{
"name": "fab-manager",
"version": "5.6.7",
"version": "5.6.8",
"description": "Fab-manager is the FabLab management solution. It provides a comprehensive, web-based, open-source tool to simplify your administrative tasks and your marker's projects.",
"keywords": [
"fablab",

View File

@ -36,6 +36,9 @@ export const server = setupServer(
rest.post('/api/plans', (req, res, ctx) => {
return res(ctx.json(req.body));
}),
rest.put('/api/plans/:id', (req, res, ctx) => {
return res(ctx.json(req.body));
}),
rest.post('/api/users', (req, res, ctx) => {
/* eslint-disable camelcase */
const { user: { first_name, last_name, email } } = req.body;