Skip to content

Commit fab7c85

Browse files
Merge pull request #8 from mehedijaman/main
UI Design Enhancements and Improvements
2 parents b286e24 + d06c883 commit fab7c85

File tree

24 files changed

+451
-97
lines changed

24 files changed

+451
-97
lines changed

stubs/lang/bn/auth.php

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<?php
2+
3+
return [
4+
5+
/*
6+
|--------------------------------------------------------------------------
7+
| Authentication Language Lines
8+
|--------------------------------------------------------------------------
9+
|
10+
| The following language lines are used during authentication for various
11+
| messages that we need to display to the user. You are free to modify
12+
| these language lines according to your application's requirements.
13+
|
14+
*/
15+
16+
'failed' => 'এই পরিচয়পত্র আমাদের রেকর্ডের সাথে মেলে না।',
17+
'password' => 'পাসওয়ার্ড ভুল।',
18+
'throttle' => 'লগইন করার জন্য অনেকবার চেষ্টা করেছেন, :seconds সেকেন্ড পরে পুনরায় চেষ্টা করুন।',
19+
20+
];

stubs/lang/bn/pagination.php

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<?php
2+
3+
return [
4+
5+
/*
6+
|--------------------------------------------------------------------------
7+
| Pagination Language Lines
8+
|--------------------------------------------------------------------------
9+
|
10+
| The following language lines are used by the paginator library to build
11+
| the simple pagination links. You are free to change them to anything
12+
| you want to customize your views to better match your application.
13+
|
14+
*/
15+
16+
'previous' => '&laquo; পূর্বে',
17+
'next' => 'পরবর্তি &raquo;',
18+
19+
'Showing' => 'দেখাচ্ছে',
20+
'to' => 'পর্যন্ত',
21+
'of' => 'এর মধ্যে',
22+
'results' => 'ফলাফলসমুহ',
23+
24+
];

stubs/lang/bn/passwords.php

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<?php
2+
3+
return [
4+
5+
/*
6+
|--------------------------------------------------------------------------
7+
| Password Reset Language Lines
8+
|--------------------------------------------------------------------------
9+
|
10+
| The following language lines are the default lines which match reasons
11+
| that are given by the password broker for a password update attempt
12+
| has failed, such as for an invalid token or invalid new password.
13+
|
14+
*/
15+
16+
'reset' => 'আপনার পাসওয়ার্ড পুনরায় সেট করা হয়েছে!',
17+
'sent' => 'আমরা আপনার পাসওয়ার্ড পুনরায় সেট করার লিঙ্ক ই-মেইল করেছি!',
18+
'throttle' => 'লগইন করার জন্য অনেকবার চেষ্টা করেছেন, :seconds সেকেন্ড পরে পুনরায় চেষ্টা করুন।',
19+
'token' => 'এই পাসওয়ার্ড রিসেট টোকেনটি সঠিক নয়।',
20+
'user' => 'এই ই-মেইল দিয়ে কোন ব্যবহারকারী খুঁজে পাওয়া যাচ্ছে না',
21+
22+
];

stubs/lang/bn/validation.php

Lines changed: 205 additions & 0 deletions
Large diffs are not rendered by default.

stubs/module-stub/modules/Database/Factories/ModelFactory.stub

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@ class {{ ResourceName }}Factory extends Factory
1111

1212
public function definition(): array
1313
{
14-
//$name = $this->faker->unique()->sentence(4);
14+
$name = $this->faker->unique()->sentence(4);
1515

1616
return [
17-
//'name' => $name,
17+
'name' => $name,
1818

19-
//'created_at' => $this->faker->dateTimeBetween('-1 year', '-6 month'),
20-
//'updated_at' => $this->faker->dateTimeBetween('-5 month', 'now'),
19+
'created_at' => $this->faker->dateTimeBetween('-1 year', '-6 month'),
20+
'updated_at' => $this->faker->dateTimeBetween('-5 month', 'now'),
2121
];
2222
}
2323
}

stubs/module-stub/modules/Database/Migrations/create_table.stub

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ return new class extends Migration
1212
public function up(): void
1313
{
1414
Schema::create('${{ resourceName }}', function (Blueprint $table) {
15-
// $table->id();
16-
// $table->string('name');
17-
// $table->timestamps();
18-
// $table->softDeletes();
15+
$table->id();
16+
$table->string('name');
17+
$table->timestamps();
18+
$table->softDeletes();
1919
});
2020
}
2121

stubs/module-stub/modules/Http/Controllers/ModuleController.stub

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class {{ ResourceName }}Controller extends BackendController
1818
->withQueryString()
1919
->through(fn (${{ resourceName }}) => [
2020
'id' => ${{ resourceName }}->id,
21-
// 'name' => ${{ resourceName }}->name,
21+
'name' => ${{ resourceName }}->name,
2222
'created_at' => ${{ resourceName }}->created_at->format('d/m/Y H:i') . 'h'
2323
]);
2424

stubs/module-stub/modules/Http/Requests/ModuleValidate.stub

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ class {{ ResourceName }}Validate extends Request
99
public function rules(): array
1010
{
1111
return [
12-
// 'name' => 'required',
12+
'name' => 'required',
1313
];
1414
}
1515
}

stubs/page-stub/Form.stub

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<template>
2-
<AppSectionHeader title="{{ ResourceName }}s" :bread-crumb="breadCrumb">
2+
<Head :title="title"></Head>
3+
<AppSectionHeader :title="title" :bread-crumb="breadCrumb">
34
</AppSectionHeader>
45

56
<AppCard class="w-full md:w-3/4 xl:w-1/2">
@@ -30,11 +31,13 @@
3031

3132
<script setup>
3233
import { useForm } from '@inertiajs/vue3'
33-
34+
import { Head } from '@inertiajs/vue3'
3435
import useTitle from '@/Composables/useTitle'
3536
import useFormContext from '@/Composables/useFormContext'
3637
import useFormErrors from '@/Composables/useFormErrors'
3738

39+
const { title } = useTitle('{{ ResourceName }}')
40+
3841
const props = defineProps({
3942
{{ resourceName }}: {
4043
type: Object,
@@ -48,18 +51,20 @@ const breadCrumb = [
4851
{ label: '{{ ResourceName }}', last: true }
4952
]
5053

51-
const { title } = useTitle('{{ ResourceName }}')
54+
5255

5356
const form = useForm({
5457
name: props.{{ resourceName }} ? props.{{ resourceName }}.name : '',
5558
})
5659

57-
const { isCreate } = useFormContext()
60+
const { isCreate, isEdit } = useFormContext()
5861

5962
const submitForm = () => {
6063
if (isCreate.value) {
6164
form.post(route('{{ resourceName }}.store'))
62-
} else {
65+
}
66+
67+
if(isEdit.value) {
6368
form.put(route('{{ resourceName }}.update', props.{{ resourceName }}.id))
6469
}
6570
}

stubs/page-stub/Index.stub

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
<template>
2-
<AppSectionHeader title="{{ ResourceName }}s" :bread-crumb="breadCrumb">
2+
<Head :title="title"></Head>
3+
<AppSectionHeader :title="title" :bread-crumb="breadCrumb">
34
<template #right>
45
<AppButton
56
class="btn btn-primary"
67
@click="$inertia.visit(route('{{ resourceName }}.create'))"
78
>
9+
<i class="ri-add-fill mr-1"></i>
810
Create {{ ResourceName }}
911
</AppButton>
1012
</template>
@@ -20,7 +22,7 @@
2022
<template #TableBody>
2123
<tbody>
2224
<AppDataTableRow
23-
v-for="item in {{ resourceName }}s.data"
25+
v-for="(item, index) in {{ resourceName }}s.data"
2426
:key="item.id"
2527
>
2628
<AppDataTableData>
@@ -32,7 +34,7 @@
3234
</AppDataTableData> -->
3335

3436
<AppDataTableData>
35-
<!-- edit {{ resourceName }} -->
37+
<!-- Edit {{ resourceName }} -->
3638
<AppTooltip text="Edit {{ ResourceName }}" class="mr-2">
3739
<AppButton
3840
class="btn btn-icon btn-primary"
@@ -49,7 +51,7 @@
4951
</AppButton>
5052
</AppTooltip>
5153

52-
<!-- delete {{ resourceName }} -->
54+
<!-- Delete {{ resourceName }} -->
5355
<AppTooltip text="Delete {{ ResourceName }}">
5456
<AppButton
5557
class="btn btn-icon btn-destructive"
@@ -73,6 +75,9 @@
7375

7476
<AppPaginator
7577
:links="{{ resourceName }}s.links"
78+
:from="{{ resourceName }}s.from"
79+
:to="{{ resourceName }}s.to"
80+
:total="{{ resourceName }}s.total"
7681
class="mt-4 justify-center"
7782
></AppPaginator>
7883

@@ -85,6 +90,12 @@
8590

8691
<script setup>
8792
import { ref } from 'vue'
93+
import { Head } from '@inertiajs/vue3'
94+
import useTitle from '@/Composables/useTitle'
95+
import useAuthCan from '@/Composables/useAuthCan'
96+
97+
const { title } = useTitle('{{ ResourceName }}')
98+
const { can } = useAuthCan()
8899

89100
const props = defineProps({
90101
{{ resourceName }}s: {

0 commit comments

Comments
 (0)