diff --git a/backend/public/js/app.js b/backend/public/js/app.js index b0b4690d..75bd781a 100644 --- a/backend/public/js/app.js +++ b/backend/public/js/app.js @@ -38214,20 +38214,19 @@ var ParentChildAdd = function ParentChildAdd() { var handleCheckRelations = function handleCheckRelations(type) { set401Error(''); - setLoaded(false); // if(type == 'invite'){ - // let inviteurl = document.getElementById('inviteurl').value; - // let sentence = '「KIKI」の招待が届いています。' + '\n' + - // 'まずは以下より仮登録を行ってください。' + '\n' + - // '※スマホ本体を最新の状態にアップデートしてからURLをクリックしてください。' + '\n\n' + - // inviteurl + '\n\n' + - // '▼公式サイトはこちら' + '\n' + - // 'https://kikikan.jp' + '\n\n' + - // 'idの箇所は親のidを引っ張るようお願い致します。'; - // if(!copy(sentence, {debug: true})){ - // set400Error('コピー失敗しました。'); - // return; - // } - // } + setLoaded(false); + + if (type == 'invite') { + var inviteurl = document.getElementById('inviteurl').value; + var sentence = '「KIKI」の招待が届いています。' + '\n' + 'まずは以下より仮登録を行ってください。' + '\n' + '※スマホ本体を最新の状態にアップデートしてからURLをクリックしてください。' + '\n\n' + inviteurl + '\n\n' + '▼公式サイトはこちら' + '\n' + 'https://kikikan.jp' + '\n\n' + 'idの箇所は親のidを引っ張るようお願い致します。'; + + if (!copy_to_clipboard__WEBPACK_IMPORTED_MODULE_4___default()(sentence, { + debug: true + })) { + set400Error('コピー失敗しました。'); + return; + } + } axios.get('/api/fathers/relations/check').then(function (response) { if (isMountedRef.current) return; @@ -38235,7 +38234,7 @@ var ParentChildAdd = function ParentChildAdd() { switch (response.data.status_code) { case 200: { - if (type == "invite") copyInviteURL();else if (type == 'line') copyLineText(); + if (type == "invite") setSuccess('招待用URLをコピーしました。');else if (type == 'line') copyLineText(); break; } diff --git a/backend/resources/js/parent/child/add.jsx b/backend/resources/js/parent/child/add.jsx index 80b8af9f..7d6c97dc 100644 --- a/backend/resources/js/parent/child/add.jsx +++ b/backend/resources/js/parent/child/add.jsx @@ -58,27 +58,28 @@ const ParentChildAdd = () => { set401Error(''); setLoaded(false); - // if(type == 'invite'){ - // let inviteurl = document.getElementById('inviteurl').value; - // let sentence = '「KIKI」の招待が届いています。' + '\n' + - // 'まずは以下より仮登録を行ってください。' + '\n' + - // '※スマホ本体を最新の状態にアップデートしてからURLをクリックしてください。' + '\n\n' + - // inviteurl + '\n\n' + - // '▼公式サイトはこちら' + '\n' + - // 'https://kikikan.jp' + '\n\n' + - // 'idの箇所は親のidを引っ張るようお願い致します。'; - // if(!copy(sentence, {debug: true})){ - // set400Error('コピー失敗しました。'); - // return; - // } - // } + if(type == 'invite'){ + let inviteurl = document.getElementById('inviteurl').value; + let sentence = '「KIKI」の招待が届いています。' + '\n' + + 'まずは以下より仮登録を行ってください。' + '\n' + + '※スマホ本体を最新の状態にアップデートしてからURLをクリックしてください。' + '\n\n' + + inviteurl + '\n\n' + + '▼公式サイトはこちら' + '\n' + + 'https://kikikan.jp' + '\n\n' + + 'idの箇所は親のidを引っ張るようお願い致します。'; + if(!copy(sentence, {debug: true})){ + set400Error('コピー失敗しました。'); + return; + } + } + axios.get('/api/fathers/relations/check') .then(response=>{ if(isMountedRef.current) return; switch(response.data.status_code){ case 200: { - if(type == "invite") copyInviteURL(); + if(type == "invite") setSuccess('招待用URLをコピーしました。'); else if(type=='line') copyLineText(); break; }