vue-nxp-notifications-ui-plugin

0.4.98 • Public • Published

NXP Notification UI Plugin

  • Nxp-Notifications-Ui-Plugin is a vueJs plugin for managing institution Notification settings.

Requirements

  • Nxp UI Plugin.
npm i vue-nxp-plugin

Configuration

  • add the following line to your hosts file to trust notification Certificate.
3.22.52.234 notifications-transvers-integration.app.dev.s2m.ma

Installation

  • via npm, latest version.
npm i vue-nxp-notifications-ui-plugin
  • via package.json with specific version (integration Deployments).
"vue-nxp-notifications-ui-plugin" : "0.5.26",

NB :

Add following code to your package.json in order to download the plugin from nexus repository.
"publishConfig": {
"registry": "https://artifact-repos.dev.s2m.ma/repository/npm-hosted/",
},
  • via package.json with specific version (local Developments).
"vue-nxp-notifications-ui-plugin" : "0.4.98",

Settings

  • After Installing the Plugin, Use it globally in your main.js file.
import NotificationConfigurationPlugin from 'vue-nxp-notifications-ui-plugin/dist/nxp-notifications-ui-plugin.common';
import 'vue-nxp-notifications-ui-plugin/dist/nxp-notifications-ui-plugin.css';

Vue.use(NotificationConfigurationPlugin,{ 'notificationUrl': process.env.VUE_APP_ITSP_NOTIFICATION_URL, 'parametersInstitutionExistenceUrl': process.env.VUE_APP_ITSP_PARAMETERS_MICROSERVICE_CHECK_INSTITUTION_EXISTENCE, 'parametersConfigurationUsageUrl': process.env.VUE_APP_ITSP_PARAMETERS_MICROSERVICE_CHECK_CONFIGURATION_USAGE});

- With :

  • VUE_APP_ITSP_NOTIFICATION_URL is an environment variable in .env and .env.production files which is the notification Microservice url.

  • VUE_APP_ITSP_PARAMETERS_MICROSERVICE_CHECK_INSTITUTION_EXISTENCE is an environment variable in .env and .env.production files which is the api url for check-institution-existence (the api returns true if the institution exists by institution Id before creating or updating the configuraiton).

  • VUE_APP_ITSP_PARAMETERS_MICROSERVICE_CHECK_CONFIGURATION_USAGE is an environment variable in .env and .env.production files which is the api url for check-configuration-usage (the api returns true if the configuration is used in an entity before delete action).

So in your Institution MicroService you have to implement two Apis, example :

@PostMapping("/exists")
public ResponseEntity<Boolean> existsByInsId(@RequestBody String operationData) {
    return new ResponseEntity<>(this.institutionService.existsByInsId(operationData), HttpStatus.OK);
}

@PostMapping("check-usage")
public ResponseEntity<Boolean> existsByNotificationConfigurationName(@RequestBody String operationData) {
    return new ResponseEntity<>(this.binService.existsByNotificationConfigurationName(operationData),
            HttpStatus.OK);
}
  • finally, in your i18n file plug notification plugin i18n variable:
setTimeout(()=>{
    your_messages.en = {...Vue.prototype.$notification_messages.en ,...your_messages.en}
    your_messages.fr = {...Vue.prototype.$notification_messages.fr ,...your_messages.fr}
},0)
  • with Vue.prototype.$notification_messages is a global variable coming from notifications plugin.

Props

  • institution : Object.

Events

  • close : when the user clicks on Close Button.

Usage

  • You can simply import The base Component as follows :
<template>
  <div>
    <nxp-notification-configuration :institution="institution"/>
  </div>
</template>

<script>
export default {
  name :'test',
  data(){
    return {
      institution : {
        institutionId :'000001',
        institutionName : 'BMCE Bank'
      }
    }
  }
}
</script>

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
0.4.980latest

Version History

VersionDownloads (Last 7 Days)Published
0.4.980
0.4.970
0.4.961
0.4.950
0.4.940
0.4.930
0.4.921
0.4.910
0.4.900
0.4.890
0.4.881
0.4.870
0.4.860
0.4.850
0.4.840
0.4.830
0.4.820
0.4.810
0.4.800
0.4.790
0.4.780
0.4.770
0.4.760
0.4.750
0.4.1510
0.4.1500
0.4.740
0.4.730
0.4.720
0.4.710
0.4.700
0.4.690
0.4.680
0.4.670
0.4.660
0.4.650
0.4.640
0.4.630
0.4.620
0.4.610
0.4.600
0.4.590
0.4.580
0.4.570
0.4.560
0.4.550
0.4.540
0.4.531
0.4.520
0.4.510
0.4.500
0.4.480
0.4.471
0.4.460
0.4.450
0.4.441
0.4.430
0.4.420
0.4.410
0.4.401
0.4.390
0.4.380
0.4.370
0.4.360
0.4.350
0.4.340
0.4.330
0.4.320
0.4.311
0.4.300
0.4.290
0.4.280
0.4.271
0.4.260
0.4.250
0.4.241
0.4.230
0.4.220
0.4.210
0.4.200
0.4.191
0.4.180
0.4.170
0.4.160
0.4.150
0.4.140
0.4.130
0.4.121
0.4.110
0.4.101
0.4.90
0.4.80
0.4.70
0.4.61
0.4.50
0.4.40
0.4.30
0.4.20
0.4.10
0.4.00
0.3.50
0.3.40
0.3.30
0.3.20
0.3.10
0.3.00
0.1.60
0.1.50
0.1.40
0.1.31
0.1.20
0.1.10
0.1.00
0.0.930
0.0.920
0.0.910
0.0.900
0.0.800
0.0.780
0.0.770
0.0.761
0.0.750
0.0.740
0.0.730
0.0.720
0.0.710
0.0.700
0.0.560
0.0.550
0.0.540
0.0.530
0.0.520
0.0.510
0.0.500
0.0.491
0.0.480
0.0.471
0.0.461
0.0.450
0.0.440
0.0.430
0.0.420
0.0.411
0.0.400
0.0.390
0.0.380
0.0.370
0.0.360
0.0.350
0.0.340
0.0.330
0.0.320
0.0.310
0.0.300
0.0.291
0.0.280
0.0.270
0.0.260
0.0.250
0.0.240
0.0.230
0.0.220
0.0.210
0.0.200
0.0.110
0.0.100
0.0.90
0.0.80
0.0.70
0.0.60
0.0.50
0.0.40
0.0.30
0.0.20
0.0.10

Package Sidebar

Install

npm i vue-nxp-notifications-ui-plugin

Weekly Downloads

21

Version

0.4.98

License

none

Unpacked Size

10.4 MB

Total Files

10

Last publish

Collaborators

  • aymen_sadak
  • boukhta_ali
  • reda-hero