Show Test Result

This commit is contained in:
saeid_01
2019-05-09 04:24:27 +04:30
parent 940a1b01ab
commit 116ef9e130
21 changed files with 504 additions and 173 deletions
Vendored
+1 -1
View File
@@ -219,7 +219,7 @@ function _asyncToGenerator(fn) { return function () { var self = this, args = ar
exports = module.exports = __webpack_require__(/*! ../../../../../node_modules/css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js")(false);
// Module
exports.push([module.i, "\n.WM-ActionButton[data-v-1346f0a2] {\r\n padding: 8px 22px;\n}\r\n", ""]);
exports.push([module.i, "\n.WM-ActionButton[data-v-1346f0a2] {\n padding: 8px 22px;\n}\n", ""]);
Vendored
+1 -1
View File
@@ -210,7 +210,7 @@ __webpack_require__.r(__webpack_exports__);
exports = module.exports = __webpack_require__(/*! ../../../../../node_modules/css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js")(false);
// Module
exports.push([module.i, "\n.WM-Border[data-v-7eb32e4a] {\r\n border: 1px solid;\n}\n.WM-Border-Black[data-v-7eb32e4a] {\r\n border-color: #2f353b !important;\n}\n.WM-Border-Gray[data-v-7eb32e4a] {\r\n border-color: #aaa !important;\n}\n.WM-Color-LightGrey[data-v-7eb32e4a] {\r\n background-color : #F5F5F5;\n}\n.WM-Relative[data-v-7eb32e4a] {\r\n position: relative;\n}\n.v-btn--top.v-btn--absolute.v-btn--small[data-v-7eb32e4a] {\r\n top: -25px !important;\n}\r\n", ""]);
exports.push([module.i, "\n.WM-Border[data-v-7eb32e4a] {\n border: 1px solid;\n}\n.WM-Border-Black[data-v-7eb32e4a] {\n border-color: #2f353b !important;\n}\n.WM-Border-Gray[data-v-7eb32e4a] {\n border-color: #aaa !important;\n}\n.WM-Color-LightGrey[data-v-7eb32e4a] {\n background-color : #F5F5F5;\n}\n.WM-Relative[data-v-7eb32e4a] {\n position: relative;\n}\n.v-btn--top.v-btn--absolute.v-btn--small[data-v-7eb32e4a] {\n top: -25px !important;\n}\n", ""]);
+176 -116
View File
@@ -157,6 +157,27 @@ function _asyncToGenerator(fn) { return function () { var self = this, args = ar
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
/* harmony default export */ __webpack_exports__["default"] = ({
@@ -174,8 +195,10 @@ function _asyncToGenerator(fn) { return function () { var self = this, args = ar
formData: {
autoclave_id: "",
result: "",
img: null,
test_type_id: ""
}
},
image: null
};
},
created: function created() {
@@ -248,7 +271,6 @@ function _asyncToGenerator(fn) { return function () { var self = this, args = ar
if (result.data.data.inputs[key].children.hasOwnProperty(keyForm)) {
if (result.data.data.inputs[key].children[keyForm].type == 'Checkbox' || result.data.data.inputs[key].children[keyForm].type == 'Select') {
this.formData[result.data.data.inputs[key].children[keyForm].name] = [];
console.log(this.formData[result.data.data.inputs[key].children[keyForm].name]);
} else {
this.formData[result.data.data.inputs[key].children[keyForm].name] = '';
}
@@ -340,7 +362,31 @@ function _asyncToGenerator(fn) { return function () { var self = this, args = ar
}
return submitForm;
}()
}(),
onFileChange: function onFileChange(e) {
var files = e.target.files || e.dataTransfer.files;
if (!files.length) return;
this.createImage(files[0]);
},
createImage: function createImage(file) {
var image = new Image();
var reader = new FileReader();
var vm = this;
reader.onload = function (e) {
vm.image = e.target.result;
};
reader.readAsDataURL(file);
},
removeImage: function removeImage(e) {
this.image = null;
}
},
watch: {
image: function image(img) {
this.formData.img = img;
}
}
});
@@ -539,6 +585,26 @@ var render = function() {
1
),
_vm._v(" "),
_c("v-flex", { attrs: { xs12: "", sm4: "", md3: "" } }, [
!_vm.image
? _c("div", [
_c("input", {
attrs: { type: "file" },
on: { change: _vm.onFileChange }
})
])
: _c("div", [
_c("img", {
staticStyle: { width: "100%" },
attrs: { src: _vm.image }
}),
_vm._v(" "),
_c("button", { on: { click: _vm.removeImage } }, [
_vm._v("Remove image")
])
])
]),
_vm._v(" "),
_vm._l(_vm.form, function(item, key) {
return _c(
"v-flex",
@@ -610,123 +676,117 @@ var render = function() {
_vm._v(" "),
item.type == "Form"
? [
_c("v-layout", { attrs: { row: "", wrap: "" } }, [
_c("h3", [_vm._v(_vm._s(item.name))])
]),
_vm._v(" "),
_c(
"v-layout",
{ attrs: { row: "", wrap: "" } },
[
_c("h3", [_vm._v(_vm._s(item.name))]),
_vm._v(" "),
_vm._l(item.children, function(
children,
keyChildren
) {
return _c(
"v-flex",
{
key: keyChildren,
class: ["pa-2", children.size]
},
[
children.type == "Text"
? _c("v-text-field", {
attrs: {
label: children.name,
color: "black"
},
model: {
value:
_vm.formData[children.name],
callback: function($$v) {
_vm.$set(
_vm.formData,
children.name,
$$v
)
},
expression:
"formData[children.name]"
}
})
: _vm._e(),
_vm._v(" "),
children.type == "Select"
? _c("v-select", {
attrs: {
multiple: "",
items: children.options,
label: children.name,
color: "black",
"item-text": "title",
"item-value": "id"
},
model: {
value:
_vm.formData[children.name],
callback: function($$v) {
_vm.$set(
_vm.formData,
children.name,
$$v
)
},
expression:
"formData[children.name]"
}
})
: _vm._e(),
_vm._v(" "),
children.type == "Checkbox"
? _c(
"v-container",
{ attrs: { fluid: "" } },
[
_c("p", [
_vm._v(_vm._s(children.name))
]),
_vm._v(" "),
_vm._l(
children.options,
function(
optionValue,
keyOption
) {
return _c("v-checkbox", {
key: keyOption,
attrs: {
label:
optionValue.title,
value: optionValue.id
},
model: {
value:
_vm.formData[
children.name
],
callback: function(
$$v
) {
_vm.$set(
_vm.formData,
children.name,
$$v
)
},
expression:
"formData[children.name]"
}
})
}
_vm._l(item.children, function(
children,
keyChildren
) {
return _c(
"v-flex",
{
key: keyChildren,
class: ["pa-2", children.size]
},
[
children.type == "Text"
? _c("v-text-field", {
attrs: {
label: children.name,
color: "black"
},
model: {
value:
_vm.formData[children.name],
callback: function($$v) {
_vm.$set(
_vm.formData,
children.name,
$$v
)
],
2
)
: _vm._e()
],
1
)
})
],
2
},
expression:
"formData[children.name]"
}
})
: _vm._e(),
_vm._v(" "),
children.type == "Select"
? _c("v-select", {
attrs: {
multiple: "",
items: children.options,
label: children.name,
color: "black",
"item-text": "title",
"item-value": "id"
},
model: {
value:
_vm.formData[children.name],
callback: function($$v) {
_vm.$set(
_vm.formData,
children.name,
$$v
)
},
expression:
"formData[children.name]"
}
})
: _vm._e(),
_vm._v(" "),
children.type == "Checkbox"
? _c(
"v-container",
{ attrs: { fluid: "" } },
[
_c("p", [
_vm._v(_vm._s(children.name))
]),
_vm._v(" "),
_vm._l(children.options, function(
optionValue,
keyOption
) {
return _c("v-checkbox", {
key: keyOption,
attrs: {
label: optionValue.title,
value: optionValue.id
},
model: {
value:
_vm.formData[
children.name
],
callback: function($$v) {
_vm.$set(
_vm.formData,
children.name,
$$v
)
},
expression:
"formData[children.name]"
}
})
})
],
2
)
: _vm._e()
],
1
)
}),
1
)
]
: _vm._e()
+11 -5
View File
@@ -149,7 +149,11 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
};
},
created: function created() {
this.load();
if (this.$route.name == 'NotVerifyTestResult') {
this.load(1, 'NotVerified');
} else {
this.load();
}
},
methods: _objectSpread({}, Object(vuex__WEBPACK_IMPORTED_MODULE_3__["mapMutations"])("modal", ["changeCurrentModal"]), {
load: function () {
@@ -157,6 +161,7 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
/*#__PURE__*/
_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function _callee() {
var page,
verified,
result,
_args = arguments;
return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function _callee$(_context) {
@@ -164,10 +169,11 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
switch (_context.prev = _context.next) {
case 0:
page = _args.length > 0 && _args[0] !== undefined ? _args[0] : 1;
_context.next = 3;
return _services__WEBPACK_IMPORTED_MODULE_1__["ApiService"].get(_config_urls__WEBPACK_IMPORTED_MODULE_2__["urls"].listTestResult(page));
verified = _args.length > 1 && _args[1] !== undefined ? _args[1] : null;
_context.next = 4;
return _services__WEBPACK_IMPORTED_MODULE_1__["ApiService"].get(_config_urls__WEBPACK_IMPORTED_MODULE_2__["urls"].listTestResult(page, verified));
case 3:
case 4:
result = _context.sent;
if (result && result.status == 200) {
@@ -176,7 +182,7 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
this.lastPage = result.data.data.last_page;
}
case 5:
case 6:
case "end":
return _context.stop();
}
Vendored
+1 -1
View File
@@ -562,7 +562,7 @@ function _asyncToGenerator(fn) { return function () { var self = this, args = ar
exports = module.exports = __webpack_require__(/*! ../../../../../node_modules/css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js")(false);
// Module
exports.push([module.i, "\n.WM-Border-Gray[data-v-5cc5a650] {\r\n border-color: #aaa !important;\n}\n.WM-Color-LightGrey[data-v-5cc5a650] {\r\n background-color: #f5f5f5;\n}\n.v-btn--top.v-btn--absolute.v-btn--small[data-v-5cc5a650] {\r\n top: -25px !important;\n}\n.v-btn--bottom.v-btn--absolute.v-btn--small[data-v-5cc5a650] {\r\n bottom: -24px !important;\n}\r\n", ""]);
exports.push([module.i, "\n.WM-Border-Gray[data-v-5cc5a650] {\n border-color: #aaa !important;\n}\n.WM-Color-LightGrey[data-v-5cc5a650] {\n background-color: #f5f5f5;\n}\n.v-btn--top.v-btn--absolute.v-btn--small[data-v-5cc5a650] {\n top: -25px !important;\n}\n.v-btn--bottom.v-btn--absolute.v-btn--small[data-v-5cc5a650] {\n bottom: -24px !important;\n}\n", ""]);
Vendored
+1 -1
View File
@@ -227,7 +227,7 @@ function _asyncToGenerator(fn) { return function () { var self = this, args = ar
exports = module.exports = __webpack_require__(/*! ../../../../../node_modules/css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js")(false);
// Module
exports.push([module.i, "\n.WM-ActionButton[data-v-b1f1b72e] {\r\n padding: 8px 22px;\n}\r\n", ""]);
exports.push([module.i, "\n.WM-ActionButton[data-v-b1f1b72e] {\n padding: 8px 22px;\n}\n", ""]);
Vendored
+1 -1
View File
@@ -98,7 +98,7 @@ __webpack_require__.r(__webpack_exports__);
icon: '/img/Static/Dashboard/notepad-colorful.png',
color: 'WM-PinkGradient-BG',
route: {
name: 'SubmitTestResult'
name: 'NotVerifyTestResult'
},
aligntext: 'text-md-center',
alignimg: 'text-md-left',
+1 -1
View File
@@ -1,3 +1,3 @@
{
"/vue/js/app.js": "/vue/js/app.js?id=571c3030afcd24e8d145"
"/vue/js/app.js": "/vue/js/app.js?id=b1ffa939001e67dfabbc"
}
+156 -15
View File
@@ -3459,6 +3459,36 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
@@ -8401,7 +8431,7 @@ exports.push([module.i, "/*!\n* Vuetify v1.5.11\n* Forged by John Leider\n* Rele
exports = module.exports = __webpack_require__(/*! ../../../../../node_modules/css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js")(false);
// Module
exports.push([module.i, "\n#core-footer {\r\n z-index: 0;\n}\r\n", ""]);
exports.push([module.i, "\n#core-footer {\n z-index: 0;\n}\n", ""]);
@@ -17395,19 +17425,120 @@ var render = function() {
attrs: { "align-center": "", wrap: "" }
},
[
_c(
"v-flex",
{ attrs: { xs12: "", md2: "", sm2: "" } },
[
_c("v-text-field", {
staticClass: "pa-2",
attrs: { label: "Name", color: "black" }
_c("v-flex", { attrs: { xs12: "", md12: "", sm12: "" } }, [
_c("div", [
_vm._v("Auto Clave Id : " + _vm._s(_vm.data.autoclave_id))
])
]),
_vm._v(" "),
_c("v-flex", { attrs: { xs12: "", md12: "", sm12: "" } }, [
_c("div", [_vm._v("Result : " + _vm._s(_vm.data.result))])
]),
_vm._v(" "),
_c("v-flex", { attrs: { xs12: "", md12: "", sm12: "" } }, [
_c("div", [_vm._v("verify : " + _vm._s(_vm.data.verified))])
]),
_vm._v(" "),
_c("v-flex", { attrs: { xs12: "", md12: "", sm12: "" } }, [
_c("div", [
_vm._v("Register User : " + _vm._s(_vm.data.user.name))
])
]),
_vm._v(" "),
_vm.data.inputs
? _vm._l(_vm.data.inputs, function(inputData, keyInputs) {
return _c(
"v-flex",
{
key: keyInputs,
attrs: { xs12: "", md12: "", sm12: "" }
},
[
_c("div", [
_vm._v(
_vm._s(keyInputs) + " : " + _vm._s(inputData)
)
])
]
)
})
],
1
)
: _vm._e(),
_vm._v(" "),
_vm.data.options
? _vm._l(_vm.data.options, function(
optionData,
keyOptions
) {
return _c(
"v-flex",
{
key: keyOptions,
attrs: { xs12: "", md12: "", sm12: "" }
},
[
_c(
"div",
[
_vm._v(_vm._s(keyOptions) + " : "),
_vm._l(optionData, function(data, dataKey) {
return _c("span", { key: dataKey }, [
_vm._v(_vm._s(data) + ", ")
])
})
],
2
)
]
)
})
: _vm._e(),
_vm._v(" "),
_vm.data.children
? _vm._l(_vm.data.children, function(formData, keyForm) {
return _c(
"v-flex",
{
key: keyForm,
attrs: { xs12: "", md12: "", sm12: "" }
},
[
_c("h1", [_vm._v(_vm._s(keyForm))]),
_vm._v(" "),
_vm._l(formData, function(childData, keyChild) {
return _c("div", { key: keyChild }, [
_c(
"div",
[
_vm._v(
_vm._s(keyChild) +
" : \n "
),
Array.isArray(childData)
? _vm._l(childData, function(
data,
dataKey
) {
return _c("span", { key: dataKey }, [
_vm._v(_vm._s(data) + ", ")
])
})
: [
_c("span", [
_vm._v(_vm._s(childData))
])
]
],
2
)
])
})
],
2
)
})
: _vm._e()
],
1
2
),
_vm._v(" "),
_c("v-divider"),
@@ -62364,6 +62495,12 @@ var urls = {
return "/TestTypes/".concat(id);
},
listTestResult: function listTestResult(page) {
var verified = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
if (verified) {
return "/TestResults/?verified=".concat(verified, "&page=").concat(page);
}
return "/TestResults?page=" + page;
},
editTestResult: function editTestResult(id) {
@@ -63006,6 +63143,10 @@ __webpack_require__.r(__webpack_exports__);
path: '/test-result/:testResult/edit',
name: 'EditTestResult',
view: 'TestResult/AddEdit'
}, {
path: '/test-result/NotVerified',
name: 'NotVerifyTestResult',
view: 'TestResult/List'
}]);
/***/ }),
@@ -63217,7 +63358,7 @@ var UserService = {
},
auth: {
username: "2",
password: "vAhCu2Y4mxfjlr8uTSxpBmjn2rWPIEolnr73ETAE"
password: "r46iu0QJFTrC30H0fEoBbxTGmbJQjjOlSQYFYS7w"
}
};
_context.prev = 1;
@@ -63277,7 +63418,7 @@ var UserService = {
},
auth: {
username: "2",
password: "vAhCu2Y4mxfjlr8uTSxpBmjn2rWPIEolnr73ETAE"
password: "r46iu0QJFTrC30H0fEoBbxTGmbJQjjOlSQYFYS7w"
}
};
_context2.prev = 2;
@@ -64525,7 +64666,7 @@ module.exports = webpackAsyncContext;
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
module.exports = __webpack_require__(/*! D:\Atom\Git\CSSD\resources\js\vue\main.js */"./resources/js/vue/main.js");
module.exports = __webpack_require__(/*! /home/saeid/Projects/Git/CSSD/resources/js/vue/main.js */"./resources/js/vue/main.js");
/***/ })