Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Письменов Дмитрий Иванович
/
yourroomads
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Settings
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 699628f3
authored
May 18, 2021
by
Vladislav
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#19463 Реализация методов обработки полей РК с заменой переменных (исправление)
1 parent
c3c8ed1f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
4 deletions
app/Http/Controllers/TokensController.php
app/Models/Campaigns.php
resources/js/Pages/Tokens/Edit.vue
app/Http/Controllers/TokensController.php
View file @
699628f
...
...
@@ -231,7 +231,8 @@ class TokensController extends Controller
return
Redirect
::
back
();
}
$city
->
token
()
->
associate
(
null
);
$city
->
token
()
->
dissociate
();
$city
->
save
();
return
Redirect
::
route
(
'token.edit'
,
$token
->
getKey
())
->
with
(
'success'
,
'City deleted.'
);
}
...
...
app/Models/Campaigns.php
View file @
699628f
...
...
@@ -45,8 +45,8 @@ class Campaigns extends Model
static
::
updated
(
function
(
Campaigns
$campaign
)
{
if
(
$campaign
->
enabled
!==
$campaign
->
getOriginal
(
'enabl
ed'
))
{
if
(
$campaign
->
enabl
ed
)
{
if
(
$campaign
->
managed
!==
$campaign
->
getOriginal
(
'manag
ed'
))
{
if
(
$campaign
->
manag
ed
)
{
Dictionary
::
whereNotNull
(
'token_id'
)
->
each
(
function
(
Dictionary
$dictionary
)
use
(
$campaign
)
{
$campaign
->
dictionaries
()
->
syncWithoutDetaching
([
$dictionary
->
getKey
()
=>
DictionaryCampaign
::
copyPropertyInCampaign
(
$campaign
),
...
...
resources/js/Pages/Tokens/Edit.vue
View file @
699628f
...
...
@@ -115,7 +115,9 @@ export default {
})
},
cityDelete
(
id
)
{
this
.
$inertia
.
delete
(
this
.
route
(
'token.city.destroy'
,
[
this
.
token
.
id
,
id
]))
if
(
confirm
(
'Are you sure you want to delete this city?'
))
{
this
.
$inertia
.
delete
(
this
.
route
(
'token.city.destroy'
,
[
this
.
token
.
id
,
id
]))
}
},
tokenUpdate
()
{
this
.
form
.
post
(
this
.
route
(
'token.update'
,
this
.
token
.
id
))
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment