This commit is contained in:
Philipp Dormann 2024-12-16 17:03:06 +01:00
commit 4996b8c526
Signed by: philipp
GPG Key ID: 3BB9ADD52DCA4314
4 changed files with 38 additions and 7 deletions

View File

@ -2,9 +2,16 @@
All notable changes to this project will be documented in this file. Dates are displayed in UTC.
#### [1.2.0](https://git.odit.services/lfk/selfservice/compare/1.1.2...1.2.0)
- refacor(documents): Switch to new document-server [`721892c`](https://git.odit.services/lfk/selfservice/commit/721892c315de9c2c1158d0f728dc2ef387a5d8c2)
#### [1.1.2](https://git.odit.services/lfk/selfservice/compare/1.1.1...1.1.2)
> 11 December 2024
- chore(deps): bump all [`25c2a17`](https://git.odit.services/lfk/selfservice/commit/25c2a170bc9cde66498ae3d7f966201f2b28b679)
- 🚀Bumped version to v1.1.2 [`1d55445`](https://git.odit.services/lfk/selfservice/commit/1d55445c1b67ec2e1be73172d8e451f038451f59)
- refactor: drop postbuild step [`b21ad63`](https://git.odit.services/lfk/selfservice/commit/b21ad636ad69886878d5bd0f441f4187e4f22a5c)
- fix(profile): migrate to code128 [`762454a`](https://git.odit.services/lfk/selfservice/commit/762454a08674303881063337ddf86da564b191f1)

View File

@ -1,6 +1,6 @@
{
"name": "@odit/lfk-selfservice",
"version": "1.1.2",
"version": "1.2.0",
"type": "module",
"scripts": {
"dev": "vite",

View File

@ -4,7 +4,7 @@ const config = {
// required, with trailing slash
baseurl: '',
// full url (including fqdn)
baseurl_documentserver: 'http://localhost:4010/documents',
baseurl_documentserver: 'http://localhost:3000',
// optional, will fallback to code128
code_format: 'ean13',
// optional, will fallback to /imprint

View File

@ -607,12 +607,36 @@ function get_certificate() {
(navigator.languages && navigator.languages[0]) ||
""
).substr(0, 2);
let url = `${config.baseurl_documentserver}certificates?locale=${browserlocale}&download=true&key=${config.documentserver_key}`;
let postdata = Object.assign({}, state.fullobject);
postdata.group = {
name: postdata.group,
let url = `${config.baseurl_documentserver}/v1/pdfs/certificates?key=${config.documentserver_key}`;
let postdata = {
locale: browserlocale,
runners: [
{
first_name: state.firstname,
middle_name: state.middlename,
last_name: state.lastname,
id: state.fullobject.id,
distance: state.fullobject.distance,
group: {
name: state.group,
id: state.fullobject.group.id || 0,
},
distance_donations: state.fullobject.distanceDonations.map((s) => {
return {
id: s.id || 0,
amount: s.amount,
amount_per_distance: s.amountPerDistance,
donor: {
id: s.donor.id || 0,
first_name: s.donor.firstname,
middle_name: s.donor.middlename,
last_name: s.donor.lastname,
},
};
}),
}
]
};
postdata = [postdata];
axios
.post(url, postdata, {
responseType: "blob",