fix: typo errors
gitea/salix/pipeline/head This commit looks good Details

This commit is contained in:
Vicent Llopis 2022-07-19 14:40:41 +02:00
parent 28deb34047
commit 318b688b67
2 changed files with 6 additions and 4 deletions

View File

@ -14,7 +14,7 @@ module.exports = Self => {
}, },
http: { http: {
path: `/:id/updateWorkCenter`, path: `/:id/updateWorkCenter`,
verb: 'GET' verb: 'POST'
} }
}); });
@ -34,7 +34,7 @@ module.exports = Self => {
try { try {
const [result] = await Self.rawSql(` const [result] = await Self.rawSql(`
SELECT IFNULL(wl.workCenterFK, r.defaultWorkCenterFk) AS commissionWorkCenter SELECT IFNULL(wl.workCenterFk, r.defaultWorkCenterFk) AS commissionWorkCenter
FROM vn.routeConfig r FROM vn.routeConfig r
LEFT JOIN vn.workerLabour wl ON wl.workerFk = ? LEFT JOIN vn.workerLabour wl ON wl.workerFk = ?
AND CURDATE() BETWEEN wl.started AND IFNULL(wl.ended, CURDATE()); AND CURDATE() BETWEEN wl.started AND IFNULL(wl.ended, CURDATE());

View File

@ -5,8 +5,10 @@ export default class Controller extends Section {
onSubmit() { onSubmit() {
this.$.watcher.submit().then( this.$.watcher.submit().then(
res => { res => {
this.$http.get(`Routes/${res.data.id}/updateWorkCenter`); this.$http.post(`Routes/${res.data.id}/updateWorkCenter`, null)
this.$state.go('route.card.summary', {id: res.data.id}); .then(() => {
this.$state.go('route.card.summary', {id: res.data.id});
});
} }
); );
} }