Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
J
Juno Frontend Vue
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Dhevan Muhammad
Juno Frontend Vue
Commits
8bebb942
Commit
8bebb942
authored
May 02, 2024
by
Dhevan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add some routes
parent
e3d81eb9
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
79 additions
and
5 deletions
+79
-5
baseApi.js
src/api/baseApi.js
+1
-1
role.js
src/router/role.js
+6
-4
user.js
src/router/user.js
+2
-0
RoleCreate.vue
src/views/role/RoleCreate.vue
+23
-0
RoleEdit.vue
src/views/role/RoleEdit.vue
+23
-0
RoleIndex.vue
src/views/role/RoleIndex.vue
+24
-0
No files found.
src/api/baseApi.js
View file @
8bebb942
...
...
@@ -23,7 +23,7 @@ export default class BaseAPI {
if
(
this
.
dummy_data
!=
null
)
{
return
await
this
.
dummyResponse
(
this
.
dummy_data
.
data
[
0
]);
}
const
response
=
await
RestClient
.
get
(
`
${
this
.
url
}
/
${
id
}
`
);
const
response
=
await
RestClient
.
get
(
`
${
this
.
url
}
/
${
id
}
/detail
`
);
return
response
.
data
;
}
...
...
src/router/role.js
View file @
8bebb942
import
UserIndex
from
"./../views/user/UserIndex.vue"
;
import
RoleIndex
from
"./../views/role/RoleIndex.vue"
;
import
RoleCreate
from
"./../views/role/RoleCreate.vue"
;
import
RoleEdit
from
"./../views/role/RoleEdit.vue"
;
export
const
roleRoutes
=
[
{
path
:
"/role"
,
name
:
"role-index"
,
component
:
User
Index
,
component
:
Role
Index
,
},
{
path
:
"/role/create"
,
name
:
"role-create"
,
component
:
UserIndex
,
component
:
RoleCreate
,
},
{
path
:
"/role/:id/edit"
,
name
:
"role-edit"
,
component
:
UserIndex
,
component
:
RoleEdit
,
},
];
src/router/user.js
View file @
8bebb942
...
...
@@ -2,6 +2,8 @@ import UserProfile from "./../views/user/UserProfile.vue";
import
UserIndex
from
"./../views/user/UserIndex.vue"
;
import
UserCreate
from
"@/views/user/UserCreate.vue"
;
import
UserEdit
from
"@/views/user/UserEdit.vue"
;
export
const
userRoutes
=
[
{
path
:
"/user"
,
...
...
src/views/role/RoleCreate.vue
0 → 100644
View file @
8bebb942
<
template
>
<form-page
title=
"Tambah Role"
:schemas=
"schemas"
:api=
"RoleApi"
></form-page>
</
template
>
<
script
setup
>
import
*
as
Yup
from
"yup"
;
import
FormPage
from
"@/components/Page/FormPage.vue"
;
import
{
RoleApi
}
from
"@/api/role.js"
;
const
schemas
=
[
{
label
:
"Kode Role"
,
name
:
"code"
,
validation
:
Yup
.
string
().
required
().
label
(
"Kode Role"
),
cols
:
12
,
},
{
label
:
"Nama Role"
,
name
:
"name"
,
validation
:
Yup
.
string
().
required
().
label
(
"Nama Role"
),
cols
:
6
,
},
];
</
script
>
\ No newline at end of file
src/views/role/RoleEdit.vue
0 → 100644
View file @
8bebb942
<
template
>
<form-page
:isEdit=
"true"
title=
"Tambah Role"
:schemas=
"schemas"
:api=
"RoleApi"
></form-page>
</
template
>
<
script
setup
>
import
*
as
Yup
from
"yup"
;
import
FormPage
from
"@/components/Page/FormPage.vue"
;
import
{
RoleApi
}
from
"@/api/role.js"
;
const
schemas
=
[
{
label
:
"Kode Role"
,
name
:
"code"
,
validation
:
Yup
.
string
().
required
().
label
(
"Kode Role"
),
cols
:
12
,
},
{
label
:
"Nama Role"
,
name
:
"name"
,
validation
:
Yup
.
string
().
required
().
label
(
"Nama Role"
),
cols
:
6
,
},
];
</
script
>
\ No newline at end of file
src/views/role/RoleIndex.vue
0 → 100644
View file @
8bebb942
<
template
>
<base-page>
<ServerDatatable
title=
"Role"
:api=
"RoleApi"
:headers=
"headers"
path=
"role"
>
</ServerDatatable>
</base-page>
</
template
>
<
script
setup
lang=
"ts"
>
import
BasePage
from
"./../../components/Page/BasePage.vue"
;
import
{
RoleApi
}
from
"@/api/role.js"
;
import
ServerDatatable
from
"@/components/Common/ServerDatatable.vue"
;
import
{
ref
,
onMounted
,
inject
}
from
"vue"
;
import
*
as
bootstrap
from
"bootstrap"
;
const
headers
=
ref
([
{
text
:
"Kode"
,
value
:
"code"
,
},
{
text
:
"Role"
,
value
:
"name"
,
},
]);
</
script
>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment