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 3537db24
authored
Sep 24, 2020
by
Claudio Dekker
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adjust examples to 0.3.0
1 parent
fc4e3478
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
38 additions
and
25 deletions
resources/js/Pages/Auth/Login.vue
resources/js/Pages/Contacts/Create.vue
resources/js/Pages/Contacts/Edit.vue
resources/js/Pages/Organizations/Create.vue
resources/js/Pages/Organizations/Edit.vue
resources/js/Pages/Users/Create.vue
resources/js/Pages/Users/Edit.vue
resources/js/app.js
resources/js/Pages/Auth/Login.vue
View file @
3537db2
...
@@ -49,12 +49,16 @@ export default {
...
@@ -49,12 +49,16 @@ export default {
},
},
methods
:
{
methods
:
{
submit
()
{
submit
()
{
this
.
sending
=
true
const
data
=
{
this
.
$inertia
.
post
(
this
.
route
(
'login.attempt'
),
{
email
:
this
.
form
.
email
,
email
:
this
.
form
.
email
,
password
:
this
.
form
.
password
,
password
:
this
.
form
.
password
,
remember
:
this
.
form
.
remember
,
remember
:
this
.
form
.
remember
,
}).
then
(()
=>
this
.
sending
=
false
)
}
this
.
$inertia
.
post
(
this
.
route
(
'login.attempt'
),
data
,
{
onStart
:
()
=>
this
.
sending
=
true
,
onFinish
:
()
=>
this
.
sending
=
false
,
})
},
},
},
},
}
}
...
...
resources/js/Pages/Contacts/Create.vue
View file @
3537db2
...
@@ -71,9 +71,10 @@ export default {
...
@@ -71,9 +71,10 @@ export default {
},
},
methods
:
{
methods
:
{
submit
()
{
submit
()
{
this
.
sending
=
true
this
.
$inertia
.
post
(
this
.
route
(
'contacts.store'
),
this
.
form
,
{
this
.
$inertia
.
post
(
this
.
route
(
'contacts.store'
),
this
.
form
)
onStart
:
()
=>
this
.
sending
=
true
,
.
then
(()
=>
this
.
sending
=
false
)
onFinish
:
()
=>
this
.
sending
=
false
,
})
},
},
},
},
}
}
...
...
resources/js/Pages/Contacts/Edit.vue
View file @
3537db2
...
@@ -83,9 +83,10 @@ export default {
...
@@ -83,9 +83,10 @@ export default {
},
},
methods
:
{
methods
:
{
submit
()
{
submit
()
{
this
.
sending
=
true
this
.
$inertia
.
put
(
this
.
route
(
'contacts.update'
,
this
.
contact
.
id
),
this
.
form
,
{
this
.
$inertia
.
put
(
this
.
route
(
'contacts.update'
,
this
.
contact
.
id
),
this
.
form
)
onStart
:
()
=>
this
.
sending
=
true
,
.
then
(()
=>
this
.
sending
=
false
)
onFinish
:
()
=>
this
.
sending
=
false
,
})
},
},
destroy
()
{
destroy
()
{
if
(
confirm
(
'Are you sure you want to delete this contact?'
))
{
if
(
confirm
(
'Are you sure you want to delete this contact?'
))
{
...
...
resources/js/Pages/Organizations/Create.vue
View file @
3537db2
...
@@ -63,9 +63,10 @@ export default {
...
@@ -63,9 +63,10 @@ export default {
},
},
methods
:
{
methods
:
{
submit
()
{
submit
()
{
this
.
sending
=
true
this
.
$inertia
.
post
(
this
.
route
(
'organizations.store'
),
this
.
form
,
{
this
.
$inertia
.
post
(
this
.
route
(
'organizations.store'
),
this
.
form
)
onStart
:
()
=>
this
.
sending
=
true
,
.
then
(()
=>
this
.
sending
=
false
)
onFinish
:
()
=>
this
.
sending
=
false
,
})
},
},
},
},
}
}
...
...
resources/js/Pages/Organizations/Edit.vue
View file @
3537db2
...
@@ -111,9 +111,10 @@ export default {
...
@@ -111,9 +111,10 @@ export default {
},
},
methods
:
{
methods
:
{
submit
()
{
submit
()
{
this
.
sending
=
true
this
.
$inertia
.
put
(
this
.
route
(
'organizations.update'
,
this
.
organization
.
id
),
this
.
form
,
{
this
.
$inertia
.
put
(
this
.
route
(
'organizations.update'
,
this
.
organization
.
id
),
this
.
form
)
onStart
:
()
=>
this
.
sending
=
true
,
.
then
(()
=>
this
.
sending
=
false
)
onFinish
:
()
=>
this
.
sending
=
false
,
})
},
},
destroy
()
{
destroy
()
{
if
(
confirm
(
'Are you sure you want to delete this organization?'
))
{
if
(
confirm
(
'Are you sure you want to delete this organization?'
))
{
...
...
resources/js/Pages/Users/Create.vue
View file @
3537db2
...
@@ -60,9 +60,7 @@ export default {
...
@@ -60,9 +60,7 @@ export default {
},
},
methods
:
{
methods
:
{
submit
()
{
submit
()
{
this
.
sending
=
true
const
data
=
new
FormData
()
var
data
=
new
FormData
()
data
.
append
(
'first_name'
,
this
.
form
.
first_name
||
''
)
data
.
append
(
'first_name'
,
this
.
form
.
first_name
||
''
)
data
.
append
(
'last_name'
,
this
.
form
.
last_name
||
''
)
data
.
append
(
'last_name'
,
this
.
form
.
last_name
||
''
)
data
.
append
(
'email'
,
this
.
form
.
email
||
''
)
data
.
append
(
'email'
,
this
.
form
.
email
||
''
)
...
@@ -70,8 +68,10 @@ export default {
...
@@ -70,8 +68,10 @@ export default {
data
.
append
(
'owner'
,
this
.
form
.
owner
?
'1'
:
'0'
)
data
.
append
(
'owner'
,
this
.
form
.
owner
?
'1'
:
'0'
)
data
.
append
(
'photo'
,
this
.
form
.
photo
||
''
)
data
.
append
(
'photo'
,
this
.
form
.
photo
||
''
)
this
.
$inertia
.
post
(
this
.
route
(
'users.store'
),
data
)
this
.
$inertia
.
post
(
this
.
route
(
'users.store'
),
data
,
{
.
then
(()
=>
this
.
sending
=
false
)
onStart
:
()
=>
this
.
sending
=
true
,
onFinish
:
()
=>
this
.
sending
=
false
,
})
},
},
},
},
}
}
...
...
resources/js/Pages/Users/Edit.vue
View file @
3537db2
...
@@ -75,8 +75,6 @@ export default {
...
@@ -75,8 +75,6 @@ export default {
},
},
methods
:
{
methods
:
{
submit
()
{
submit
()
{
this
.
sending
=
true
var
data
=
new
FormData
()
var
data
=
new
FormData
()
data
.
append
(
'first_name'
,
this
.
form
.
first_name
||
''
)
data
.
append
(
'first_name'
,
this
.
form
.
first_name
||
''
)
data
.
append
(
'last_name'
,
this
.
form
.
last_name
||
''
)
data
.
append
(
'last_name'
,
this
.
form
.
last_name
||
''
)
...
@@ -86,13 +84,17 @@ export default {
...
@@ -86,13 +84,17 @@ export default {
data
.
append
(
'photo'
,
this
.
form
.
photo
||
''
)
data
.
append
(
'photo'
,
this
.
form
.
photo
||
''
)
data
.
append
(
'_method'
,
'put'
)
data
.
append
(
'_method'
,
'put'
)
this
.
$inertia
.
post
(
this
.
route
(
'users.update'
,
this
.
user
.
id
),
data
)
this
.
$inertia
.
post
(
this
.
route
(
'users.update'
,
this
.
user
.
id
),
data
,
{
.
then
(()
=>
{
onStart
:
()
=>
this
.
sending
=
true
,
this
.
sending
=
false
onSuccess
:
()
=>
{
if
(
Object
.
keys
(
this
.
$page
.
errors
).
length
===
0
)
{
if
(
Object
.
keys
(
this
.
$page
.
errors
).
length
===
0
)
{
this
.
form
.
photo
=
null
this
.
form
.
photo
=
null
this
.
form
.
password
=
null
this
.
form
.
password
=
null
}
}
},
onFinish
:
()
=>
{
this
.
sending
=
false
},
})
})
},
},
destroy
()
{
destroy
()
{
...
...
resources/js/app.js
View file @
3537db2
...
@@ -2,6 +2,7 @@ import Vue from 'vue'
...
@@ -2,6 +2,7 @@ import Vue from 'vue'
import
VueMeta
from
'vue-meta'
import
VueMeta
from
'vue-meta'
import
PortalVue
from
'portal-vue'
import
PortalVue
from
'portal-vue'
import
{
InertiaApp
}
from
'@inertiajs/inertia-vue'
import
{
InertiaApp
}
from
'@inertiajs/inertia-vue'
import
{
InertiaProgress
}
from
'@inertiajs/progress/src'
Vue
.
config
.
productionTip
=
false
Vue
.
config
.
productionTip
=
false
Vue
.
mixin
({
methods
:
{
route
:
window
.
route
}
})
Vue
.
mixin
({
methods
:
{
route
:
window
.
route
}
})
...
@@ -9,6 +10,8 @@ Vue.use(InertiaApp)
...
@@ -9,6 +10,8 @@ Vue.use(InertiaApp)
Vue
.
use
(
PortalVue
)
Vue
.
use
(
PortalVue
)
Vue
.
use
(
VueMeta
)
Vue
.
use
(
VueMeta
)
InertiaProgress
.
init
()
let
app
=
document
.
getElementById
(
'app'
)
let
app
=
document
.
getElementById
(
'app'
)
new
Vue
({
new
Vue
({
...
...
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