Skip to content

cepdnaclk/itportal-vuepack

 
 

Repository files navigation

Intelligent Training Portal - FrontEnd

This is the frontend for Intelligent Training Portal (ITPORTAL)
You'll need the backend implementation for ITPORTAL for complete functionality.

Get the ITPORTAL backend implementation using express from github.com/imadx/itportal-backend-express.

Screenshots

Home page Home page

Sign-in page Sign-in  page

Installation

To start:

$ npm install

To develop:

$ npm run dev

To build for production:

$ npm run build

To lint you code:

$ npm run lint

Generated by VuePack.

available REST services (work in progress..)

The following controller endpoints can be used within the front end components to query data from the resource server.

Refer to express-restify-mongoose for available options.

Some methods accept a callback function to called in the event of success.

Vue.rest.getRestUrl(model, options)

Vue.rest.getPhotoUploadUrl(model)

Vue.rest.getData(model, options, cb)

The following code snippet can be used to query data from organization collection with only the name field selected.

Vue.rest.getData('organization', '?select=name', function(data){
	console.log(data);
})

Vue.rest.insertData(data, model, options, cb)

Vue.rest.updateData(data, model, options, cb)

Vue.rest.putImageUpload(data, model, cb)

for custom URL calls

For custom rest services, axios object is available through the Vue object within components

GET

Vue.axios.get(
    _url
).then(res => {
    let _data = (res.data);
    console.log(data);
}).catch(function(err) {
    console.log(err);
});

POST

Vue.axios.get(
	_url, data
).then(res => {
    let _data = (res.data);
    console.log(data);
}).catch(function(err) {
    console.log(err);
});

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 40.3%
  • CSS 40.0%
  • Vue 19.3%
  • Other 0.4%