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 f357317f
authored
Apr 15, 2019
by
Jonathan Reinink
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Automatically convert routes to strings
1 parent
87b77f79
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
21 additions
and
21 deletions
resources/js/Pages/Auth/Login.vue
resources/js/Pages/Contacts/Create.vue
resources/js/Pages/Contacts/Edit.vue
resources/js/Pages/Contacts/Index.vue
resources/js/Pages/Organizations/Create.vue
resources/js/Pages/Organizations/Edit.vue
resources/js/Pages/Organizations/Index.vue
resources/js/Pages/Users/Create.vue
resources/js/Pages/Users/Edit.vue
resources/js/Pages/Users/Index.vue
resources/js/app.js
resources/js/Pages/Auth/Login.vue
View file @
f357317
...
...
@@ -54,7 +54,7 @@ export default {
methods
:
{
submit
()
{
this
.
sending
=
true
Inertia
.
post
(
this
.
route
(
'login.attempt'
)
.
url
()
,
{
Inertia
.
post
(
this
.
route
(
'login.attempt'
),
{
email
:
this
.
form
.
email
,
password
:
this
.
form
.
password
,
remember
:
this
.
form
.
remember
,
...
...
resources/js/Pages/Contacts/Create.vue
View file @
f357317
...
...
@@ -71,7 +71,7 @@ export default {
methods
:
{
submit
()
{
this
.
form
.
post
({
url
:
this
.
route
(
'contacts.store'
)
.
url
()
,
url
:
this
.
route
(
'contacts.store'
),
then
:
data
=>
Inertia
.
visit
(
this
.
route
(
'contacts.edit'
,
data
.
id
)),
})
},
...
...
resources/js/Pages/Contacts/Edit.vue
View file @
f357317
...
...
@@ -79,23 +79,23 @@ export default {
methods
:
{
submit
()
{
this
.
form
.
put
({
url
:
this
.
route
(
'contacts.update'
,
this
.
contact
.
id
)
.
url
()
,
url
:
this
.
route
(
'contacts.update'
,
this
.
contact
.
id
),
then
:
()
=>
Inertia
.
visit
(
this
.
route
(
'contacts'
)),
})
},
destroy
()
{
if
(
confirm
(
'Are you sure you want to delete this contact?'
))
{
this
.
form
.
delete
({
url
:
this
.
route
(
'contacts.destroy'
,
this
.
contact
.
id
)
.
url
()
,
then
:
()
=>
Inertia
.
replace
(
this
.
route
(
'contacts.edit'
,
this
.
contact
.
id
)
.
url
()
),
url
:
this
.
route
(
'contacts.destroy'
,
this
.
contact
.
id
),
then
:
()
=>
Inertia
.
replace
(
this
.
route
(
'contacts.edit'
,
this
.
contact
.
id
)),
})
}
},
restore
()
{
if
(
confirm
(
'Are you sure you want to restore this contact?'
))
{
this
.
form
.
put
({
url
:
this
.
route
(
'contacts.restore'
,
this
.
contact
.
id
)
.
url
()
,
then
:
()
=>
Inertia
.
replace
(
this
.
route
(
'contacts.edit'
,
this
.
contact
.
id
)
.
url
()
),
url
:
this
.
route
(
'contacts.restore'
,
this
.
contact
.
id
),
then
:
()
=>
Inertia
.
replace
(
this
.
route
(
'contacts.edit'
,
this
.
contact
.
id
)),
})
}
},
...
...
resources/js/Pages/Contacts/Index.vue
View file @
f357317
...
...
@@ -94,7 +94,7 @@ export default {
form
:
{
handler
:
_
.
throttle
(
function
()
{
let
query
=
_
.
pickBy
(
this
.
form
)
Inertia
.
replace
(
this
.
route
(
'contacts'
,
Object
.
keys
(
query
).
length
?
query
:
{
remember
:
'forget'
})
.
url
()
)
Inertia
.
replace
(
this
.
route
(
'contacts'
,
Object
.
keys
(
query
).
length
?
query
:
{
remember
:
'forget'
}))
},
150
),
deep
:
true
,
},
...
...
resources/js/Pages/Organizations/Create.vue
View file @
f357317
...
...
@@ -77,7 +77,7 @@ export default {
methods
:
{
submit
()
{
this
.
sending
=
true
Inertia
.
post
(
this
.
route
(
'organizations.store'
)
.
url
()
,
this
.
form
).
then
(()
=>
this
.
sending
=
false
)
Inertia
.
post
(
this
.
route
(
'organizations.store'
),
this
.
form
).
then
(()
=>
this
.
sending
=
false
)
},
},
}
...
...
resources/js/Pages/Organizations/Edit.vue
View file @
f357317
...
...
@@ -111,16 +111,16 @@ export default {
},
methods
:
{
submit
()
{
Inertia
.
put
(
this
.
route
(
'organizations.update'
,
this
.
organization
.
id
)
.
url
()
,
this
.
form
)
Inertia
.
put
(
this
.
route
(
'organizations.update'
,
this
.
organization
.
id
),
this
.
form
)
},
destroy
()
{
if
(
confirm
(
'Are you sure you want to delete this organization?'
))
{
Inertia
.
delete
(
this
.
route
(
'organizations.destroy'
,
this
.
organization
.
id
)
.
url
()
)
Inertia
.
delete
(
this
.
route
(
'organizations.destroy'
,
this
.
organization
.
id
))
}
},
restore
()
{
if
(
confirm
(
'Are you sure you want to restore this organization?'
))
{
Inertia
.
put
(
this
.
route
(
'organizations.restore'
,
this
.
organization
.
id
)
.
url
()
)
Inertia
.
put
(
this
.
route
(
'organizations.restore'
,
this
.
organization
.
id
))
}
},
},
...
...
resources/js/Pages/Organizations/Index.vue
View file @
f357317
...
...
@@ -86,7 +86,7 @@ export default {
form
:
{
handler
:
_
.
throttle
(
function
()
{
let
query
=
_
.
pickBy
(
this
.
form
)
Inertia
.
replace
(
this
.
route
(
'organizations'
,
Object
.
keys
(
query
).
length
?
query
:
{
remember
:
'forget'
})
.
url
()
)
Inertia
.
replace
(
this
.
route
(
'organizations'
,
Object
.
keys
(
query
).
length
?
query
:
{
remember
:
'forget'
}))
},
150
),
deep
:
true
,
},
...
...
resources/js/Pages/Users/Create.vue
View file @
f357317
...
...
@@ -57,7 +57,7 @@ export default {
methods
:
{
submit
()
{
this
.
form
.
post
({
url
:
this
.
route
(
'users.store'
)
.
url
()
,
url
:
this
.
route
(
'users.store'
),
then
:
data
=>
Inertia
.
visit
(
this
.
route
(
'users.edit'
,
data
.
id
)),
})
},
...
...
resources/js/Pages/Users/Edit.vue
View file @
f357317
...
...
@@ -65,23 +65,23 @@ export default {
methods
:
{
submit
()
{
this
.
form
.
put
({
url
:
this
.
route
(
'users.update'
,
this
.
user
.
id
)
.
url
()
,
url
:
this
.
route
(
'users.update'
,
this
.
user
.
id
),
then
:
()
=>
Inertia
.
visit
(
this
.
route
(
'users'
)),
})
},
destroy
()
{
if
(
confirm
(
'Are you sure you want to delete this user?'
))
{
this
.
form
.
delete
({
url
:
this
.
route
(
'users.destroy'
,
this
.
user
.
id
)
.
url
()
,
then
:
()
=>
Inertia
.
replace
(
this
.
route
(
'users.edit'
,
this
.
user
.
id
)
.
url
()
),
url
:
this
.
route
(
'users.destroy'
,
this
.
user
.
id
),
then
:
()
=>
Inertia
.
replace
(
this
.
route
(
'users.edit'
,
this
.
user
.
id
)),
})
}
},
restore
()
{
if
(
confirm
(
'Are you sure you want to restore this user?'
))
{
this
.
form
.
put
({
url
:
this
.
route
(
'users.restore'
,
this
.
user
.
id
)
.
url
()
,
then
:
()
=>
Inertia
.
replace
(
this
.
route
(
'users.edit'
,
this
.
user
.
id
)
.
url
()
),
url
:
this
.
route
(
'users.restore'
,
this
.
user
.
id
),
then
:
()
=>
Inertia
.
replace
(
this
.
route
(
'users.edit'
,
this
.
user
.
id
)),
})
}
},
...
...
resources/js/Pages/Users/Index.vue
View file @
f357317
...
...
@@ -90,7 +90,7 @@ export default {
form
:
{
handler
:
_
.
throttle
(
function
()
{
let
query
=
_
.
pickBy
(
this
.
form
)
Inertia
.
replace
(
this
.
route
(
'users'
,
Object
.
keys
(
query
).
length
?
query
:
{
remember
:
'forget'
})
.
url
()
)
Inertia
.
replace
(
this
.
route
(
'users'
,
Object
.
keys
(
query
).
length
?
query
:
{
remember
:
'forget'
}))
},
150
),
deep
:
true
,
},
...
...
resources/js/app.js
View file @
f357317
...
...
@@ -3,7 +3,7 @@ import PortalVue from 'portal-vue'
import
Vue
from
'vue'
Vue
.
config
.
productionTip
=
false
Vue
.
mixin
({
methods
:
{
route
:
window
.
route
}
})
Vue
.
mixin
({
methods
:
{
route
:
(...
args
)
=>
window
.
route
(...
args
).
url
()
}
})
Vue
.
use
(
PortalVue
)
let
app
=
document
.
getElementById
(
'app'
)
...
...
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