Skip to content

Commit

Permalink
Merge pull request #66 from uasoft-indonesia/bugfix/v1/update-name
Browse files Browse the repository at this point in the history
[Badaso v1] Bugfix/v1/update name
  • Loading branch information
rizkiheryandi authored Jul 8, 2021
2 parents d5f9b7f + a6977d4 commit bcaa241
Show file tree
Hide file tree
Showing 9 changed files with 40 additions and 39 deletions.
19 changes: 10 additions & 9 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,16 @@ After getting the license, you can proceed to Badaso installation.
- Root Laravel Project
- /packages (Folder Packages)
- /uasoft-indonesia (Folder Uasoft Indonesia)
- badaso (Badaso Library)
- badaso-content-module (Cloud Badaso Content Manager)
- core (Badaso Core Library)
- content-module (Cloud Badaso Content Manager)
- ...
- ...
- ...

cd into uasoft-indonesia directory, then run
```
git clone https://github.com/uasoft-indonesia/badaso-content-module.git
git clone https://github.com/uasoft-indonesia/badaso-content-module.git content-module
```

2. Add the following Badaso provider to ```/config/app.php```.
Expand All @@ -74,14 +75,14 @@ git clone https://github.com/uasoft-indonesia/badaso-content-module.git
"autoload": {
"psr-4": {
"App\\": "app/",
"Uasoft\\Badaso\\": "packages/uasoft-indonesia/badaso/src/",
"Uasoft\\Badaso\\Module\\Content\\": "packages/uasoft-indonesia/badaso-content-module/src/",
"Uasoft\\Badaso\\": "packages/badaso/badaso/src/",
"Uasoft\\Badaso\\Module\\Content\\": "packages/badaso/content-module/src/",
},
...
}
```

5. Copy required library from ```packages/uasoft-indonesia/badaso-content-module/composer.json``` to ```/composer.json``` then ```composer install```
5. Copy required library from ```packages/badaso/content-module/composer.json``` to ```/composer.json``` then ```composer install```

6. Run the following commands in sequence.
```
Expand All @@ -103,13 +104,13 @@ composer dump-autoload
```
9. Run command
```
php artisan db:seed --class=ContentModuleSeeder
php artisan db:seed --class=BadasoContentModuleSeeder
```
11. Open the ```env``` file then add the following lines.
```
MIX_DEFAULT_MENU=admin
MIX_BADASO_MENU=${MIX_DEFAULT_MENU},badaso-content-module
MIX_BADASO_MODULES=badaso-content-module
MIX_BADASO_MENU=${MIX_DEFAULT_MENU},content-module
MIX_BADASO_MODULES=content-module
```

9. In menu item "Role Management" from badaso admin panel, add permission user to fill content
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
use Illuminate\Database\Seeder;
use Uasoft\Badaso\Models\MenuItem;

class ContentFixedMenuItemSeeder extends Seeder
class BadasoContentFixedMenuItemSeeder extends Seeder
{
/**
* Auto generated seed file.
Expand All @@ -17,7 +17,7 @@ public function run()
\DB::beginTransaction();

try {
$menus = \DB::table('menus')->where('key', 'badaso-content-module')->first();
$menus = \DB::table('menus')->where('key', 'content-module')->first();
$menu_id = $menus->id;

$add_menus_item = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
use Illuminate\Database\Seeder;
use Uasoft\Badaso\Models\Menu;

class ContentMenusSeeder extends Seeder
class BadasoContentMenusSeeder extends Seeder
{
/**
* Auto generated seed file.
Expand All @@ -18,7 +18,7 @@ public function run()

try {
$new_menus = [
'key' => 'badaso-content-module',
'key' => 'content-module',
'display_name' => 'Content Manager',
'created_at' => '2021-01-01 15:26:06',
'updated_at' => '2021-01-01 15:26:06',
Expand Down
19 changes: 19 additions & 0 deletions src/Seeder/BadasoContentModuleSeeder.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?php

use Illuminate\Database\Seeder;

class BadasoContentModuleSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
$this->call(BadasoContentPermissionsSeeder::class);
$this->call(BadasoContentRolePermissionsSeeder::class);
$this->call(BadasoContentMenusSeeder::class);
$this->call(BadasoContentFixedMenuItemSeeder::class);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
use Illuminate\Database\Seeder;
use Uasoft\Badaso\Models\Permission;

class ContentPermissionsSeeder extends Seeder
class BadasoContentPermissionsSeeder extends Seeder
{
/**
* Auto generated seed file.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
use Uasoft\Badaso\Models\Role;
use Uasoft\Badaso\Models\RolePermission;

class ContentRolePermissionsSeeder extends Seeder
class BadasoContentRolePermissionsSeeder extends Seeder
{
/**
* Auto generated seed file.
Expand Down
19 changes: 0 additions & 19 deletions src/Seeder/ContentModuleSeeder.php

This file was deleted.

4 changes: 2 additions & 2 deletions src/resources/js/api/modules/badaso-content.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import resource from "../../../../../../badaso/src/resources/js/api/resource";
import QueryString from "../../../../../../badaso/src/resources/js/api/query-string";
import resource from "../../../../../../core/src/resources/js/api/resource";
import QueryString from "../../../../../../core/src/resources/js/api/query-string";

let apiPrefix = process.env.MIX_API_ROUTE_PREFIX
? "/" + process.env.MIX_API_ROUTE_PREFIX
Expand Down
6 changes: 3 additions & 3 deletions src/resources/js/pages/content/add.vue
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
<div slot="header">
<h3>{{ $t("content.add.secondTitle") }}</h3>
</div>
<table class="table">
<table class="badaso-table">
<thead>
<th></th>
<th>{{ $t("content.add.field.content.label.title") }}</th>
Expand Down Expand Up @@ -311,7 +311,7 @@ export default {
}
}
[temp[index], temp[index + 1]] = [temp[index + 1], temp[index]]
tempObject = this.convertArrayToObject(temp, 'name')
this.items = tempObject
},
Expand All @@ -325,7 +325,7 @@ export default {
}
}
[temp[index], temp[index - 1]] = [temp[index - 1], temp[index]]
tempObject = this.convertArrayToObject(temp, 'name')
this.items = tempObject
},
Expand Down

0 comments on commit bcaa241

Please sign in to comment.