Skip to content

Commit d06c883

Browse files
committed
- Replaced 'SL' with 'ID"
- Fixed conflict
1 parent d14fbe3 commit d06c883

File tree

4 files changed

+59
-67
lines changed

4 files changed

+59
-67
lines changed

stubs/page-stub/Index.stub

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,7 @@
2626
:key="item.id"
2727
>
2828
<AppDataTableData>
29-
{{
30-
({{ resourceName }}s.current_page - 1) *
31-
{{ resourceName }}s.per_page +
32-
(index + 1)
33-
}}
29+
{{ item.id }}
3430
</AppDataTableData>
3531

3632
<!-- <AppDataTableData>
@@ -113,7 +109,7 @@ const breadCrumb = [
113109
{ label: '{{ ResourceName }}s', last: true }
114110
]
115111

116-
const headers = ['SL', 'Actions']
112+
const headers = ['ID', 'Actions']
117113

118114
const confirmDialogRef = ref(null)
119115
const confirmDelete = (deleteRoute) => {

stubs/resources/js/Pages/AclPermission/PermissionIndex.vue

Lines changed: 14 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
<template>
2-
<Head :title="title"></Head>
3-
<AppSectionHeader :title="title" :bread-crumb="breadCrumb">
2+
<AppSectionHeader :title="__('Permissions')" :bread-crumb="breadCrumb">
43
<template #right>
54
<AppButton
5+
v-if="can('Acl: Permission - Create')"
66
class="btn btn-primary"
77
@click="$inertia.visit(route('aclPermission.create'))"
88
>
9-
<i class="ri-add-fill mr-1"></i>
109
{{ __('Create Permission') }}
1110
</AppButton>
1211
</template>
@@ -22,15 +21,11 @@
2221
<template #TableBody>
2322
<tbody>
2423
<AppDataTableRow
25-
v-for="(item, index) in permissions.data"
24+
v-for="item in permissions.data"
2625
:key="item.id"
2726
>
2827
<AppDataTableData>
29-
{{
30-
(permissions.current_page - 1) *
31-
permissions.per_page +
32-
(index + 1)
33-
}}
28+
{{ item.id }}
3429
</AppDataTableData>
3530

3631
<AppDataTableData>
@@ -39,7 +34,11 @@
3934

4035
<AppDataTableData>
4136
<!-- edit permission -->
42-
<AppTooltip :text="__('Edit Permission')" class="mr-2">
37+
<AppTooltip
38+
v-if="can('Acl: Permission - Edit')"
39+
:text="__('Edit Permission')"
40+
class="mr-2"
41+
>
4342
<AppButton
4443
class="btn btn-icon btn-primary"
4544
@click="
@@ -53,7 +52,10 @@
5352
</AppTooltip>
5453

5554
<!-- delete permission -->
56-
<AppTooltip :text="__('Delete Permission')">
55+
<AppTooltip
56+
v-if="can('Acl: Permission - Delete')"
57+
:text="__('Delete Permission')"
58+
>
5759
<AppButton
5860
class="btn btn-icon btn-destructive"
5961
@click="
@@ -73,9 +75,6 @@
7375

7476
<AppPaginator
7577
:links="permissions.links"
76-
:from="permissions.from"
77-
:to="permissions.to"
78-
:total="permissions.total"
7978
class="mt-4 justify-center"
8079
></AppPaginator>
8180

@@ -88,11 +87,8 @@
8887

8988
<script setup>
9089
import { ref } from 'vue'
91-
import { Head } from '@inertiajs/vue3'
92-
import useTitle from '@/Composables/useTitle'
9390
import useAuthCan from '@/Composables/useAuthCan'
9491
95-
const { title } = useTitle('Users')
9692
const { can } = useAuthCan()
9793
9894
const props = defineProps({
@@ -107,7 +103,7 @@ const breadCrumb = [
107103
{ label: 'Permissions', last: true }
108104
]
109105
110-
const headers = ['SL', 'Name', 'Actions']
106+
const headers = ['ID', 'Name', 'Actions']
111107
112108
const confirmDialogRef = ref(null)
113109
const confirmDelete = (deleteRoute) => {

stubs/resources/js/Pages/AclRole/RoleIndex.vue

Lines changed: 19 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
<template>
2-
<Head :title="title"></Head>
3-
<AppSectionHeader :title="title" :bread-crumb="breadCrumb">
2+
<AppSectionHeader :title="__('Roles')" :bread-crumb="breadCrumb">
43
<template #right>
54
<AppButton
5+
v-if="can('Acl: Role - Create')"
66
class="btn btn-primary"
77
@click="$inertia.visit(route('aclRole.create'))"
88
>
9-
<i class="ri-add-fill mr-1"></i>
109
{{ __('Create Role') }}
1110
</AppButton>
1211
</template>
@@ -21,15 +20,9 @@
2120
<AppDataTable v-if="roles.data.length" :headers="headers">
2221
<template #TableBody>
2322
<tbody>
24-
<AppDataTableRow
25-
v-for="(item, index) in roles.data"
26-
:key="item.id"
27-
>
23+
<AppDataTableRow v-for="item in roles.data" :key="item.id">
2824
<AppDataTableData>
29-
{{
30-
(roles.current_page - 1) * roles.per_page +
31-
(index + 1)
32-
}}
25+
{{ item.id }}
3326
</AppDataTableData>
3427

3528
<AppDataTableData>
@@ -38,7 +31,11 @@
3831

3932
<AppDataTableData>
4033
<!-- role permissions -->
41-
<AppTooltip :text="__('Role Permissions')" class="mr-2">
34+
<AppTooltip
35+
v-if="can('Acl: Role: Permission - Edit')"
36+
:text="__('Role Permissions')"
37+
class="mr-2"
38+
>
4239
<AppButton
4340
class="btn btn-icon btn-primary"
4441
@click="
@@ -52,7 +49,11 @@
5249
</AppTooltip>
5350

5451
<!-- edit role -->
55-
<AppTooltip :text="__('Edit Role')" class="mr-2">
52+
<AppTooltip
53+
v-if="can('Acl: Role - Edit')"
54+
:text="__('Edit Role')"
55+
class="mr-2"
56+
>
5657
<AppButton
5758
class="btn btn-icon btn-primary"
5859
@click="
@@ -66,7 +67,10 @@
6667
</AppTooltip>
6768

6869
<!-- delete role -->
69-
<AppTooltip :text="__('Delete Role')">
70+
<AppTooltip
71+
v-if="can('Acl: Role - Delete')"
72+
:text="__('Delete Role')"
73+
>
7074
<AppButton
7175
class="btn btn-icon btn-destructive"
7276
@click="
@@ -86,9 +90,6 @@
8690

8791
<AppPaginator
8892
:links="roles.links"
89-
:from="roles.from"
90-
:to="roles.to"
91-
:total="roles.total"
9293
class="mt-4 justify-center"
9394
></AppPaginator>
9495

@@ -101,11 +102,8 @@
101102

102103
<script setup>
103104
import { ref } from 'vue'
104-
import { Head } from '@inertiajs/vue3'
105-
import useTitle from '@/Composables/useTitle'
106105
import useAuthCan from '@/Composables/useAuthCan'
107106
108-
const { title } = useTitle('Users')
109107
const { can } = useAuthCan()
110108
111109
const props = defineProps({
@@ -120,7 +118,7 @@ const breadCrumb = [
120118
{ label: 'Roles', last: true }
121119
]
122120
123-
const headers = ['SL', 'Name', 'Actions']
121+
const headers = ['ID', 'Name', 'Actions']
124122
125123
const confirmDialogRef = ref(null)
126124
const confirmDelete = (deleteRoute) => {

stubs/resources/js/Pages/User/UserIndex.vue

Lines changed: 24 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
<template>
2-
<Head :title="title"></Head>
3-
<AppSectionHeader :title="title" :bread-crumb="breadCrumb">
2+
<AppSectionHeader :title="__('Users')" :bread-crumb="breadCrumb">
43
<template #right>
54
<AppButton
5+
v-if="can('Acl: User - Create')"
66
class="btn btn-primary"
77
@click="$inertia.visit(route('user.create'))"
88
>
9-
<i class="ri-add-fill mr-1"></i>
109
{{ __('Create User') }}
1110
</AppButton>
1211
</template>
@@ -21,15 +20,9 @@
2120
<AppDataTable v-if="users.data.length" :headers="headers">
2221
<template #TableBody>
2322
<tbody>
24-
<AppDataTableRow
25-
v-for="(item, index) in users.data"
26-
:key="item.id"
27-
>
23+
<AppDataTableRow v-for="item in users.data" :key="item.id">
2824
<AppDataTableData>
29-
{{
30-
(users.current_page - 1) * users.per_page +
31-
(index + 1)
32-
}}
25+
{{ item.id }}
3326
</AppDataTableData>
3427

3528
<AppDataTableData>
@@ -42,7 +35,11 @@
4235

4336
<AppDataTableData>
4437
<!-- edit user roles -->
45-
<AppTooltip :text="__('User Roles')" class="mr-2">
38+
<AppTooltip
39+
v-if="can('Acl: User: Role - Edit')"
40+
:text="__('User Roles')"
41+
class="mr-2"
42+
>
4643
<AppButton
4744
class="btn btn-icon btn-primary"
4845
@click="
@@ -56,7 +53,11 @@
5653
</AppTooltip>
5754

5855
<!-- edit user permissions -->
59-
<AppTooltip :text="__('User Permissions')" class="mr-2">
56+
<AppTooltip
57+
v-if="can('Acl: User: Permission - Edit')"
58+
:text="__('User Permissions')"
59+
class="mr-2"
60+
>
6061
<AppButton
6162
class="btn btn-icon btn-primary"
6263
@click="
@@ -70,7 +71,11 @@
7071
</AppTooltip>
7172

7273
<!-- edit user -->
73-
<AppTooltip :text="__('Edit User')" class="mr-2">
74+
<AppTooltip
75+
v-if="can('Acl: User - Edit')"
76+
:text="__('Edit User')"
77+
class="mr-2"
78+
>
7479
<AppButton
7580
class="btn btn-icon btn-primary"
7681
@click="
@@ -82,7 +87,10 @@
8287
</AppTooltip>
8388

8489
<!-- delete user -->
85-
<AppTooltip :text="__('Delete User')">
90+
<AppTooltip
91+
v-if="can('Acl: User - Delete')"
92+
:text="__('Delete User')"
93+
>
8694
<AppButton
8795
class="btn btn-icon btn-destructive"
8896
@click="
@@ -102,9 +110,6 @@
102110

103111
<AppPaginator
104112
:links="users.links"
105-
:from="users.from"
106-
:to="users.to"
107-
:total="users.total"
108113
class="mt-4 justify-center"
109114
></AppPaginator>
110115

@@ -117,11 +122,8 @@
117122

118123
<script setup>
119124
import { ref } from 'vue'
120-
import { Head } from '@inertiajs/vue3'
121-
import useTitle from '@/Composables/useTitle'
122125
import useAuthCan from '@/Composables/useAuthCan'
123126
124-
const { title } = useTitle('Users')
125127
const { can } = useAuthCan()
126128
127129
const props = defineProps({
@@ -136,7 +138,7 @@ const breadCrumb = [
136138
{ label: 'Users', last: true }
137139
]
138140
139-
const headers = ['SL', 'Name', 'Email', 'Actions']
141+
const headers = ['ID', 'Name', 'Email', 'Actions']
140142
141143
const confirmDialogRef = ref(null)
142144
const confirmDelete = (deleteRoute) => {

0 commit comments

Comments
 (0)