Skip to content

Commit

Permalink
Corrige les devis
Browse files Browse the repository at this point in the history
  • Loading branch information
polosson committed Apr 22, 2021
1 parent eff94bd commit 9130ecf
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 3 deletions.
2 changes: 1 addition & 1 deletion client/src/components/EventDetails/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ export default {
return;
}

const { value } = await Alert.ConfirmDelete(this.$t, 'estimate', false);
const { value } = await Alert.ConfirmDelete(this.$t, 'estimate');
if (!value) {
return;
}
Expand Down
2 changes: 1 addition & 1 deletion client/src/components/EventOverview/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ export default {
return;
}

const { value } = await Alert.ConfirmDelete(this.$t, 'estimate', false);
const { value } = await Alert.ConfirmDelete(this.$t, 'estimate');
if (!value) {
return;
}
Expand Down
4 changes: 4 additions & 0 deletions client/src/locale/en/pages.js
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,10 @@ export default {
'saved': "Tag saved.",
'deleted': "Tag deleted.",
},

'page-estimate': {
'confirm-delete': "Do you really want to delete this estimate?",
},
};
/* eslint-enable quotes */
/* eslint-enable quote-props */
4 changes: 4 additions & 0 deletions client/src/locale/fr/pages.js
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,10 @@ export default {
'saved': "Étiquette sauvegardée.",
'deleted': "Étiquette supprimée.",
},

'page-estimate': {
'confirm-delete': "Voulez-vous vraiment supprimer ce devis\u00a0?",
},
};
/* eslint-enable quotes */
/* eslint-enable quote-props */
6 changes: 5 additions & 1 deletion client/tests/unit/utils/formatOptions.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,11 @@ describe('formatOptions', () => {
company: { id: 1, name: 'Testing' },
},
];
const getLabel = ({ title, phone, company }) => `${title} ${phone}${company?.name || ''}`;
const getLabel = ({ title, phone, company }) => {
const companyName = company?.name || '';
return `${title} ${phone}${companyName}`;
};

const options = formatOptions(entities, getLabel);
expect(options).toEqual([
{ value: 1, label: 'test1 0123456789 − ' },
Expand Down
7 changes: 7 additions & 0 deletions server/src/views/pdf/estimate-default.twig
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,13 @@
{% endif %}
</tbody>
</table>

<p class="vspace5 size10">
Date d'acceptation du devis :
</p>
<p class="size10">
Signature du client, précédée la mention « bon pour accord » :
</p>
</div>

<div class="changePage vspace5">
Expand Down

0 comments on commit 9130ecf

Please sign in to comment.