diff --git a/docs/usage-guide/sms.md b/docs/usage-guide/sms.md index c08572301..cdb00fd96 100644 --- a/docs/usage-guide/sms.md +++ b/docs/usage-guide/sms.md @@ -50,21 +50,7 @@ notifications and communications. ![Short code from Africanstalking](images/africanstalking-sms-shortcode.png) -### Step 4: Register SMS Delivery Callback URL - -1. In your AfricasTalking dashboard, go to **SMS** → **Callback URLs** -2. Set up the delivery callback URL to point to your MPM instance: Copy the url - from the plugin overview page - - ```bash - https://your-mpm-domain.com/api/africas-talking/callback/1/delivery-reports - ``` - -3. Enable delivery reports to track SMS delivery status - -![Register callback URL for sms delivery](images/africanstalking-sms-delivery-callback.png) - -### Step 5: Enable AfricasTalking Plugin in MPM +### Step 4: Enable AfricasTalking Plugin in MPM 1. Log into your MPM admin panel 2. Navigate to **Plugins** section @@ -74,7 +60,7 @@ notifications and communications. ![Plugin settings page](images/africanstalking-enable-plugin.png) -### Step 6: Configure Plugin Credentials +### Step 5: Configure Plugin Credentials 1. After enabling the plugin, go to **Plugins** → **AfricasTalking** → **Settings** 2. Enter the following credentials: @@ -86,6 +72,20 @@ notifications and communications. ![Plugin Overview page](images/africanstalking-cred-overview-page.png) +### Step 6: Register SMS Delivery Callback URL + +1. In your AfricasTalking dashboard, go to **SMS** → **Callback URLs** +2. Set up the delivery callback URL to point to your MPM instance: Copy the url + from the plugin overview page + + ```bash + https://your-mpm-domain.com/api/africas-talking/callback/1/delivery-reports + ``` + +3. Enable delivery reports to track SMS delivery status + +![Register callback URL for sms delivery](images/africanstalking-sms-delivery-callback.png) + ### Step 7: Test SMS Functionality 1. Navigate to **Customers** in your MPM dashboard diff --git a/src/frontend/src/ExportedRoutes.js b/src/frontend/src/ExportedRoutes.js index 36376ba29..da39e931c 100644 --- a/src/frontend/src/ExportedRoutes.js +++ b/src/frontend/src/ExportedRoutes.js @@ -343,48 +343,6 @@ export const exportedRoutes = [ }, ], }, - { - path: "dashboards/mini-grid", - component: ChildRouteWrapper, - meta: { - sidebar: { - enabled: true, - name: "Mini-Grid", - }, - }, - children: [ - { - path: "", - component: MiniGridOverviewPage, - meta: { - layout: "default", - breadcrumb: { - level: "base", - name: "Mini-Grids", - link: "/dashboards/mini-grid", - }, - sidebar: { - enabled: true, - name: "Mini-Grid", - }, - }, - }, - { - path: ":id", - component: MiniGridDetailPage, - meta: { - layout: "default", - breadcrumb: { - level: "detail", - name: "Mini-Grid", - link: "/dashboards/mini-grid", - target: "id", - }, - }, - }, - ], - }, - { path: "dashboards/agent-performance", component: ChildRouteWrapper, @@ -822,6 +780,61 @@ export const exportedRoutes = [ }, ], }, + { + path: "", + component: ChildRouteWrapper, + meta: { + sidebar: { + enabled: true, + name: "Mini-Grid", + icon: "bolt", + }, + }, + children: [ + { + path: "mini-grids", + component: ChildRouteWrapper, + meta: { + layout: "default", + sidebar: { + enabled: true, + name: "Overview", + }, + }, + children: [ + { + path: "", + component: MiniGridOverviewPage, + meta: { + layout: "default", + breadcrumb: { + level: "base", + name: "Mini-Grids", + link: "/mini-grids", + }, + sidebar: { + enabled: true, + name: "Overview", + }, + }, + }, + { + path: ":id", + component: MiniGridDetailPage, + meta: { + layout: "default", + breadcrumb: { + level: "base", + name: "Mini-Grid", + link: "/mini-grids", + target: "id", + }, + }, + }, + ], + }, + ], + }, { // FIXME: Should this be part of the Customer route? path: "/sold-appliance-detail", diff --git a/src/frontend/src/assets/locales/en.json b/src/frontend/src/assets/locales/en.json index 521b29156..93796d411 100644 --- a/src/frontend/src/assets/locales/en.json +++ b/src/frontend/src/assets/locales/en.json @@ -116,6 +116,8 @@ "agentCommissionUpdated": "Agent Commission Updated!", "agentDashboard": "Agent Overview", "agentList": "Agent List", + "miniGridDashboard": "Mini-Grid Overview", + "miniGridList": "Mini-Grid List", "agentPerformanceDashboard": "Agent Performance Dashboard", "agentTicket": "Agent Ticket | Agent Tickets", "agentTransaction": "Agent Transaction | Agent Transactions", @@ -369,6 +371,9 @@ "toDate": "To Date", "topPerformingAgents": "Top Performing Agents", "totalAgents": "Total Agents", + "totalClusters": "Total Clusters", + "totalCities": "Total Cities", + "totalMiniGrids": "Total Mini-Grids", "totalCommission": "Total Commission", "totalCost": "Total Cost", "totalCustomers": "Total Customers", diff --git a/src/frontend/src/modules/Dashboard/MiniGridDashboard.vue b/src/frontend/src/modules/Dashboard/MiniGridDashboard.vue new file mode 100644 index 000000000..eadc93cb7 --- /dev/null +++ b/src/frontend/src/modules/Dashboard/MiniGridDashboard.vue @@ -0,0 +1,246 @@ + + + + + + diff --git a/src/frontend/src/modules/Map/ClusterMap.vue b/src/frontend/src/modules/Map/ClusterMap.vue index febad71e3..70f99cc4a 100644 --- a/src/frontend/src/modules/Map/ClusterMap.vue +++ b/src/frontend/src/modules/Map/ClusterMap.vue @@ -205,7 +205,7 @@ export default { const parent = this miniGridMarker.on("click", function () { - parent.routeToDetail("/dashboards/mini-grid", markingInfo.id) + parent.routeToDetail("/mini-grids", markingInfo.id) }) miniGridMarker.addTo(this.markersLayer) diff --git a/src/frontend/src/modules/Map/DashboardMap.vue b/src/frontend/src/modules/Map/DashboardMap.vue index 67070961c..65a725b1a 100644 --- a/src/frontend/src/modules/Map/DashboardMap.vue +++ b/src/frontend/src/modules/Map/DashboardMap.vue @@ -125,7 +125,7 @@ export default { const parent = this miniGridMarker.on("click", function () { - parent.routeToDetail("/dashboards/mini-grid", markingInfo.id) + parent.routeToDetail("/mini-grids", markingInfo.id) }) miniGridMarker.addTo(this.markersLayer) diff --git a/src/frontend/src/modules/MiniGrid/Dashboard.vue b/src/frontend/src/modules/MiniGrid/Dashboard.vue index 69d1d41e8..70a6eabbe 100644 --- a/src/frontend/src/modules/MiniGrid/Dashboard.vue +++ b/src/frontend/src/modules/MiniGrid/Dashboard.vue @@ -418,7 +418,7 @@ export default { } }, setMiniGrid(miniGridId) { - this.$router.replace("/dashboards/mini-grid/" + miniGridId) + this.$router.replace("/mini-grids/" + miniGridId) }, togglePeriod() { this.period = { diff --git a/src/frontend/src/modules/Village/AddVillage.vue b/src/frontend/src/modules/Village/AddVillage.vue index a04f53a0c..c09a1ce3c 100644 --- a/src/frontend/src/modules/Village/AddVillage.vue +++ b/src/frontend/src/modules/Village/AddVillage.vue @@ -300,7 +300,7 @@ export default { this.alertNotify("success", this.$tc("phrases.newVillageNotify", 1)) this.loading = false await this.$router.replace( - `/dashboards/mini-grid/${this.selectedMiniGridId}`, + `/mini-grids/${this.selectedMiniGridId}`, ) } catch (e) { this.loading = false diff --git a/src/frontend/src/pages/Dashboard/MiniGrid/index.vue b/src/frontend/src/pages/Dashboard/MiniGrid/index.vue index bbecb1cf0..4c8b6bf64 100644 --- a/src/frontend/src/pages/Dashboard/MiniGrid/index.vue +++ b/src/frontend/src/pages/Dashboard/MiniGrid/index.vue @@ -1,36 +1,14 @@ - -