Skip to content

Commit

Permalink
Merge branch '2.x-release/v2.0.4' into 2.x
Browse files Browse the repository at this point in the history
  • Loading branch information
themodernpk committed Jun 3, 2024
2 parents f53b630 + ad57935 commit aac6c58
Show file tree
Hide file tree
Showing 25 changed files with 997 additions and 4,295 deletions.
2 changes: 2 additions & 0 deletions Http/Controllers/Backend/BlocksController.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ public function getAssets(Request $request)
$data['empty_item'][$column] = null;
}

$data['empty_item']['content'] = '';

$data['actions'] = [];

$response['success'] = true;
Expand Down
2 changes: 1 addition & 1 deletion Http/Controllers/Backend/ExtendController.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public static function getCmsContentRelations()
],
[
"name" => "Role",
"namespace" => "WebReinvent\\VaahCms\\Entities\\Role",
"namespace" => "WebReinvent\\VaahCms\\Models\\Role",
"display_column" => 'name',
"filters" => [
[
Expand Down
60 changes: 0 additions & 60 deletions Http/Controllers/Backend/MenusController.php
Original file line number Diff line number Diff line change
Expand Up @@ -121,66 +121,6 @@ public function itemAction(Request $request,$id,$action)
//----------------------------------------------------------

//----------------------------------------------------------
public function postActions(Request $request, $action)
{
$rules = array(
'inputs' => 'required',
);

$validator = \Validator::make( $request->all(), $rules);
if ( $validator->fails() ) {

$errors = errorsToArray($validator->errors());
$response['success'] = false;
$response['errors'] = $errors;
return response()->json($response);
}

$response = [];

$response['success'] = true;

$inputs = $request->all();

switch ($action)
{

//------------------------------------
case 'bulk-change-status':
$response = Menu::bulkStatusChange($request);
break;
//------------------------------------
case 'bulk-trash':

$response = Menu::bulkTrash($request);

break;
//------------------------------------
case 'bulk-restore':

$response = Menu::bulkRestore($request);

break;

//------------------------------------
case 'bulk-delete':

$response = Menu::bulkDelete($request);

break;

//------------------------------------
case 'set-as-home-page':

$response = Menu::setAsHomePage($request);

break;
//------------------------------------
}

return response()->json($response);

}
//----------------------------------------------------------
public function getContentList(Request $request)
{
Expand Down
55 changes: 8 additions & 47 deletions Models/Menu.php
Original file line number Diff line number Diff line change
Expand Up @@ -117,11 +117,8 @@ public static function createItem($request)

$item = static::getItem($item->id);

$menu = new MenusController();

$response['success'] = true;
$response['data']['item'] =$item['data'];
$response['data']['assets'] = $menu->getAssets($request);
$response['messages'][] = 'Saved successfully.';

return $response;
Expand Down Expand Up @@ -323,57 +320,21 @@ public static function deleteList($request): array
//-------------------------------------------------
public static function listAction($request, $type): array
{

$inputs = $request->all();

if(isset($inputs['items']))
{
$items_id = collect($inputs['items'])
->pluck('id')
->toArray();
switch ($type) {
case 'delete':
if(isset($inputs['inputs']) && count($inputs['inputs']) > 0) {

$items = self::whereIn('id', $items_id)
->withTrashed();
}
foreach ($inputs['inputs'] as $id){
MenuItem::where('vh_menu_id', $id)->withTrashed()->forceDelete();

self::where('id',$id)->withTrashed()->forceDelete();
}

switch ($type) {
case 'deactivate':
if($items->count() > 0) {
$items->update(['is_active' => null]);
}
break;
case 'activate':
if($items->count() > 0) {
$items->update(['is_active' => 1]);
}
break;
case 'trash':
if(isset($items_id) && count($items_id) > 0) {
self::whereIn('id', $items_id)->delete();
}
break;
case 'restore':
if(isset($items_id) && count($items_id) > 0) {
self::whereIn('id', $items_id)->restore();
}
break;
case 'delete':
if(isset($items_id) && count($items_id) > 0) {
self::whereIn('id', $items_id)->forceDelete();
}
break;
case 'activate-all':
self::query()->update(['is_active' => 1]);
break;
case 'deactivate-all':
self::query()->update(['is_active' => null]);
break;
case 'trash-all':
self::query()->delete();
break;
case 'restore-all':
self::withTrashed()->restore();
break;
case 'delete-all':
self::withTrashed()->forceDelete();
break;
Expand Down
4,450 changes: 931 additions & 3,519 deletions Resources/assets/build/index.js

Large diffs are not rendered by default.

7 changes: 5 additions & 2 deletions Vue/layouts/Default.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@ onMounted(async () => {


<template>
<div class="pb-3 pt-2"><Topnav/></div>
<RouterView />
<div>
<div class="pb-3 pt-2"><Topnav/></div>
<RouterView />

</div>

</template>
116 changes: 0 additions & 116 deletions Vue/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,99 +8,41 @@ import PrimeVue from "primevue/config";
import AutoComplete from 'primevue/autocomplete';
import Accordion from 'primevue/accordion';
import AccordionTab from 'primevue/accordiontab';
import Avatar from 'primevue/avatar';
import AvatarGroup from 'primevue/avatargroup';
import Badge from 'primevue/badge';
import BadgeDirective from "primevue/badgedirective";
import BlockUI from 'primevue/blockui';
import Button from 'primevue/button';
import Breadcrumb from 'primevue/breadcrumb';
import Calendar from 'primevue/calendar';
import Card from 'primevue/card';
import CascadeSelect from 'primevue/cascadeselect';
import Carousel from 'primevue/carousel';
import Checkbox from 'primevue/checkbox';
import Chip from 'primevue/chip';
import Chips from 'primevue/chips';
import ColorPicker from 'primevue/colorpicker';
import Column from 'primevue/column';
//import ColumnGroup from 'primevue/columngroup';
import ConfirmDialog from 'primevue/confirmdialog';
import ConfirmPopup from 'primevue/confirmpopup';
import ConfirmationService from 'primevue/confirmationservice';
import ContextMenu from 'primevue/contextmenu';
import DataTable from 'primevue/datatable';
import DataView from 'primevue/dataview';
import DataViewLayoutOptions from 'primevue/dataviewlayoutoptions';
import DeferredContent from 'primevue/deferredcontent';
import Dialog from 'primevue/dialog';
import DialogService from 'primevue/dialogservice'
import Divider from 'primevue/divider';
import Dock from 'primevue/dock';
import Dropdown from 'primevue/dropdown';
import DynamicDialog from 'primevue/dynamicdialog';
import Editor from 'primevue/editor';
import Fieldset from 'primevue/fieldset';
import FileUpload from 'primevue/fileupload';
import Galleria from 'primevue/galleria';
import Image from 'primevue/image';
import InlineMessage from 'primevue/inlinemessage';
import Inplace from 'primevue/inplace';
import InputSwitch from 'primevue/inputswitch';
import InputText from 'primevue/inputtext';
import InputMask from 'primevue/inputmask';
import InputNumber from 'primevue/inputnumber';
import Knob from 'primevue/knob';
import Listbox from 'primevue/listbox';
import MegaMenu from 'primevue/megamenu';
import Menu from 'primevue/menu';
import Menubar from 'primevue/menubar';
import Message from 'primevue/message';
import MultiSelect from 'primevue/multiselect';
import OrderList from 'primevue/orderlist';
import OrganizationChart from 'primevue/organizationchart';
import OverlayPanel from 'primevue/overlaypanel';
import Paginator from 'primevue/paginator';
import Panel from 'primevue/panel';
import PanelMenu from 'primevue/panelmenu';
import Password from 'primevue/password';
import PickList from 'primevue/picklist';
import ProgressBar from 'primevue/progressbar';
import ProgressSpinner from 'primevue/progressspinner';
import Rating from 'primevue/rating';
import RadioButton from 'primevue/radiobutton';
import Ripple from 'primevue/ripple';
import Row from 'primevue/row';
import SelectButton from 'primevue/selectbutton';
import ScrollPanel from 'primevue/scrollpanel';
import ScrollTop from 'primevue/scrolltop';
import Skeleton from 'primevue/skeleton';
import Slider from 'primevue/slider';
import Sidebar from 'primevue/sidebar';
import SpeedDial from 'primevue/speeddial';
import SplitButton from 'primevue/splitbutton';
import Splitter from 'primevue/splitter';
import SplitterPanel from 'primevue/splitterpanel';
import Steps from 'primevue/steps';
import StyleClass from 'primevue/styleclass';
import TabMenu from 'primevue/tabmenu';
import TieredMenu from 'primevue/tieredmenu';
import Textarea from 'primevue/textarea';
import Toast from 'primevue/toast';
import ToastService from 'primevue/toastservice';
import Toolbar from 'primevue/toolbar';
import TabView from 'primevue/tabview';
import TabPanel from 'primevue/tabpanel';
import Tag from 'primevue/tag';
import Terminal from 'primevue/terminal';
import Timeline from 'primevue/timeline';
import ToggleButton from 'primevue/togglebutton';
import Tooltip from 'primevue/tooltip';
import Tree from 'primevue/tree';
import TreeSelect from 'primevue/treeselect';
import TreeTable from 'primevue/treetable';
import TriStateCheckbox from 'primevue/tristatecheckbox';
import VirtualScroller from 'primevue/virtualscroller';
//-------------/PrimeVue Imports


Expand Down Expand Up @@ -135,92 +77,34 @@ app.directive('styleclass', StyleClass);
app.component('Accordion', Accordion);
app.component('AccordionTab', AccordionTab);
app.component('AutoComplete', AutoComplete);
app.component('Avatar', Avatar);
app.component('AvatarGroup', AvatarGroup);
app.component('Badge', Badge);
app.component('BlockUI', BlockUI);
app.component('Breadcrumb', Breadcrumb);
app.component('Button', Button);
app.component('Calendar', Calendar);
app.component('Card', Card);
app.component('Carousel', Carousel);
app.component('CascadeSelect', CascadeSelect);
app.component('Checkbox', Checkbox);
app.component('Chip', Chip);
app.component('Chips', Chips);
app.component('ColorPicker', ColorPicker);
app.component('Column', Column);
//app.component('ColumnGroup', ColumnGroup);
app.component('ConfirmDialog', ConfirmDialog);
app.component('ConfirmPopup', ConfirmPopup);
app.component('ContextMenu', ContextMenu);
app.component('DataTable', DataTable);
app.component('DataView', DataView);
app.component('DataViewLayoutOptions', DataViewLayoutOptions);
app.component('DeferredContent', DeferredContent);
app.component('Dialog', Dialog);
app.component('Divider', Divider);
app.component('Dock', Dock);
app.component('Dropdown', Dropdown);
app.component('DynamicDialog', DynamicDialog);
app.component('Editor', Editor);
app.component('Fieldset', Fieldset);
app.component('FileUpload', FileUpload);
app.component('Galleria', Galleria);
app.component('Image', Image);
app.component('InlineMessage', InlineMessage);
app.component('Inplace', Inplace);
app.component('InputMask', InputMask);
app.component('InputNumber', InputNumber);
app.component('InputSwitch', InputSwitch);
app.component('InputText', InputText);
app.component('Knob', Knob);
app.component('Listbox', Listbox);
app.component('MegaMenu', MegaMenu);
app.component('Menu', Menu);
app.component('Menubar', Menubar);
app.component('Message', Message);
app.component('MultiSelect', MultiSelect);
app.component('OrderList', OrderList);
app.component('OrganizationChart', OrganizationChart);
app.component('OverlayPanel', OverlayPanel);
app.component('Paginator', Paginator);
app.component('Panel', Panel);
app.component('PanelMenu', PanelMenu);
app.component('Password', Password);
app.component('PickList', PickList);
app.component('ProgressBar', ProgressBar);
app.component('ProgressSpinner', ProgressSpinner);
app.component('RadioButton', RadioButton);
app.component('Rating', Rating);
app.component('Row', Row);
app.component('SelectButton', SelectButton);
app.component('ScrollPanel', ScrollPanel);
app.component('ScrollTop', ScrollTop);
app.component('Slider', Slider);
app.component('Sidebar', Sidebar);
app.component('Skeleton', Skeleton);
app.component('SpeedDial', SpeedDial);
app.component('SplitButton', SplitButton);
app.component('Splitter', Splitter);
app.component('SplitterPanel', SplitterPanel);
app.component('Steps', Steps);
app.component('TabMenu', TabMenu);
app.component('TabView', TabView);
app.component('TabPanel', TabPanel);
app.component('Tag', Tag);
app.component('Textarea', Textarea);
app.component('Terminal', Terminal);
app.component('TieredMenu', TieredMenu);
app.component('Timeline', Timeline);
app.component('Toast', Toast);
app.component('Toolbar', Toolbar);
app.component('ToggleButton', ToggleButton);
app.component('Tree', Tree);
app.component('TreeSelect', TreeSelect);
app.component('TreeTable', TreeTable);
app.component('TriStateCheckbox', TriStateCheckbox);
app.component('VirtualScroller', VirtualScroller);
//-------------/PrimeVue Use


Expand Down
4 changes: 2 additions & 2 deletions Vue/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@
},
"dependencies": {
"axios": "^0.27.2",
"javascript-time-ago": "^2.5.9",
"jodit": "^3.24.5",
"jodit-vue": "^3.0.0",
"jodit-vue3": "^1.0.5",
"json-editor-vue": "^0.11.0",
"moment-timezone": "^0.5.34",
"pinia": "^2.0.23",
"primevue": "3.35.0",
"primevue": "3.46.0",
"qs": "^6.11.0",
"quill": "^1.3.7",
"uuid": "^9.0.1",
Expand Down
Loading

0 comments on commit aac6c58

Please sign in to comment.