bugfixed admin child jsx
このコミットが含まれているのは:
コミット
e983e54fbf
|
@ -28241,7 +28241,7 @@ var ChildDetail = function ChildDetail(props) {
|
|||
})
|
||||
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("p", {
|
||||
className: "txt",
|
||||
children: "(child detail.jsx \u4FEE\u6B63)\u3002"
|
||||
children: child.identity
|
||||
})]
|
||||
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("div", {
|
||||
className: "profile-info__item",
|
||||
|
@ -28449,8 +28449,8 @@ var ChildEdit = function ChildEdit(props) {
|
|||
|
||||
var _useState5 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(''),
|
||||
_useState6 = _slicedToArray(_useState5, 2),
|
||||
identify = _useState6[0],
|
||||
setIdentify = _useState6[1];
|
||||
identity = _useState6[0],
|
||||
setIdentity = _useState6[1];
|
||||
|
||||
var _useState7 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(''),
|
||||
_useState8 = _slicedToArray(_useState7, 2),
|
||||
|
@ -28470,7 +28470,7 @@ var ChildEdit = function ChildEdit(props) {
|
|||
var _useState13 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)({
|
||||
first_name: '',
|
||||
last_name: '',
|
||||
identify: '',
|
||||
identity: '',
|
||||
email: '',
|
||||
tel: '',
|
||||
company: ''
|
||||
|
@ -28508,14 +28508,15 @@ var ChildEdit = function ChildEdit(props) {
|
|||
|
||||
if (response.data.status_code == 200) {
|
||||
var child = response.data.params;
|
||||
console.log(child);
|
||||
|
||||
if (child) {
|
||||
setFirstName(child === null || child === void 0 ? void 0 : child.first_name);
|
||||
setLastName(child === null || child === void 0 ? void 0 : child.last_name);
|
||||
setIdentify(child === null || child === void 0 ? void 0 : child.identify);
|
||||
setEmail(child === null || child === void 0 ? void 0 : child.email);
|
||||
setTelephone(child === null || child === void 0 ? void 0 : child.tel);
|
||||
setCompany(child === null || child === void 0 ? void 0 : child.company);
|
||||
setFirstName(child.first_name);
|
||||
setLastName(child.last_name);
|
||||
setIdentity(child.identity);
|
||||
setEmail(child.email);
|
||||
setTelephone(child.tel);
|
||||
setCompany(child.company);
|
||||
}
|
||||
}
|
||||
})["catch"](function (err) {
|
||||
|
@ -28530,7 +28531,7 @@ var ChildEdit = function ChildEdit(props) {
|
|||
set422Errors({
|
||||
first_name: '',
|
||||
last_name: '',
|
||||
identify: '',
|
||||
identity: '',
|
||||
email: '',
|
||||
tel: '',
|
||||
company: ''
|
||||
|
@ -28539,7 +28540,7 @@ var ChildEdit = function ChildEdit(props) {
|
|||
var request = {
|
||||
first_name: first_name,
|
||||
last_name: last_name,
|
||||
identify: identify,
|
||||
identity: identity,
|
||||
email: email,
|
||||
tel: tel,
|
||||
company: company
|
||||
|
@ -28600,21 +28601,21 @@ var ChildEdit = function ChildEdit(props) {
|
|||
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsxs)("div", {
|
||||
className: "edit-set",
|
||||
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)("label", {
|
||||
htmlFor: "identify",
|
||||
htmlFor: "identity",
|
||||
className: "control-label ft-12",
|
||||
children: " ID "
|
||||
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)("input", {
|
||||
type: "text",
|
||||
name: "identify",
|
||||
id: "identify",
|
||||
className: "input-default input-nameSei input-h60 ".concat(_422errors.identify && "is-invalid c-input__target"),
|
||||
value: identify,
|
||||
name: "identity",
|
||||
id: "identity",
|
||||
className: "input-default input-nameSei input-h60 ".concat(_422errors.identity && "is-invalid c-input__target"),
|
||||
value: identity,
|
||||
onChange: function onChange(e) {
|
||||
return setIdentify(e.target.value);
|
||||
return setIdentity(e.target.value);
|
||||
}
|
||||
}), _422errors.identify && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)("span", {
|
||||
}), _422errors.identity && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)("span", {
|
||||
className: "l-alert__text--error ft-16 ft-md-14",
|
||||
children: _422errors.identify
|
||||
children: _422errors.identity
|
||||
})]
|
||||
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsxs)("div", {
|
||||
className: "edit-set",
|
||||
|
|
|
@ -157,10 +157,7 @@ const ChildDetail = (props) => {
|
|||
<p className="profile-info__icon">
|
||||
<img src="/assets/img/icon/person-pin.svg" alt="Person"/>
|
||||
</p>
|
||||
<p className="txt">
|
||||
{/* {child.username} */}
|
||||
(child detail.jsx 修正)。
|
||||
</p>
|
||||
<p className="txt">{child.identity}</p>
|
||||
</div>
|
||||
<div className="profile-info__item">
|
||||
<a href={`mailto:${child.email}`}>
|
||||
|
|
|
@ -13,7 +13,7 @@ const ChildEdit = (props) => {
|
|||
|
||||
const [first_name, setFirstName] = useState('');
|
||||
const [last_name, setLastName] = useState('');
|
||||
const [identify, setIdentify] = useState('');
|
||||
const [identity, setIdentity] = useState('');
|
||||
const [email, setEmail] = useState('');
|
||||
const [tel, setTelephone] = useState('');
|
||||
const [company, setCompany] = useState('');
|
||||
|
@ -21,7 +21,7 @@ const ChildEdit = (props) => {
|
|||
const [_422errors, set422Errors] = useState({
|
||||
first_name:'',
|
||||
last_name:'',
|
||||
identify:'',
|
||||
identity:'',
|
||||
email:'',
|
||||
tel:'',
|
||||
company:''
|
||||
|
@ -42,13 +42,14 @@ const ChildEdit = (props) => {
|
|||
if(response.data.status_code==200)
|
||||
{
|
||||
var child = response.data.params;
|
||||
console.log(child);
|
||||
if(child){
|
||||
setFirstName(child?.first_name);
|
||||
setLastName(child?.last_name);
|
||||
setIdentify(child?.identify);
|
||||
setEmail(child?.email);
|
||||
setTelephone(child?.tel);
|
||||
setCompany(child?.company);
|
||||
setFirstName(child.first_name);
|
||||
setLastName(child.last_name);
|
||||
setIdentity(child.identity);
|
||||
setEmail(child.email);
|
||||
setTelephone(child.tel);
|
||||
setCompany(child.company);
|
||||
}
|
||||
}
|
||||
})
|
||||
|
@ -64,7 +65,7 @@ const ChildEdit = (props) => {
|
|||
set422Errors({
|
||||
first_name:'',
|
||||
last_name:'',
|
||||
identify:'',
|
||||
identity:'',
|
||||
email:'',
|
||||
tel:'',
|
||||
company:''
|
||||
|
@ -75,7 +76,7 @@ const ChildEdit = (props) => {
|
|||
var request = {
|
||||
first_name: first_name,
|
||||
last_name: last_name,
|
||||
identify: identify,
|
||||
identity: identity,
|
||||
email: email,
|
||||
tel: tel,
|
||||
company: company
|
||||
|
@ -115,12 +116,12 @@ const ChildEdit = (props) => {
|
|||
<form onSubmit={handleSubmit} noValidate>
|
||||
|
||||
<div className="edit-set">
|
||||
<label htmlFor="identify" className="control-label ft-12"> ID </label>
|
||||
<input type="text" name="identify" id="identify" className={`input-default input-nameSei input-h60 ${ _422errors.identify && "is-invalid c-input__target" }`} value={identify} onChange={e=>setIdentify(e.target.value)}/>
|
||||
<label htmlFor="identity" className="control-label ft-12"> ID </label>
|
||||
<input type="text" name="identity" id="identity" className={`input-default input-nameSei input-h60 ${ _422errors.identity && "is-invalid c-input__target" }`} value={identity} onChange={e=>setIdentity(e.target.value)}/>
|
||||
{
|
||||
_422errors.identify &&
|
||||
_422errors.identity &&
|
||||
<span className="l-alert__text--error ft-16 ft-md-14">
|
||||
{ _422errors.identify }
|
||||
{ _422errors.identity }
|
||||
</span>
|
||||
}
|
||||
</div>
|
||||
|
|
新しいイシューから参照