pull develop
このコミットが含まれているのは:
コミット
c744bf1a14
|
@ -523,27 +523,40 @@ class MeetingsController extends Controller {
|
|||
if (isset($r->memo)) $update['memo'] = $r->memo;
|
||||
|
||||
try {
|
||||
// リクエストでPDFがある場合
|
||||
if (isset($r->pdf)) {
|
||||
$filename = uniqid() . '.pdf';
|
||||
$pdf = base64_decode(substr($r->pdf, strpos($r->pdf, ',') + 1));
|
||||
|
||||
// DBにミーティングがある場合
|
||||
if ($chk = Meeting::select('pdf')->where('id', (int)$meeting_id)->first()) {
|
||||
$opdf = str_replace('/storage/', '', $chk->pdf);
|
||||
if (strcmp(Storage::disk('public')->get($opdf), $pdf) !== 0) {
|
||||
// base64の場合(ファイルパスだったら、スキップ)
|
||||
if (!preg_match('/\/storage\/(.*).pdf/', $r->pdf)) {
|
||||
// もう存在しているPDFのファイル名からパスを外します。
|
||||
$opdf = str_replace('/storage/', '', $chk->pdf);
|
||||
|
||||
// PDFのbase64をGETします。
|
||||
$pdf = base64_decode(substr($r->pdf, strpos($r->pdf, ',') + 1));
|
||||
|
||||
// 既にPDFが存在する場合(なければ、スキップ)
|
||||
if (Storage::disk('public')->exists($opdf)) {
|
||||
Storage::disk('public')->delete($opdf);
|
||||
// 既に存在しているPDFとアップロードしているPDFを比べてみます。異なる場合、存在しているPDFを削除します。
|
||||
if (strcmp(Storage::disk('public')->get($opdf), $pdf) !== 0) {
|
||||
Storage::disk('public')->delete($opdf);
|
||||
}
|
||||
}
|
||||
|
||||
$update['pdf'] = '/storage/'.$filename;
|
||||
Storage::disk('public')->put($filename, $pdf);
|
||||
}
|
||||
}
|
||||
// なければ、そのままストレージに保存します。
|
||||
else {
|
||||
$update['pdf'] = '/storage/'.$filename;
|
||||
Storage::disk('public')->put($filename, $pdf);
|
||||
}
|
||||
}
|
||||
|
||||
// データベースに保存します。
|
||||
Meeting::where('id', (int)$meeting_id)->update($update);
|
||||
} catch (\Throwable $e) {
|
||||
Log::critical($e->getMessage());
|
||||
|
|
|
@ -10,6 +10,10 @@
|
|||
background-color: #F0DE00 !important;
|
||||
}
|
||||
|
||||
body {
|
||||
padding: 0 !important;
|
||||
}
|
||||
|
||||
/*!
|
||||
* Bootstrap v4.6.0 (https://getbootstrap.com/)
|
||||
* Copyright 2011-2021 The Bootstrap Authors
|
||||
|
@ -12201,3 +12205,11 @@ a {
|
|||
.p-file-image figure.image-upload:after {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
.avatar-img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
-o-object-fit: cover;
|
||||
object-fit: cover;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
|
|
@ -36077,12 +36077,8 @@ var ChildDetail = function ChildDetail(props) {
|
|||
})
|
||||
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("img", {
|
||||
src: image,
|
||||
alt: "",
|
||||
width: "100%",
|
||||
height: "100%",
|
||||
style: {
|
||||
borderRadius: '50%'
|
||||
}
|
||||
className: "avatar-img",
|
||||
alt: "avatar-img"
|
||||
})]
|
||||
}), _422errors.image && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("span", {
|
||||
className: "l-alert__text--error ft-16 ft-md-14",
|
||||
|
@ -36804,7 +36800,7 @@ var Child = function Child() {
|
|||
className: "user-avatar",
|
||||
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("img", {
|
||||
alt: "name",
|
||||
className: "avatar-img rounded-circle",
|
||||
className: "avatar-img",
|
||||
src: child.image
|
||||
})
|
||||
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsxs)("div", {
|
||||
|
@ -37157,8 +37153,8 @@ var AdminLogin = function AdminLogin() {
|
|||
init_error();
|
||||
axios__WEBPACK_IMPORTED_MODULE_2___default().post('/api/admin/login', formdata).then(function (response) {
|
||||
if (response.data.status_code == 200) {
|
||||
setSuccess('ログインに成功しました。');
|
||||
window.location.href = '/admin/meeting';
|
||||
localStorage.setItem("from_login", true);
|
||||
window.location.href = "/admin/meeting";
|
||||
} else if (response.data.status_code == 422) {
|
||||
set422Errors(response.data.error_messages);
|
||||
} else if (response.data.status_code == 400) {
|
||||
|
@ -37249,15 +37245,6 @@ var AdminLogin = function AdminLogin() {
|
|||
return set400Error(null);
|
||||
},
|
||||
children: _400error
|
||||
}), _success && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_component_alert__WEBPACK_IMPORTED_MODULE_3__.default, {
|
||||
type: "success",
|
||||
hide: function hide() {
|
||||
return history.push({
|
||||
pathname: "/admin/meeting",
|
||||
state: {}
|
||||
});
|
||||
},
|
||||
children: _success
|
||||
})]
|
||||
});
|
||||
}; // ----------------------------------------------------------------------
|
||||
|
@ -37302,6 +37289,14 @@ __webpack_require__.r(__webpack_exports__);
|
|||
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
|
||||
|
||||
|
||||
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
||||
|
||||
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
||||
|
||||
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
||||
|
||||
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
||||
|
||||
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
||||
|
||||
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
||||
|
@ -37342,6 +37337,7 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|||
|
||||
|
||||
|
||||
|
||||
var Transition = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__.forwardRef(function Transition(props, ref) {
|
||||
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(_mui_material_Slide__WEBPACK_IMPORTED_MODULE_8__.default, _objectSpread({
|
||||
direction: "up",
|
||||
|
@ -37376,23 +37372,28 @@ var MeetingDetail = function MeetingDetail(props) {
|
|||
|
||||
var _useState9 = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(''),
|
||||
_useState10 = _slicedToArray(_useState9, 2),
|
||||
_400error = _useState10[0],
|
||||
set400Error = _useState10[1];
|
||||
thumbnail = _useState10[0],
|
||||
setThumbnail = _useState10[1];
|
||||
|
||||
var _useState11 = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(''),
|
||||
_useState12 = _slicedToArray(_useState11, 2),
|
||||
_success = _useState12[0],
|
||||
setSuccess = _useState12[1];
|
||||
_400error = _useState12[0],
|
||||
set400Error = _useState12[1];
|
||||
|
||||
var _useState13 = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(false),
|
||||
var _useState13 = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(''),
|
||||
_useState14 = _slicedToArray(_useState13, 2),
|
||||
showPdf = _useState14[0],
|
||||
setShowPdf = _useState14[1];
|
||||
_success = _useState14[0],
|
||||
setSuccess = _useState14[1];
|
||||
|
||||
var _useState15 = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(false),
|
||||
_useState16 = _slicedToArray(_useState15, 2),
|
||||
showMemo = _useState16[0],
|
||||
setShowMemo = _useState16[1];
|
||||
showPdf = _useState16[0],
|
||||
setShowPdf = _useState16[1];
|
||||
|
||||
var _useState17 = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(false),
|
||||
_useState18 = _slicedToArray(_useState17, 2),
|
||||
showMemo = _useState18[0],
|
||||
setShowMemo = _useState18[1];
|
||||
|
||||
(0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {
|
||||
var _props$match$params;
|
||||
|
@ -37403,7 +37404,6 @@ var MeetingDetail = function MeetingDetail(props) {
|
|||
|
||||
if (response.data.status_code == 200) {
|
||||
var list = response.data.params;
|
||||
console.log(list);
|
||||
var total = 0,
|
||||
num = 0;
|
||||
|
||||
|
@ -37418,6 +37418,7 @@ var MeetingDetail = function MeetingDetail(props) {
|
|||
denominator: total,
|
||||
numerator: num
|
||||
}));
|
||||
if (list.meeting_image.length > 0) setThumbnail(list.meeting_image[0].image);
|
||||
} else if (response.data.status_code == 400) {//TODO
|
||||
}
|
||||
});
|
||||
|
@ -37570,7 +37571,7 @@ var MeetingDetail = function MeetingDetail(props) {
|
|||
className: "avatar",
|
||||
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)("img", {
|
||||
alt: "name",
|
||||
className: "avatar-img rounded-circle",
|
||||
className: "avatar-img",
|
||||
src: x.child.image
|
||||
})
|
||||
})
|
||||
|
@ -37620,22 +37621,42 @@ var MeetingDetail = function MeetingDetail(props) {
|
|||
className: "p-file-list",
|
||||
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)("div", {
|
||||
className: "p-file-for",
|
||||
children: meeting.meeting_image[0] && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)("figure", {
|
||||
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)("img", {
|
||||
src: meeting.meeting_image[0].image,
|
||||
alt: meeting.meeting_image[0].image
|
||||
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)("figure", {
|
||||
style: {
|
||||
height: '300px'
|
||||
},
|
||||
children: thumbnail && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)("img", {
|
||||
src: thumbnail,
|
||||
alt: "thumbnail",
|
||||
style: {
|
||||
width: '100%',
|
||||
height: '100%',
|
||||
objectFit: 'contain'
|
||||
}
|
||||
})
|
||||
})
|
||||
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)("div", {
|
||||
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsxs)("div", {
|
||||
className: "p-file-nav",
|
||||
children: (_meeting$meeting_imag = meeting.meeting_image) === null || _meeting$meeting_imag === void 0 ? void 0 : _meeting$meeting_imag.map(function (x, k) {
|
||||
children: [(_meeting$meeting_imag = meeting.meeting_image) === null || _meeting$meeting_imag === void 0 ? void 0 : _meeting$meeting_imag.map(function (x, k) {
|
||||
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)("figure", {
|
||||
style: {
|
||||
minWidth: '100px'
|
||||
},
|
||||
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)("img", {
|
||||
src: x.image,
|
||||
alt: x.image
|
||||
alt: x.image,
|
||||
onClick: function onClick(e) {
|
||||
return setThumbnail(x.image);
|
||||
}
|
||||
})
|
||||
}, k);
|
||||
})
|
||||
}), _toConsumableArray(Array(10 - meeting.meeting_image.length)).map(function (x, k) {
|
||||
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)("figure", {
|
||||
style: {
|
||||
minWidth: '100px'
|
||||
}
|
||||
}, k);
|
||||
})]
|
||||
})]
|
||||
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsxs)("div", {
|
||||
className: "p-article__pdf",
|
||||
|
@ -37878,18 +37899,13 @@ var MeetingEdit = function MeetingEdit(props) {
|
|||
|
||||
var _useState23 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(false),
|
||||
_useState24 = _slicedToArray(_useState23, 2),
|
||||
check_all = _useState24[0],
|
||||
setCheckAll = _useState24[1];
|
||||
check_radio = _useState24[0],
|
||||
setCheckRadio = _useState24[1];
|
||||
|
||||
var _useState25 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(false),
|
||||
var _useState25 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)([]),
|
||||
_useState26 = _slicedToArray(_useState25, 2),
|
||||
check_some = _useState26[0],
|
||||
setCheckSome = _useState26[1];
|
||||
|
||||
var _useState27 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)([]),
|
||||
_useState28 = _slicedToArray(_useState27, 2),
|
||||
selectedIndex = _useState28[0],
|
||||
setSelectedIndex = _useState28[1];
|
||||
selectedIndex = _useState26[0],
|
||||
setSelectedIndex = _useState26[1];
|
||||
|
||||
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
|
||||
var _props$match$params;
|
||||
|
@ -37901,7 +37917,6 @@ var MeetingEdit = function MeetingEdit(props) {
|
|||
if (response.data.status_code == 200) {
|
||||
var _response$data$params, _response$data$params2, _response$data$params3, _response$data$params4, _response$data$params5, _response$data$params6;
|
||||
|
||||
console.log(response.data.params);
|
||||
setTitle((_response$data$params = response.data.params) === null || _response$data$params === void 0 ? void 0 : _response$data$params.title);
|
||||
setMemo((_response$data$params2 = response.data.params) === null || _response$data$params2 === void 0 ? void 0 : _response$data$params2.memo);
|
||||
setText((_response$data$params3 = response.data.params) === null || _response$data$params3 === void 0 ? void 0 : _response$data$params3.text);
|
||||
|
@ -37912,12 +37927,6 @@ var MeetingEdit = function MeetingEdit(props) {
|
|||
}
|
||||
});
|
||||
}, []);
|
||||
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
|
||||
if (check_all) setCheckSome(false);
|
||||
}, [check_all]);
|
||||
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
|
||||
if (check_some) setCheckAll(false);
|
||||
}, [check_some]);
|
||||
|
||||
var handleSubmit = function handleSubmit(e) {
|
||||
e.preventDefault();
|
||||
|
@ -37941,7 +37950,6 @@ var MeetingEdit = function MeetingEdit(props) {
|
|||
setSubmit(true);
|
||||
axios__WEBPACK_IMPORTED_MODULE_1___default().put("/api/admin/meetings/update/".concat((_props$match$params2 = props.match.params) === null || _props$match$params2 === void 0 ? void 0 : _props$match$params2.meeting_id), request).then(function (response) {
|
||||
setSubmit(false);
|
||||
console.log(response.data);
|
||||
|
||||
switch (response.data.status_code) {
|
||||
case 200:
|
||||
|
@ -37976,8 +37984,6 @@ var MeetingEdit = function MeetingEdit(props) {
|
|||
meeting_id: props.match.params.meeting_id
|
||||
}
|
||||
}).then(function (response) {
|
||||
console.log(response.data);
|
||||
|
||||
switch (response.data.status_code) {
|
||||
case 200:
|
||||
setMeetingImages(response.data.params);
|
||||
|
@ -38227,12 +38233,12 @@ var MeetingEdit = function MeetingEdit(props) {
|
|||
htmlFor: "allmember_send",
|
||||
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)("input", {
|
||||
className: "boolean optional",
|
||||
type: "checkbox",
|
||||
name: "allmember_send",
|
||||
type: "radio",
|
||||
id: "allmember_send",
|
||||
checked: check_all,
|
||||
onChange: function onChange(e) {
|
||||
return setCheckAll(!check_all);
|
||||
name: "check_radio",
|
||||
value: false,
|
||||
onClick: function onClick(e) {
|
||||
return setCheckRadio(e.target.value);
|
||||
}
|
||||
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)("span", {
|
||||
children: "\u5168\u54E1\u306B\u9001\u4FE1"
|
||||
|
@ -38244,19 +38250,19 @@ var MeetingEdit = function MeetingEdit(props) {
|
|||
htmlFor: "pickup_send",
|
||||
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)("input", {
|
||||
className: "boolean optional",
|
||||
type: "checkbox",
|
||||
name: "pickup_send",
|
||||
type: "radio",
|
||||
id: "pickup_send",
|
||||
checked: check_some,
|
||||
onChange: function onChange(e) {
|
||||
return setCheckSome(!check_some);
|
||||
name: "check_radio",
|
||||
value: true,
|
||||
onClick: function onClick(e) {
|
||||
return setCheckRadio(e.target.value);
|
||||
}
|
||||
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)("span", {
|
||||
children: "\u9078\u3093\u3067\u9001\u4FE1"
|
||||
})]
|
||||
})
|
||||
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)("div", {
|
||||
className: "checkbox-wrap edit-bg ".concat(approval_list.length == 0 && 'd-none'),
|
||||
className: "checkbox-wrap edit-bg ".concat((approval_list.length == 0 || check_radio != "true") && 'd-none'),
|
||||
children: approval_list === null || approval_list === void 0 ? void 0 : approval_list.map(function (item, k) {
|
||||
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)("div", {
|
||||
className: "checkbox",
|
||||
|
@ -38266,7 +38272,6 @@ var MeetingEdit = function MeetingEdit(props) {
|
|||
className: "boolean optional",
|
||||
type: "checkbox",
|
||||
id: "user_name".concat(k),
|
||||
disabled: !check_some,
|
||||
onChange: handleApproval
|
||||
}), "".concat(item.child.first_name, " ").concat(item.child.last_name)]
|
||||
})
|
||||
|
@ -38390,9 +38395,15 @@ var Meeting = function Meeting() {
|
|||
|
||||
var _useState9 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(''),
|
||||
_useState10 = _slicedToArray(_useState9, 2),
|
||||
_400error = _useState10[0],
|
||||
set400error = _useState10[1];
|
||||
_success = _useState10[0],
|
||||
setSuccess = _useState10[1];
|
||||
|
||||
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
|
||||
if (localStorage.getItem("from_login")) {
|
||||
setSuccess("ログインに成功しました!");
|
||||
localStorage.removeItem("from_login");
|
||||
}
|
||||
}, []);
|
||||
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
|
||||
setLoaded(false);
|
||||
axios__WEBPACK_IMPORTED_MODULE_2___default().get('/api/admin/meetings/list').then(function (response) {
|
||||
|
@ -38401,7 +38412,6 @@ var Meeting = function Meeting() {
|
|||
if (response.data.status_code == 200) {
|
||||
//------------Calculate Numerator & Denominator--------------
|
||||
var list = response.data.params;
|
||||
console.log(list);
|
||||
var arr = [];
|
||||
|
||||
for (var i in list) {
|
||||
|
@ -38591,7 +38601,7 @@ var Meeting = function Meeting() {
|
|||
className: "avatar",
|
||||
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("img", _defineProperty({
|
||||
alt: "name",
|
||||
className: "avatar-img rounded-circle",
|
||||
className: "avatar-img",
|
||||
src: x.child.image
|
||||
}, "alt", x.child.image))
|
||||
})
|
||||
|
@ -38608,9 +38618,9 @@ var Meeting = function Meeting() {
|
|||
children: "\u30C7\u30FC\u30BF\u304C\u5B58\u5728\u3057\u3066\u3044\u307E\u305B\u3093\u3002"
|
||||
}))]
|
||||
})
|
||||
}), _400error && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_component_alert__WEBPACK_IMPORTED_MODULE_3__.default, {
|
||||
type: "fail",
|
||||
children: _400error
|
||||
}), _success && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_component_alert__WEBPACK_IMPORTED_MODULE_3__.default, {
|
||||
type: "success",
|
||||
children: _success
|
||||
})]
|
||||
})
|
||||
})]
|
||||
|
@ -38947,12 +38957,8 @@ var ParentDetail = function ParentDetail(props) {
|
|||
})
|
||||
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("img", {
|
||||
src: image,
|
||||
alt: "",
|
||||
width: "100%",
|
||||
height: "100%",
|
||||
style: {
|
||||
borderRadius: '50%'
|
||||
}
|
||||
className: "avatar-img",
|
||||
alt: "avatar-img"
|
||||
})]
|
||||
}), _422errors.image && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("span", {
|
||||
className: "l-alert__text--error ft-16 ft-md-14",
|
||||
|
@ -39599,7 +39605,7 @@ var Parent = function Parent() {
|
|||
className: "user-avatar",
|
||||
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("img", {
|
||||
alt: "name",
|
||||
className: "avatar-img rounded-circle",
|
||||
className: "avatar-img",
|
||||
src: father.image
|
||||
})
|
||||
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsxs)("div", {
|
||||
|
|
|
@ -141,7 +141,7 @@ const ChildDetail = (props) => {
|
|||
{/* <img src="/assets/img/icon/camera.svg" width="20" height="20"/> */}
|
||||
</IconButton>
|
||||
</label>
|
||||
<img src={image} alt="" width ="100%" height="100%" style={{borderRadius:'50%'}}/>
|
||||
<img src={image} className="avatar-img" alt="avatar-img"/>
|
||||
</div>
|
||||
{
|
||||
_422errors.image &&
|
||||
|
|
|
@ -98,7 +98,7 @@ const Child = () => {
|
|||
<Link to = {`/admin/child/detail/${child.id}`}>
|
||||
<div className="user-wrap">
|
||||
<div className="user-avatar">
|
||||
<img alt="name" className="avatar-img rounded-circle" src={ child.image } />
|
||||
<img alt="name" className="avatar-img" src={ child.image } />
|
||||
</div>
|
||||
<div className="user-info">
|
||||
<p className="user-name mb-1 font-weight-bold">{ child.last_name } { child.first_name }</p>
|
||||
|
|
|
@ -33,8 +33,8 @@ const AdminLogin = () => {
|
|||
axios.post('/api/admin/login', formdata)
|
||||
.then(response => {
|
||||
if(response.data.status_code == 200){
|
||||
setSuccess('ログインに成功しました。');
|
||||
window.location.href = '/admin/meeting';
|
||||
localStorage.setItem("from_login", true);
|
||||
window.location.href = "/admin/meeting";
|
||||
}
|
||||
else if(response.data.status_code == 422){
|
||||
set422Errors(response.data.error_messages);
|
||||
|
@ -98,15 +98,6 @@ const AdminLogin = () => {
|
|||
{
|
||||
_400error && <Alert type="fail" hide={()=>set400Error(null)}>{_400error}</Alert>
|
||||
}
|
||||
{
|
||||
_success &&
|
||||
<Alert type="success"
|
||||
hide={()=>
|
||||
history.push({
|
||||
pathname: "/admin/meeting",
|
||||
state: {}
|
||||
})}>{_success}</Alert>
|
||||
}
|
||||
</main>
|
||||
|
||||
)
|
||||
|
|
|
@ -17,6 +17,7 @@ import Slide from '@mui/material/Slide';
|
|||
import Alert from '../../component/alert';
|
||||
import ModalPdf from '../../component/admin/pdf_modal_admin';
|
||||
import ModalMemo from '../../component/admin/modal_memo';
|
||||
import { minWidth } from '@material-ui/system';
|
||||
|
||||
|
||||
const Transition = React.forwardRef(function Transition(props, ref) {
|
||||
|
@ -32,6 +33,7 @@ const MeetingDetail = (props) => {
|
|||
const [loaded, setLoaded] = useState(false);
|
||||
const [submit, setSubmit] = useState(false);
|
||||
const [meeting, setMeeting] = useState(null);
|
||||
const [thumbnail, setThumbnail] = useState('');
|
||||
|
||||
const [_400error, set400Error] = useState('');
|
||||
const [_success, setSuccess] = useState('');
|
||||
|
@ -47,7 +49,6 @@ const MeetingDetail = (props) => {
|
|||
setLoaded(true);
|
||||
if(response.data.status_code==200){
|
||||
var list = response.data.params;
|
||||
console.log(list);
|
||||
var total=0, num=0;
|
||||
if(list.approval){
|
||||
for(var i in list.approval)
|
||||
|
@ -57,6 +58,7 @@ const MeetingDetail = (props) => {
|
|||
}
|
||||
}
|
||||
setMeeting({...list, denominator:total, numerator:num});
|
||||
if(list.meeting_image.length > 0) setThumbnail(list.meeting_image[0].image);
|
||||
} else if(response.data.status_code==400){
|
||||
//TODO
|
||||
}
|
||||
|
@ -125,7 +127,7 @@ const MeetingDetail = (props) => {
|
|||
meeting.approval?.map((x, k)=>
|
||||
<li className="meeting-member__item" role="listitem" key={k}>
|
||||
<div className="avatar">
|
||||
<img alt="name" className="avatar-img rounded-circle" src={x.child.image} />
|
||||
<img alt="name" className="avatar-img" src={x.child.image} />
|
||||
</div>
|
||||
</li>
|
||||
)
|
||||
|
@ -161,15 +163,25 @@ const MeetingDetail = (props) => {
|
|||
|
||||
<div className="p-file-list">
|
||||
<div className="p-file-for">
|
||||
<figure style={{height:'300px'}}>
|
||||
{
|
||||
meeting.meeting_image[0] &&
|
||||
<figure><img src={meeting.meeting_image[0].image} alt={meeting.meeting_image[0].image} /></figure>
|
||||
thumbnail &&
|
||||
<img src={thumbnail} alt="thumbnail"
|
||||
style={{width: '100%', height:'100%', objectFit:'contain'}}/>
|
||||
}
|
||||
</figure>
|
||||
</div>
|
||||
<div className="p-file-nav">
|
||||
{
|
||||
meeting.meeting_image?.map((x, k)=>
|
||||
<figure key={k}><img src={x.image} alt={x.image} /></figure>
|
||||
<figure key={k} style={{minWidth:'100px'}}>
|
||||
<img src={x.image} alt={x.image} onClick={e=>setThumbnail(x.image)}/>
|
||||
</figure>
|
||||
)
|
||||
}
|
||||
{
|
||||
[...Array(10-meeting.meeting_image.length)].map((x, k)=>
|
||||
<figure key={k} style={{minWidth:'100px'}}></figure>
|
||||
)
|
||||
}
|
||||
</div>
|
||||
|
|
|
@ -29,8 +29,7 @@ const MeetingEdit = (props) => {
|
|||
const [loaded, setLoaded] = useState(false);
|
||||
const [submit, setSubmit] = useState(false);
|
||||
|
||||
const [check_all, setCheckAll] = useState(false);
|
||||
const [check_some, setCheckSome] = useState(false);
|
||||
const [check_radio, setCheckRadio] = useState(false);
|
||||
const [selectedIndex, setSelectedIndex] = useState([]);
|
||||
|
||||
|
||||
|
@ -40,7 +39,6 @@ const MeetingEdit = (props) => {
|
|||
.then(response => {
|
||||
setLoaded(true);
|
||||
if(response.data.status_code==200){
|
||||
console.log(response.data.params);
|
||||
setTitle(response.data.params?.title);
|
||||
setMemo(response.data.params?.memo);
|
||||
setText(response.data.params?.text);
|
||||
|
@ -55,15 +53,6 @@ const MeetingEdit = (props) => {
|
|||
}, []);
|
||||
|
||||
|
||||
useEffect(()=>{
|
||||
if(check_all) setCheckSome(false);
|
||||
}, [check_all])
|
||||
|
||||
useEffect(()=>{
|
||||
if(check_some) setCheckAll(false);
|
||||
}, [check_some])
|
||||
|
||||
|
||||
const handleSubmit = (e) => {
|
||||
e.preventDefault();
|
||||
set422Errors({title:'',memo:'',text:'',pdf:'',image:''});
|
||||
|
@ -73,7 +62,6 @@ const MeetingEdit = (props) => {
|
|||
axios.put(`/api/admin/meetings/update/${props.match.params?.meeting_id}`, request)
|
||||
.then(response => {
|
||||
setSubmit(false);
|
||||
console.log(response.data)
|
||||
switch(response.data.status_code){
|
||||
case 200: setSuccess("更新成功しました!"); break;
|
||||
case 400: set400Error("更新失敗しました。"); break;
|
||||
|
@ -96,7 +84,6 @@ const MeetingEdit = (props) => {
|
|||
formdata.append('image', reader.result);
|
||||
axios.post(`/api/admin/meeting/images/register`, formdata, {params:{meeting_id: props.match.params.meeting_id}})
|
||||
.then(response => {
|
||||
console.log(response.data)
|
||||
switch(response.data.status_code){
|
||||
case 200: setMeetingImages(response.data.params); notify_save(); break;
|
||||
case 400: set400Error(response.data.error_messages); break;
|
||||
|
@ -265,11 +252,12 @@ const MeetingEdit = (props) => {
|
|||
<div className={`edit-set edit-set-send ${approval_list.length == 0 && 'd-none'}`}>
|
||||
<label htmlFor="allmember_send">
|
||||
<input className="boolean optional"
|
||||
type="checkbox"
|
||||
name="allmember_send"
|
||||
id="allmember_send"
|
||||
checked = {check_all}
|
||||
onChange={e=>setCheckAll(!check_all)}/>
|
||||
type="radio"
|
||||
id="allmember_send"
|
||||
name="check_radio"
|
||||
value={false}
|
||||
onClick={e=>setCheckRadio(e.target.value)}
|
||||
/>
|
||||
<span>全員に送信</span>
|
||||
</label>
|
||||
</div>
|
||||
|
@ -277,16 +265,17 @@ const MeetingEdit = (props) => {
|
|||
<div className={`edit-set-mt5 edit-set-send ${approval_list.length == 0 && 'd-none'}`}>
|
||||
<label htmlFor="pickup_send">
|
||||
<input className="boolean optional"
|
||||
type="checkbox"
|
||||
name="pickup_send"
|
||||
id="pickup_send"
|
||||
checked={check_some}
|
||||
onChange={e=>setCheckSome(!check_some)}/>
|
||||
type="radio"
|
||||
id="pickup_send"
|
||||
name="check_radio"
|
||||
value={true}
|
||||
onClick={e=>setCheckRadio(e.target.value)}
|
||||
/>
|
||||
<span>選んで送信</span>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div className={`checkbox-wrap edit-bg ${approval_list.length == 0 && 'd-none'}`}>
|
||||
<div className={`checkbox-wrap edit-bg ${(approval_list.length == 0 || check_radio!="true") && 'd-none'}`}>
|
||||
{
|
||||
approval_list?.map((item, k)=>
|
||||
<div className="checkbox" key={k}>
|
||||
|
@ -294,7 +283,6 @@ const MeetingEdit = (props) => {
|
|||
<input className="boolean optional"
|
||||
type="checkbox"
|
||||
id={`user_name${k}`}
|
||||
disabled={!check_some}
|
||||
onChange={handleApproval}/>
|
||||
{`${item.child.first_name} ${item.child.last_name}`}
|
||||
</label>
|
||||
|
|
|
@ -16,7 +16,16 @@ const Meeting = () => {
|
|||
const [loaded, setLoaded] = useState(false);
|
||||
const [meeting_list, setMeetingList ] = useState(null);
|
||||
const [_422errors, set422errors] = useState({keyword:''});
|
||||
const [_400error, set400error] = useState('');
|
||||
const [_success, setSuccess] = useState('');
|
||||
|
||||
|
||||
useEffect(()=>{
|
||||
if(localStorage.getItem("from_login")){
|
||||
setSuccess("ログインに成功しました!");
|
||||
localStorage.removeItem("from_login");
|
||||
}
|
||||
},[]);
|
||||
|
||||
|
||||
useEffect(() => {
|
||||
setLoaded(false);
|
||||
|
@ -27,7 +36,6 @@ const Meeting = () => {
|
|||
|
||||
//------------Calculate Numerator & Denominator--------------
|
||||
var list = response.data.params;
|
||||
console.log(list);
|
||||
var arr = [];
|
||||
for(var i in list){
|
||||
var total=0, num=0;
|
||||
|
@ -148,7 +156,7 @@ const Meeting = () => {
|
|||
item.approval?.map((x, kj)=>
|
||||
<li className="meeting-member__item" role="listitem" key={kj}>
|
||||
<div className="avatar">
|
||||
<img alt="name" className="avatar-img rounded-circle" src={x.child.image} alt={x.child.image} />
|
||||
<img alt="name" className="avatar-img" src={x.child.image} alt={x.child.image} />
|
||||
</div>
|
||||
</li>
|
||||
)
|
||||
|
@ -166,7 +174,7 @@ const Meeting = () => {
|
|||
</div>
|
||||
</div>
|
||||
{
|
||||
_400error && <Alert type="fail">{_400error}</Alert>
|
||||
_success && <Alert type="success">{_success}</Alert>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -141,7 +141,7 @@ const ParentDetail = (props) => {
|
|||
{/* <img src="/assets/img/icon/camera.svg" width="20" height="20"/> */}
|
||||
</IconButton>
|
||||
</label>
|
||||
<img src={image} alt="" width ="100%" height="100%" style={{borderRadius:'50%'}}/>
|
||||
<img src={image} className="avatar-img" alt="avatar-img"/>
|
||||
</div>
|
||||
{
|
||||
_422errors.image &&
|
||||
|
|
|
@ -96,7 +96,7 @@ const Parent = () => {
|
|||
<Link to = {`/admin/parent/detail/${father.id}`}>
|
||||
<div className="user-wrap">
|
||||
<div className="user-avatar">
|
||||
<img alt="name" className="avatar-img rounded-circle" src={ father.image } />
|
||||
<img alt="name" className="avatar-img" src={ father.image } />
|
||||
</div>
|
||||
<div className="user-info">
|
||||
<p className="user-name mb-1 font-weight-bold">{ father.company }</p>
|
||||
|
|
|
@ -81,16 +81,16 @@ return [
|
|||
'max' => [
|
||||
'numeric' => 'The :attribute must not be greater than :max.',
|
||||
'file' => 'プロフィール画像は最大1M以内です。',
|
||||
'string' => '本文は最大 :attribute 文字以内です。',
|
||||
'string' => ':attribute は最大 :max 文字以内です。',
|
||||
'array' => 'The :attribute must not have more than :max items.',
|
||||
],
|
||||
'mimes' => 'ファイル形式は :values のみです。',
|
||||
'mimetypes' => 'The :attribute must be a file of type: :values.',
|
||||
'min' => [
|
||||
'numeric' => 'The :attribute must be at least :min.',
|
||||
'file' => 'The :attribute must be at least :min kilobytes.',
|
||||
'string' => 'The :attribute must be at least :min characters.',
|
||||
'array' => 'The :attribute must have at least :min items.',
|
||||
'numeric' => ':attribute は最低 :min 数字以上です。',
|
||||
'file' => ':attribute は最低 :min kB以上です。',
|
||||
'string' => ':attribute は最低 :min 文字以上です。',
|
||||
'array' => ':attribute は最低 :min 配列要素以上です。',
|
||||
],
|
||||
'multiple_of' => 'The :attribute must be a multiple of :value.',
|
||||
'not_in' => 'The selected :attribute is invalid.',
|
||||
|
|
|
@ -47,4 +47,8 @@ $grid-breakpoints: (
|
|||
lg: 992px,
|
||||
xl: 1200px,
|
||||
xxl: 1400px
|
||||
);
|
||||
);
|
||||
|
||||
body{
|
||||
padding: 0 !important;
|
||||
}
|
|
@ -32,69 +32,69 @@ a{
|
|||
|
||||
@include media-breakpoint-down(xs){
|
||||
|
||||
.l-content__ttl h2{
|
||||
font-size: 25px !important;
|
||||
}
|
||||
|
||||
.meeting-tab{
|
||||
height: 60px !important;
|
||||
font-size: 18px;
|
||||
}
|
||||
.l-content__ttl h2{
|
||||
font-size: 20px !important;
|
||||
}
|
||||
|
||||
.meeting-tab{
|
||||
height: 45px !important;
|
||||
font-size: 15px;
|
||||
}
|
||||
|
||||
.meeting-ttl{
|
||||
font-size: 18px !important;
|
||||
}
|
||||
|
||||
.meeting-txt{
|
||||
font-size: 17px !important;
|
||||
}
|
||||
|
||||
.user-date span{
|
||||
font-size: 16px !important;
|
||||
}
|
||||
.meeting-ttl{
|
||||
font-size: 15px !important;
|
||||
}
|
||||
|
||||
.meeting-txt{
|
||||
font-size: 14px !important;
|
||||
}
|
||||
|
||||
.user-date span{
|
||||
font-size: 14px !important;
|
||||
}
|
||||
|
||||
.count{
|
||||
width: 18px !important;
|
||||
height: 18px !important;
|
||||
}
|
||||
.count{
|
||||
width: 18px !important;
|
||||
height: 18px !important;
|
||||
}
|
||||
|
||||
.meeting-label{
|
||||
font-size: 15px !important;
|
||||
}
|
||||
.meeting-label{
|
||||
font-size: 15px !important;
|
||||
}
|
||||
|
||||
.user-name{
|
||||
font-size: 18px !important;
|
||||
}
|
||||
.user-name{
|
||||
font-size: 13px !important;
|
||||
}
|
||||
|
||||
.user-advice-btn span{
|
||||
font-size: 15px !important;
|
||||
}
|
||||
.user-advice-btn span{
|
||||
font-size: 14px !important;
|
||||
}
|
||||
|
||||
.meeting-date{
|
||||
font-size: 15px !important;
|
||||
}
|
||||
.meeting-date{
|
||||
font-size: 13px !important;
|
||||
}
|
||||
|
||||
.p-article__pdf__btn span{
|
||||
font-size: 15px !important;
|
||||
}
|
||||
.p-article__pdf__btn span{
|
||||
font-size: 14px !important;
|
||||
}
|
||||
|
||||
.p-article__txt{
|
||||
font-size: 15px !important;
|
||||
}
|
||||
.p-article__txt{
|
||||
font-size: 13.5px !important;
|
||||
}
|
||||
|
||||
.p-consent-btn span{
|
||||
font-size: 15px !important;
|
||||
}
|
||||
.p-consent-btn span{
|
||||
font-size: 15px !important;
|
||||
}
|
||||
|
||||
.search-item .user-avatar{
|
||||
min-width: 50px !important;
|
||||
width: 50px !important;
|
||||
height: 50px !important;
|
||||
}
|
||||
.search-item .user-avatar{
|
||||
min-width: 50px !important;
|
||||
width: 50px !important;
|
||||
height: 50px !important;
|
||||
}
|
||||
|
||||
.profile-info__item{
|
||||
padding: 10px 20px 10px 15px !important;
|
||||
}
|
||||
.profile-info__item{
|
||||
padding: 10px 20px 10px 15px !important;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -169,4 +169,11 @@ a{
|
|||
|
||||
.p-file-image figure.image-upload:after{
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
.avatar-img{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: cover;
|
||||
border-radius: 50%;
|
||||
}
|
新しいイシューから参照