Skip to content

Commit

Permalink
Added: setup steps notification files
Browse files Browse the repository at this point in the history
  • Loading branch information
we-vikram-wri231 committed Apr 6, 2024
1 parent 47f3d2e commit 0f07237
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,17 @@ class BackendController extends Controller

$data=[];

$steps = array();

// $steps[] = $this->isSetupComplete();

$data['module'] = [
'name' => config('<%= module_name_lower %>.name'),
'version' => config('settings.global.<%= module_name_lower %>_version')??config('<%= module_name_lower %>.version'),
'is_dev' => config('<%= module_name_lower %>.is_dev'),
'setup' => [
'steps' => $steps
]
];

$v_version = config('vaahcms.version');
Expand Down Expand Up @@ -114,4 +121,15 @@ class BackendController extends Controller

}


//-------------------------------------------------
public function isSetupComplete(){

$response['is_complete'] = false;
$response['message'] = "Your module is successfully setup.";

return $response;

}

}
25 changes: 25 additions & 0 deletions skeletons/vaahcms/module-vue3/Vue/components/TopNotification.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<template>
<div v-if="root && root.assets" style="padding-top: 1px;">

<template v-if=" root.assets.module
&& root.assets.module.setup
&& root.assets.module.setup.steps"
v-for="(step,s_index) in root.assets.module.setup.steps"
:key="s_index" >
<Message v-if="!step.is_complete" severity="error">
<span v-html="'Step '+(s_index+1)+': '+step.message">

</span>
</Message>
</template>

</div>
</template>

<script setup>
import {useRootStore} from '../stores/root.js'
const root = useRootStore();
</script>
2 changes: 2 additions & 0 deletions skeletons/vaahcms/module-vue3/Vue/layouts/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import {vaah} from '../vaahvue/pinia/vaah.js'
import {useRootStore} from '../stores/root.js'
import Footer from '../components/Footer.vue'
import TopNotification from '../components/TopNotification.vue'
import { useToast } from "primevue/usetoast";
import { useConfirm } from "primevue/useconfirm";
Expand All @@ -17,6 +18,7 @@ useVaah.setConfirm(confirm);


<template>
<TopNotification/>
<div style="padding-top: 11px;">

<ProgressBar style="z-index: 10000000; position: fixed; top: 1px; width: 100%; left: 0px; height: 2px;"
Expand Down

0 comments on commit 0f07237

Please sign in to comment.