このコミットが含まれているのは:
dragon1211 2022-01-08 04:22:42 -08:00
コミット 6653595553
5個のファイルの変更25行の追加9行の削除

ファイルの表示

@ -21,7 +21,7 @@ class Authenticate extends Middleware
public function handle ($request, Closure $next, ...$guard) {
if (!$request->session()->has($guard[0])) {
return redirect(route($guard[0].'login').'?redirect_from=/'.$request->path());
return redirect(route($guard[0].'login').'?redirect_to=/'.$request->path());
}
return $next($request);

ファイルの表示

@ -27499,7 +27499,8 @@ __webpack_require__.r(__webpack_exports__);
/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/regenerator */ "./node_modules/@babel/runtime/regenerator/index.js");
/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "./node_modules/react/index.js");
/* harmony import */ var _material_ui_lab__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @material-ui/lab */ "./node_modules/@material-ui/lab/LoadingButton/LoadingButton.js");
/* harmony import */ var react_router_dom__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! react-router-dom */ "./node_modules/react-router/index.js");
/* harmony import */ var _material_ui_lab__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @material-ui/lab */ "./node_modules/@material-ui/lab/LoadingButton/LoadingButton.js");
/* harmony import */ var react_cookie__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! react-cookie */ "./node_modules/react-cookie/es6/useCookies.js");
/* harmony import */ var _component_alert__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../component/alert */ "./resources/js/component/alert.jsx");
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/jsx-runtime.js");
@ -27528,12 +27529,15 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
var AdminLogin = function AdminLogin() {
var _useCookies = (0,react_cookie__WEBPACK_IMPORTED_MODULE_4__["default"])(['user']),
_useCookies2 = _slicedToArray(_useCookies, 2),
cookies = _useCookies2[0],
setCookie = _useCookies2[1];
var location = (0,react_router_dom__WEBPACK_IMPORTED_MODULE_5__.useLocation)();
var _useState = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(''),
_useState2 = _slicedToArray(_useState, 2),
email = _useState2[0],
@ -27599,7 +27603,7 @@ var AdminLogin = function AdminLogin() {
localStorage.setItem('kiki_login_flag', true);
localStorage.setItem('kiki_acc_type', 'admin');
setCookie('logged', 'success');
window.location.href = "/admin/meeting";
if (location.search == '') window.location.href = "/admin/meeting";else window.location.href = location.search.replace('?redirect_to=', '');
break;
}
@ -27694,7 +27698,7 @@ var AdminLogin = function AdminLogin() {
})]
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)("div", {
className: "mt-5",
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_material_ui_lab__WEBPACK_IMPORTED_MODULE_5__["default"], {
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_material_ui_lab__WEBPACK_IMPORTED_MODULE_6__["default"], {
type: "submit",
loading: submit,
fullWidth: true,
@ -31562,7 +31566,7 @@ var ChildLogin = function ChildLogin() {
localStorage.setItem('kiki_acc_type', 'c-account');
localStorage.setItem('kiki_acc_id', response.data.params.id);
setCookie('logged', 'success');
window.location.href = '/c-account/meeting';
if (location.search == '') window.location.href = "/c-account/meeting";else window.location.href = location.search.replace('?redirect_to=', '');
break;
}
@ -38571,7 +38575,7 @@ var ParentLogin = function ParentLogin() {
localStorage.setItem('kiki_acc_type', 'p-account');
localStorage.setItem('kiki_acc_id', response.data.params.id);
setCookie('logged', 'success');
window.location.href = '/p-account/meeting';
if (location.search == '') window.location.href = "/p-account/meeting";else window.location.href = location.search.replace('?redirect_to=', '');
break;
}

ファイルの表示

@ -1,4 +1,5 @@
import React, { useState } from 'react';
import { useLocation } from 'react-router-dom';
import { LoadingButton } from '@material-ui/lab';
import { useCookies } from 'react-cookie';
@ -7,6 +8,7 @@ import Alert from '../../component/alert';
const AdminLogin = () => {
const [cookies, setCookie] = useCookies(['user']);
const location = useLocation();
const [email, setEmail] = useState('');
const [password, setPassword] = useState('');
@ -39,7 +41,11 @@ const AdminLogin = () => {
localStorage.setItem('kiki_login_flag', true);
localStorage.setItem('kiki_acc_type', 'admin');
setCookie('logged', 'success');
window.location.href = "/admin/meeting";
if(location.search == '')
window.location.href = "/admin/meeting";
else
window.location.href = location.search.replace('?redirect_to=', '');
break;
}
case 422: {

ファイルの表示

@ -37,7 +37,10 @@ const ChildLogin = () => {
localStorage.setItem('kiki_acc_type', 'c-account');
localStorage.setItem('kiki_acc_id', response.data.params.id);
setCookie('logged', 'success');
window.location.href = '/c-account/meeting';
if(location.search == '')
window.location.href = "/c-account/meeting";
else
window.location.href = location.search.replace('?redirect_to=', '');
break;
}
case 400: set400Error(response.data.error_message); break;

ファイルの表示

@ -38,7 +38,10 @@ const ParentLogin = () => {
localStorage.setItem('kiki_acc_type', 'p-account');
localStorage.setItem('kiki_acc_id', response.data.params.id);
setCookie('logged', 'success');
window.location.href = '/p-account/meeting';
if(location.search == '')
window.location.href = "/p-account/meeting";
else
window.location.href = location.search.replace('?redirect_to=', '');
break;
}
case 400: set400Error(response.data.error_message); break;