Browse Source

shop: cleanup request, update npm deps

master
parent
commit
88e4f1d8c0
4 changed files with 1056 additions and 854 deletions
  1. +849
    -624
      package-lock.json
  2. +4
    -4
      package.json
  3. +1
    -18
      static/js/shop.jsx
  4. +202
    -208
      static/js/shop.min.js

+ 849
- 624
package-lock.json
File diff suppressed because it is too large
View File


+ 4
- 4
package.json View File

@@ -12,10 +12,10 @@
"url": "https://git.m-labs.hk/M-Labs/web2019.git"
},
"devDependencies": {
"@babel/cli": "^7.6.4",
"@babel/core": "^7.6.4",
"@babel/preset-env": "^7.6.3",
"@babel/preset-react": "^7.6.3",
"@babel/cli": "^7.8.4",
"@babel/core": "^7.9.0",
"@babel/preset-env": "^7.9.5",
"@babel/preset-react": "^7.9.4",
"babel-preset-minify": "^0.5.1"
},
"babel": {


+ 1
- 18
static/js/shop.jsx View File

@@ -1846,20 +1846,11 @@ class Shop extends React.PureComponent {

const {data} = this.props;

const a = document.createElement('a');
const num = (new Date()).getTime();
const subject = `[Order hardware] - Request Quote`;
let body = `Hello!<br><br>I would like to request a quotation for my below configuration:<br><br>${JSON.stringify(crate)}<br><br>(Please do not edit the machine-readable representation above)<br><br>`;

if (note) {
body = `${body}<br><br>Additional note:<br><br>${note ? note.trim() : ''}`;
}

this.setState({isProcessing: true});

axios.post(data.API_RFQ, {
email,
body,
note,
configuration: JSON.stringify(crate),
headers: {'X-MLABS-OH': 'rlebcleu'}
}).then(response => {
@@ -1874,14 +1865,6 @@ class Shop extends React.PureComponent {
alert("We cannot receive your request. Try using the export by coping the configuration and send it to us at sales[at]m-labs.hk");
});
})

return;

document.body.appendChild(a);

a.style = 'display: none';
a.href = `mailto:sales@m-labs.hk?subject=${subject}&body=${encodeURIComponent(body)}`;
a.click();
}

handleOnDragEnd(result, newAdded) {


+ 202
- 208
static/js/shop.min.js
File diff suppressed because it is too large
View File


Loading…
Cancel
Save