diff --git a/backend/app/Http/Controllers/Api/MeetingsController.php b/backend/app/Http/Controllers/Api/MeetingsController.php index b9fd33bf..2ef37060 100644 --- a/backend/app/Http/Controllers/Api/MeetingsController.php +++ b/backend/app/Http/Controllers/Api/MeetingsController.php @@ -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()); diff --git a/backend/public/css/app.css b/backend/public/css/app.css index be2906cd..9b8f557a 100644 --- a/backend/public/css/app.css +++ b/backend/public/css/app.css @@ -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%; +} diff --git a/backend/public/js/app.js b/backend/public/js/app.js index 4b9d5ede..623d5e4a 100644 --- a/backend/public/js/app.js +++ b/backend/public/js/app.js @@ -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", { diff --git a/backend/resources/js/admin/child/detail.jsx b/backend/resources/js/admin/child/detail.jsx index 4c3513e8..0513555b 100644 --- a/backend/resources/js/admin/child/detail.jsx +++ b/backend/resources/js/admin/child/detail.jsx @@ -141,7 +141,7 @@ const ChildDetail = (props) => { {/* */} - + avatar-img { _422errors.image && diff --git a/backend/resources/js/admin/child/index.jsx b/backend/resources/js/admin/child/index.jsx index 69484c41..1418c29b 100644 --- a/backend/resources/js/admin/child/index.jsx +++ b/backend/resources/js/admin/child/index.jsx @@ -98,7 +98,7 @@ const Child = () => {
- name + name

{ child.last_name } { child.first_name }

diff --git a/backend/resources/js/admin/login/index.jsx b/backend/resources/js/admin/login/index.jsx index b7e42559..33788356 100644 --- a/backend/resources/js/admin/login/index.jsx +++ b/backend/resources/js/admin/login/index.jsx @@ -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 && set400Error(null)}>{_400error} } - { - _success && - - history.push({ - pathname: "/admin/meeting", - state: {} - })}>{_success} - } ) diff --git a/backend/resources/js/admin/meeting/detail.jsx b/backend/resources/js/admin/meeting/detail.jsx index 5612cc4d..867c2266 100644 --- a/backend/resources/js/admin/meeting/detail.jsx +++ b/backend/resources/js/admin/meeting/detail.jsx @@ -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)=>
  • - name + name
  • ) @@ -161,15 +163,25 @@ const MeetingDetail = (props) => {
    +
    { - meeting.meeting_image[0] && -
    {meeting.meeting_image[0].image}
    + thumbnail && + thumbnail } +
    { meeting.meeting_image?.map((x, k)=> -
    {x.image}
    +
    + {x.image}setThumbnail(x.image)}/> +
    + ) + } + { + [...Array(10-meeting.meeting_image.length)].map((x, k)=> +
    ) }
    diff --git a/backend/resources/js/admin/meeting/edit.jsx b/backend/resources/js/admin/meeting/edit.jsx index 0b9bd5e6..d716a860 100644 --- a/backend/resources/js/admin/meeting/edit.jsx +++ b/backend/resources/js/admin/meeting/edit.jsx @@ -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) => {
    @@ -277,16 +265,17 @@ const MeetingEdit = (props) => {
    -
    +
    { approval_list?.map((item, k)=>
    @@ -294,7 +283,6 @@ const MeetingEdit = (props) => { {`${item.child.first_name} ${item.child.last_name}`} diff --git a/backend/resources/js/admin/meeting/index.jsx b/backend/resources/js/admin/meeting/index.jsx index 3e7e03b7..22ba551e 100644 --- a/backend/resources/js/admin/meeting/index.jsx +++ b/backend/resources/js/admin/meeting/index.jsx @@ -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)=>
  • - name + name
  • ) @@ -166,7 +174,7 @@ const Meeting = () => {
    { - _400error && {_400error} + _success && {_success} }
    diff --git a/backend/resources/js/admin/parent/detail.jsx b/backend/resources/js/admin/parent/detail.jsx index c0bdb375..6d805e97 100644 --- a/backend/resources/js/admin/parent/detail.jsx +++ b/backend/resources/js/admin/parent/detail.jsx @@ -141,7 +141,7 @@ const ParentDetail = (props) => { {/* */} - + avatar-img
    { _422errors.image && diff --git a/backend/resources/js/admin/parent/index.jsx b/backend/resources/js/admin/parent/index.jsx index 9f42fb4f..215f7639 100644 --- a/backend/resources/js/admin/parent/index.jsx +++ b/backend/resources/js/admin/parent/index.jsx @@ -96,7 +96,7 @@ const Parent = () => {
    - name + name

    { father.company }

    diff --git a/backend/resources/lang/ja/validation.php b/backend/resources/lang/ja/validation.php index ed8043a1..527f687f 100644 --- a/backend/resources/lang/ja/validation.php +++ b/backend/resources/lang/ja/validation.php @@ -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.', diff --git a/backend/resources/sass/_variables.scss b/backend/resources/sass/_variables.scss index 8689fe5a..fc9df4a1 100644 --- a/backend/resources/sass/_variables.scss +++ b/backend/resources/sass/_variables.scss @@ -47,4 +47,8 @@ $grid-breakpoints: ( lg: 992px, xl: 1200px, xxl: 1400px -); \ No newline at end of file +); + +body{ + padding: 0 !important; +} \ No newline at end of file diff --git a/backend/resources/sass/layouts/_main.scss b/backend/resources/sass/layouts/_main.scss index 251930bc..5cecaa9e 100644 --- a/backend/resources/sass/layouts/_main.scss +++ b/backend/resources/sass/layouts/_main.scss @@ -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%; } \ No newline at end of file