├── .meteor
├── .finished-upgraders
├── .gitignore
├── .id
├── packages
├── platforms
├── release
└── versions
├── README.md
├── client
├── main.coffee
├── main.jade
├── stylesheets
│ └── app.styl
└── templates
│ ├── aConfig
│ └── autoform.coffee
│ ├── application
│ ├── assets
│ │ ├── assets
│ │ │ ├── createAsset.coffee
│ │ │ ├── createAsset.jade
│ │ │ ├── createLocation.coffee
│ │ │ ├── createLocation.jade
│ │ │ ├── editAsset.coffee
│ │ │ ├── editAsset.jade
│ │ │ ├── editLocation.coffee
│ │ │ ├── editLocation.jade
│ │ │ ├── viewAsset.coffee
│ │ │ ├── viewAsset.jade
│ │ │ ├── viewLocation.coffee
│ │ │ ├── viewLocation.jade
│ │ │ ├── viewLocations.coffee
│ │ │ └── viewLocations.jade
│ │ ├── classifications
│ │ │ ├── createAssetClass.coffee
│ │ │ ├── createAssetClass.jade
│ │ │ ├── deleteAssetClass.coffee
│ │ │ ├── deleteAssetClass.jade
│ │ │ ├── editAssetClass.coffee
│ │ │ ├── editAssetClass.jade
│ │ │ ├── viewAssetClass.coffee
│ │ │ ├── viewAssetClass.jade
│ │ │ ├── viewAssetClasses.coffee
│ │ │ └── viewAssetClasses.jade
│ │ └── meters
│ │ │ ├── createMeter.coffee
│ │ │ ├── createMeter.jade
│ │ │ ├── viewMeters.coffee
│ │ │ └── viewMeters.jade
│ ├── custom
│ │ ├── aConfig
│ │ │ └── index.coffee
│ │ ├── assets
│ │ │ └── assets.jade
│ │ └── readme.txt
│ ├── help
│ │ ├── help.coffee
│ │ └── help.jade
│ ├── inventory
│ │ ├── equipment
│ │ │ ├── createEquipment.coffee
│ │ │ ├── createEquipment.jade
│ │ │ ├── createEquipmentClass.coffee
│ │ │ ├── createEquipmentClass.jade
│ │ │ ├── deleteEquipmentClass.coffee
│ │ │ ├── deleteEquipmentClass.jade
│ │ │ ├── editEquipment.coffee
│ │ │ ├── editEquipment.jade
│ │ │ ├── editEquipmentClass.coffee
│ │ │ ├── editEquipmentClass.jade
│ │ │ ├── viewEquipment.coffee
│ │ │ ├── viewEquipment.jade
│ │ │ ├── viewEquipmentClass.coffee
│ │ │ ├── viewEquipmentClass.jade
│ │ │ ├── viewEquipmentClasses.coffee
│ │ │ ├── viewEquipmentClasses.jade
│ │ │ ├── viewEquipments.coffee
│ │ │ └── viewEquipments.jade
│ │ ├── inventory.coffee
│ │ ├── inventory.jade
│ │ ├── item
│ │ │ ├── createItem.coffee
│ │ │ ├── createItem.jade
│ │ │ ├── createItemClass.coffee
│ │ │ ├── createItemClass.jade
│ │ │ ├── deleteItemClass.coffee
│ │ │ ├── deleteItemClass.jade
│ │ │ ├── editItem.coffee
│ │ │ ├── editItem.jade
│ │ │ ├── editItemClass.coffee
│ │ │ ├── editItemClass.jade
│ │ │ ├── viewItem.coffee
│ │ │ ├── viewItem.jade
│ │ │ ├── viewItemClass.coffee
│ │ │ ├── viewItemClass.jade
│ │ │ ├── viewItemClasses.coffee
│ │ │ ├── viewItemClasses.jade
│ │ │ ├── viewItems.coffee
│ │ │ └── viewItems.jade
│ │ └── locations
│ │ │ ├── createInvLoc.coffee
│ │ │ ├── createInvLoc.jade
│ │ │ ├── createInvLocClass.coffee
│ │ │ ├── createInvLocClass.jade
│ │ │ ├── deleteInvLocClass.coffee
│ │ │ ├── deleteInvLocClass.jade
│ │ │ ├── editInvLoc.coffee
│ │ │ ├── editInvLoc.jade
│ │ │ ├── editInvLocClass.coffee
│ │ │ ├── editInvLocClass.jade
│ │ │ ├── stockLevels.coffee
│ │ │ ├── stockLevels.jade
│ │ │ ├── viewInvLoc.coffee
│ │ │ ├── viewInvLoc.jade
│ │ │ ├── viewInvLocClass.coffee
│ │ │ ├── viewInvLocClass.jade
│ │ │ ├── viewInvLocClasses.coffee
│ │ │ ├── viewInvLocClasses.jade
│ │ │ ├── viewInvLocs.coffee
│ │ │ └── viewInvLocs.jade
│ ├── pm
│ │ ├── activatePM.coffee
│ │ ├── activatePm.jade
│ │ ├── assetGroups.coffee
│ │ ├── assetGroups.jade
│ │ ├── createAssetGroup.coffee
│ │ ├── createAssetGroup.jade
│ │ ├── createPM.coffee
│ │ ├── createPM.jade
│ │ ├── editAssetGroup.coffee
│ │ ├── editAssetGroup.jade
│ │ ├── editPM.coffee
│ │ ├── editPM.jade
│ │ ├── pm.coffee
│ │ ├── pm.jade
│ │ ├── viewAssetGroup.coffee
│ │ ├── viewAssetGroup.jade
│ │ ├── viewPM.coffee
│ │ ├── viewPM.jade
│ │ ├── viewPMs.coffee
│ │ └── viewPMs.jade
│ ├── procurement
│ │ ├── companies
│ │ │ ├── createCompany.coffee
│ │ │ ├── createCompany.jade
│ │ │ ├── createCompanyClass.coffee
│ │ │ ├── createCompanyClass.jade
│ │ │ ├── deleteCompany.coffee
│ │ │ ├── deleteCompany.jade
│ │ │ ├── deleteCompanyClass.coffee
│ │ │ ├── deleteCompanyClass.jade
│ │ │ ├── editCompany.coffee
│ │ │ ├── editCompany.jade
│ │ │ ├── editCompanyClass.coffee
│ │ │ ├── editCompanyClass.jade
│ │ │ ├── viewCompanies.coffee
│ │ │ ├── viewCompanies.jade
│ │ │ ├── viewCompany.coffee
│ │ │ ├── viewCompany.jade
│ │ │ ├── viewCompanyClass.coffee
│ │ │ ├── viewCompanyClass.jade
│ │ │ ├── viewCompanyClasses.coffee
│ │ │ └── viewCompanyClasses.jade
│ │ ├── procurement.coffee
│ │ ├── procurement.jade
│ │ └── purchasing
│ │ │ ├── createPurchase.coffee
│ │ │ ├── createPurchase.jade
│ │ │ ├── editPurchase.coffee
│ │ │ ├── editPurchase.jade
│ │ │ ├── receiveGoods.coffee
│ │ │ ├── receiveGoods.jade
│ │ │ ├── viewPurchase.coffee
│ │ │ ├── viewPurchase.jade
│ │ │ ├── viewPurchases.coffee
│ │ │ └── viewPurchases.jade
│ ├── reports
│ │ ├── reports.coffee
│ │ └── reports.jade
│ ├── resources
│ │ ├── credentials.coffee
│ │ ├── credentials.jade
│ │ ├── editPeople.coffee
│ │ ├── editPeople.jade
│ │ ├── viewPeople.coffee
│ │ └── viewPeople.jade
│ └── work
│ │ ├── createSafetyTemplate.coffee
│ │ ├── createSafetyTemplate.jade
│ │ ├── createWork.coffee
│ │ ├── createWork.jade
│ │ ├── createWorkTemplate.coffee
│ │ ├── createWorkTemplate.jade
│ │ ├── editSafetyTemplate.coffee
│ │ ├── editSafetyTemplate.jade
│ │ ├── editWorkTemplate.coffee
│ │ ├── editWorkTemplate.jade
│ │ ├── editWorkorder.coffee
│ │ ├── editWorkorder.jade
│ │ ├── myWorkorder.coffee
│ │ ├── myWorkorder.jade
│ │ ├── myWorkorders.coffee
│ │ ├── myWorkorders.jade
│ │ ├── query.coffee
│ │ ├── query.jade
│ │ ├── safetyTemplates.coffee
│ │ ├── safetyTemplates.jade
│ │ ├── viewSafetyTemplate.coffee
│ │ ├── viewSafetyTemplate.jade
│ │ ├── viewWork.coffee
│ │ ├── viewWork.jade
│ │ ├── viewWorkTemplate.coffee
│ │ ├── viewWorkTemplate.jade
│ │ ├── viewWorkorder.coffee
│ │ ├── viewWorkorder.jade
│ │ ├── work.coffee
│ │ ├── work.jade
│ │ ├── workTemplates.coffee
│ │ └── workTemplates.jade
│ ├── includes
│ ├── access_denied.html
│ ├── loading.html
│ └── signin.html
│ └── layouts
│ ├── about.coffee
│ ├── about.jade
│ ├── classification
│ ├── createClassification.coffee
│ ├── createClassification.jade
│ ├── editClassification.coffee
│ ├── editClassification.jade
│ ├── viewClassification.coffee
│ ├── viewClassification.jade
│ ├── viewClassifications.coffee
│ └── viewClassifications.jade
│ ├── forms
│ ├── autoform.coffee
│ ├── autoform.jade
│ ├── forms.coffee
│ ├── forms.jade
│ ├── reactive-table.coffee
│ ├── reactive-table.jade
│ ├── treeview.coffee
│ └── treeview.jade
│ ├── layout.coffee
│ ├── layout.jade
│ ├── notFound.jade
│ ├── toast.coffee
│ ├── welcome.coffee
│ └── welcome.jade
├── lib
├── collections
│ ├── 0Global.coffee
│ ├── Collections.coffee
│ ├── schema0General.coffee
│ ├── schema1Locations.coffee
│ ├── schema2Resources.coffee
│ ├── schema3Work.coffee
│ ├── schema4PM.coffee
│ ├── schema5Inventory.coffee
│ └── schema6Procurement.coffee
├── config
│ ├── accounts_t9n.js
│ ├── at_config.js
│ └── configLists.coffee
├── custom
│ ├── inventoryLists.coffee
│ ├── locationsLists.coffee
│ ├── procurementLists.coffee
│ ├── readme.txt
│ ├── resourcesLists.coffee
│ └── workorderLists.coffee
├── functions
│ └── general.coffee
├── i18n
│ ├── en.i18n.json
│ └── i18n.xlsx
├── permissions.js
└── router
│ ├── aRouter.coffee
│ ├── assets.coffee
│ ├── inventory.coffee
│ ├── pm.coffee
│ ├── procurement.coffee
│ ├── resources.coffee
│ └── work.coffee
├── public
├── Birt-logo.png
├── Logo_D3.png
├── flowchart.png
├── front.jpg
└── laterText.html
├── server
├── 0Startup.coffee
├── methods
│ ├── general.coffee
│ ├── inventory.coffee
│ ├── locations.coffee
│ ├── pm.coffee
│ ├── procurement.coffee
│ ├── resources.coffee
│ └── work.coffee
└── publications.coffee
└── video.png
/.meteor/.finished-upgraders:
--------------------------------------------------------------------------------
1 | # This file contains information which helps Meteor properly upgrade your
2 | # app when you run 'meteor update'. You should check it into version control
3 | # with your project.
4 |
5 | notices-for-0.9.0
6 | notices-for-0.9.1
7 | 0.9.4-platform-file
8 | notices-for-facebook-graph-api-2
9 | 1.2.0-standard-minifiers-package
10 | 1.2.0-meteor-platform-split
11 | 1.2.0-cordova-changes
12 | 1.2.0-breaking-changes
13 |
--------------------------------------------------------------------------------
/.meteor/.gitignore:
--------------------------------------------------------------------------------
1 | local
2 |
--------------------------------------------------------------------------------
/.meteor/.id:
--------------------------------------------------------------------------------
1 | # This file contains a token that is unique to your project.
2 | # Check it into your repository along with the rest of this directory.
3 | # It can be used for purposes such as:
4 | # - ensuring you don't accidentally deploy one app on top of another
5 | # - providing package authors with aggregated statistics
6 |
7 |
8 | umj90hp14ty51r50pke
9 |
10 | 1wijmtu1rsh0jueu4540
11 |
12 |
--------------------------------------------------------------------------------
/.meteor/packages:
--------------------------------------------------------------------------------
1 | # Meteor packages used by this project, one per line.
2 | # Check this file (and the other files in this directory) into your repository.
3 | #
4 | # 'meteor add' and 'meteor remove' will edit this file for you,
5 | # but you can also edit it by hand.
6 |
7 | meteor-base # Packages every Meteor app needs to have
8 | mobile-experience # Packages for a great mobile UX
9 | mongo # The database Meteor supports right now
10 | blaze-html-templates # Compile .html files into Meteor Blaze views
11 | session # Client-side reactive dictionary for your app
12 | jquery # Helpful client-side library
13 | tracker # Meteor's client-side reactive programming library
14 |
15 | standard-minifiers # JS/CSS minifiers run for production mode
16 | es5-shim # ECMAScript 5 compatibility for older browsers.
17 | ecmascript # Enable ECMAScript2015+ syntax in app code
18 |
19 | kadira:flow-router
20 | kadira:blaze-layout
21 | useraccounts:flow-routing
22 | arillo:flow-router-helpers
23 | aldeed:autoform
24 | aldeed:collection2
25 | sujith3g:jstree
26 | fortawesome:fontawesome
27 | reactive-var
28 | email
29 | aslagle:reactive-table
30 | aldeed:delete-button
31 | meteorstuff:materialize-modal
32 | coffeescript
33 | mquandalle:jade
34 | stylus
35 | accounts-base
36 | accounts-password
37 | useraccounts:core
38 | useraccounts:materialize
39 | less
40 | hitchcott:qr-scanner
41 | ground:db
42 | tmeasday:publish-counts
43 | momentjs:moment
44 | gildaspk:autoform-materialize
45 | tap:i18n
46 | msavin:mongol
47 | modweb:flipclock
48 | materialize:materialize
49 | voidale:later-js-tz
50 | percolate:synced-cron
51 |
--------------------------------------------------------------------------------
/.meteor/platforms:
--------------------------------------------------------------------------------
1 | server
2 | browser
3 |
--------------------------------------------------------------------------------
/.meteor/release:
--------------------------------------------------------------------------------
1 | METEOR@1.2.1
2 |
--------------------------------------------------------------------------------
/client/main.coffee:
--------------------------------------------------------------------------------
1 | # Subscribe to a subset of the data on the client
2 | Meteor.subscribe 'locations'
3 | Meteor.subscribe 'classification'
4 | # Subscribe to subset persisted in GroundDB
5 | Ground.Collection Workorders
6 |
7 | Meteor.startup ->
8 | # Initialise Autoform
9 | hooksObject = {
10 | # Called when any submit operation succeeds
11 | onSuccess: (formType, result) -> toast 'success', 'Database operation completed.'
12 | # Called when any submit operation fails
13 | onError: (formType, error) ->
14 | if (formType == "method")
15 | toast 'error', error.details
16 | else
17 | toast 'error', error
18 | }
19 | AutoForm.addHooks(null, hooksObject);
20 |
21 | # Initialise Navbar dropdown
22 | $('.dropdown-button').dropdown {hover:false}
23 |
24 | #Initialise sessions
25 | Session.set 'currentDoc', {}
26 | Session.set 'currentID', '#'
27 |
--------------------------------------------------------------------------------
/client/main.jade:
--------------------------------------------------------------------------------
1 | head
2 | title Lightning EAM
3 | meta(name='viewport', content='width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no')
4 | link(rel='icon', sizes='16x16 32x32', href='/favicon.ico?v=2')
5 | link(href='https://fonts.googleapis.com/icon?family=Material+Icons', rel='stylesheet')
6 | body
7 | +layout
8 |
--------------------------------------------------------------------------------
/client/stylesheets/app.styl:
--------------------------------------------------------------------------------
1 | @media only screen and (min-width: 0)
2 | table
3 | font-size 12px !important
4 |
5 | @media only screen and (min-width: 992px)
6 | table
7 | font-size 14px !important
8 |
9 | @media only screen and (min-width: 1200px)
10 | table
11 | font-size 16px !important
12 |
13 | .backdrop
14 | background-color teal
15 |
16 | .container2
17 | margin 0 auto
18 | width 95%
19 |
20 | .big-icon
21 | font-size 160px !important
22 |
23 | .icon-page
24 | color #263238 !important
25 |
26 | .treeview
27 | margin-top 1em
28 | min-height 200px
29 |
30 | .toast-success
31 | background-color #2BBBAD !important
32 |
33 | .button-fa
34 | padding-bottom 2px
35 |
36 | .navbar-icon
37 | padding 0 12px 0 12px
38 |
39 | .collection
40 | overflow-y scroll !important
41 |
42 | select
43 | height auto !important
44 |
45 | [type="radio"] + label
46 | padding-right 35px
47 |
48 | .flipClock
49 | position: fixed
50 | bottom: 0
51 | right: 0
52 | opacity: 0.5
53 | padding-left: 2%
54 | // Scale
55 | transform-origin: 0 0
56 | transform: scale(.75)
57 | -ms-transform: scale(.75)
58 | -webkit-transform-origin: 0 0
59 | -webkit-transform: scale(.75)
60 | -o-transform-origin: 0 0
61 | -o-transform: scale(.75)
62 | -moz-transform-origin: 0 0
63 | -moz-transform: scale(.75)
64 |
65 | .field-border
66 | border:1px solid teal
67 | border-radius: 10px
68 | padding: 1%
69 | margin: 1%
70 |
71 | .margin-bottom-420
72 | margin-bottom: 420px
73 |
74 | .row-borders tr
75 | border:1px solid teal
76 |
--------------------------------------------------------------------------------
/client/templates/aConfig/autoform.coffee:
--------------------------------------------------------------------------------
1 | AutoForm.setDefaultTemplate 'materialize'
2 |
--------------------------------------------------------------------------------
/client/templates/application/assets/assets/createAsset.coffee:
--------------------------------------------------------------------------------
1 | Template.createAssetPage.onRendered ->
2 | $(".dropdown-button").dropdown()
3 | $('.tooltipped').tooltip {delay: 50}
4 |
5 | Template.createAssetPage.onDestroyed ->
6 | $('.tooltipped').tooltip 'remove'
7 |
8 | Template.createAssetPage.helpers
9 | parentID: -> Session.get('currentID').toString()
10 | children: -> []
11 | locationFormSchema: -> Schema.locations
12 | customTemplate: -> Customisations.createAsset
13 | assetClassID: -> Session.get 'currentClassID'
14 | txtClassificationID: -> Classification.findOne(Session.get('currentClassID').toString()).text
15 |
16 | Template.createAssetPage.events
17 | 'click .firstRow .btnAdd': (event, template) ->
18 | MaterializeModal.confirm
19 | title: 'Select Asset Classification'
20 | bodyTemplate: "createAssetAddAssetClass"
21 |
22 | Template.createAssetAddAssetClass.onRendered ->
23 | tempData = Classification.find(type: 'asset-classification').fetch()
24 | dataTree(tempData, 'classification')
25 |
26 | Template.createAssetAddAssetClass.helpers
27 | classificationDetails: -> Classification.findOne(_id: Session.get('currentClassID').toString())
28 |
--------------------------------------------------------------------------------
/client/templates/application/assets/assets/createLocation.coffee:
--------------------------------------------------------------------------------
1 | Template.createLocationPage.helpers
2 | customTemplate: -> Customisations.createLocation
3 | parentID: -> Session.get('currentID').toString()
4 | children: -> []
5 | locationFormSchema: -> Schema.locations
6 | locationType: ->
7 | if (Session.get 'currentID') == '#'
8 | type = 'database'
9 | else
10 | type = 'location'
11 | return type
12 |
13 | Template.createLocationPage.onRendered ->
14 | $(".dropdown-button").dropdown()
15 | $('.tooltipped').tooltip {delay: 50}
16 |
17 | Template.createLocationPage.onDestroyed ->
18 | $('.tooltipped').tooltip 'remove'
19 |
--------------------------------------------------------------------------------
/client/templates/application/assets/assets/createLocation.jade:
--------------------------------------------------------------------------------
1 | template(name='createLocationPage')
2 | if customTemplate
3 | +createLocationPageCustom
4 | else
5 | .container2
6 | br
7 | +autoForm schema=locationFormSchema id='createLocationPage' type='method' meteormethod='createLoc'
8 | fieldset
9 | legend New Location
10 | .row
11 | +afQuickField name='id' type='hidden'
12 | +afQuickField name='type' value=locationType type='hidden'
13 | +afQuickField name='parent' value=parentID defaultValue='#' type='hidden'
14 | .col.s12.m6.l3
15 | +afQuickField name='assetID'
16 | .col.s12.m6.l3
17 | +afQuickField name='criticality' label='*Criticality'
18 | div
19 | +afQuickField name='text' label='*Title'
20 | div
21 | +afQuickField name='description'
22 | div
23 | +afQuickField name='safety'
24 | .row
25 | .divider.teal
26 | .section
27 | h6.teal-text Geolocation Information
28 | .col.s12.m6.l3
29 | +afQuickField name='lat1'
30 | .col.s12.m6.l3
31 | +afQuickField name='long1'
32 | .row
33 | .divider.teal
34 | .section
35 | h6.teal-text Address Information
36 | div
37 | +afQuickField name='address'
38 | .col.s12.m6.l3
39 | +afQuickField name='state'
40 | .col.s12.m6.l3
41 | +afQuickField name='zip'
42 | .col.s12.m6.l3
43 | +afQuickField name='country'
44 | .row
45 | .divider.teal
46 | .section
47 | h6.teal-text Additional Information
48 | .col.s12.m6.l3
49 | +afQuickField name='urlTechData'
50 | .col.s12.m6.l3
51 | +afQuickField name='urlOpData'
52 | .col.s12.m6.l3
53 | +afQuickField name='urlPhoto'
54 | +fabBackResetSubmit
55 | br
56 |
--------------------------------------------------------------------------------
/client/templates/application/assets/assets/editAsset.coffee:
--------------------------------------------------------------------------------
1 | Template.editAssetPage.onRendered ->
2 | $(".dropdown-button").dropdown()
3 | $('.tooltipped').tooltip {delay: 50}
4 |
5 | Template.editAssetPage.onDestroyed ->
6 | $('.tooltipped').tooltip 'remove'
7 |
8 | Template.editAssetPage.onCreated ->
9 | self = this
10 | self.autorun ->
11 | self.subscribe 'singleLocation', Session.get('currentID').toString()
12 |
13 | Template.editAssetPage.helpers
14 | customTemplate: -> Customisations.editAsset # user customised template if applicable
15 | currentDoc: ->
16 | Collections.Locations.Current = Locations.findOne {'_id':Session.get('currentID').toString()}
17 | return Collections.Locations.Current
18 | asset: -> (Collections.Locations.Current.type == 'asset')
19 | locationFormSchema: -> Schema.locations
20 | assetClassID: -> Session.get 'currentClassID'
21 | txtClassificationID: -> Classification.findOne({_id: Session.get('currentClassID').toString()}).text
22 |
23 | Template.editAssetPage.events
24 | 'click .firstRow .btnAdd': (event, template) ->
25 | MaterializeModal.confirm
26 | title: 'Select Asset Classification'
27 | bodyTemplate: "modalEditAssetPage"
28 |
29 | #------------------- Modal -------------------------------------
30 |
31 | Template.modalEditAssetPage.onRendered ->
32 | tempData = Classification.find(type: 'asset-classification').fetch()
33 | dataTree(tempData, 'classification')
34 |
--------------------------------------------------------------------------------
/client/templates/application/assets/assets/editLocation.coffee:
--------------------------------------------------------------------------------
1 | Template.editLocationPage.onRendered ->
2 | $(".dropdown-button").dropdown()
3 | $('.tooltipped').tooltip {delay: 50}
4 |
5 | Template.editLocationPage.onDestroyed ->
6 | $('.tooltipped').tooltip 'remove'
7 |
8 | Template.editLocationPage.onCreated ->
9 | self = this
10 | self.autorun ->
11 | self.subscribe 'singleLocation', (Session.get('currentID').toString())
12 |
13 | Template.editLocationPage.helpers
14 | customTemplate: -> Customisations.editLoaction
15 | currentDoc: ->
16 | Collections.Locations.Current = Locations.findOne {'id':Session.get('currentID').toString()}
17 | return Collections.Locations.Current
18 | asset: -> (Collections.Locations.Current.type == 'asset')
19 | locationFormSchema: -> Schema.locations
20 |
--------------------------------------------------------------------------------
/client/templates/application/assets/assets/editLocation.jade:
--------------------------------------------------------------------------------
1 | template(name='editLocationPage')
2 | if customTemplate
3 | +editLocationPageCustom
4 | else
5 | .container2
6 | br
7 | +autoForm schema=locationFormSchema id='editLocationPage' type='update' collection='Locations' doc=currentDoc
8 | fieldset.active
9 | legend Edit Location
10 | if Template.subscriptionsReady
11 | br
12 | .row
13 | +afQuickField name="parent" type="hidden"
14 | +afQuickField name="treePath" type="hidden"
15 | .col.s12.m6.l3
16 | +afQuickField name="assetID"
17 | .col.s12.m6.l3
18 | +afQuickField name='criticality'
19 | div
20 | +afQuickField name='text'
21 | div
22 | +afQuickField name='description'
23 | div
24 | +afQuickField name='safety'
25 | .row
26 | .divider.teal
27 | .section
28 | h6.teal-text Geolocation Information
29 | .col.s12.m6.l3
30 | +afQuickField name='lat1'
31 | .col.s12.m6.l3
32 | +afQuickField name='long1'
33 | .row
34 | .divider.teal
35 | .section
36 | h6.teal-text Address Information
37 | div
38 | +afQuickField name='address'
39 | .col.s12.m6.l3
40 | +afQuickField name='state'
41 | .col.s12.m6.l3
42 | +afQuickField name='zip'
43 | .col.s12.m6.l3
44 | +afQuickField name='country'
45 | .row
46 | .divider.teal
47 | .section
48 | h6.teal-text Additional Information
49 | .col.s12.m6.l3
50 | +afQuickField name='urlTechData'
51 | .col.s12.m6.l3
52 | +afQuickField name='urlOpData'
53 | .col.s12.m6.l3
54 | +afQuickField name='urlPhoto'
55 | else
56 | +spinner
57 | +fabBackResetSubmit
58 | br
59 |
--------------------------------------------------------------------------------
/client/templates/application/assets/assets/viewAsset.coffee:
--------------------------------------------------------------------------------
1 | Template.viewAssetPage.onRendered ->
2 | $(".dropdown-button").dropdown()
3 | $('.tooltipped').tooltip {delay: 50}
4 |
5 | Template.viewAssetPage.onDestroyed ->
6 | $('.tooltipped').tooltip 'remove'
7 |
8 | Template.viewAssetPage.onCreated ->
9 | self = this
10 | self.autorun ->
11 | self.subscribe 'singleLocation', (Session.get('currentID').toString())
12 |
13 | Template.viewAssetPage.helpers
14 | customTemplate: -> Customisations.viewAsset
15 | viewDoc: ->
16 | console.log 'currentID: '+Session.get('currentID')
17 | Collections.Locations.Current = Locations.findOne {'id':Session.get('currentID').toString()}
18 | console.log 'Collections.Locations.Current: '+ JSON.stringify Collections.Locations.Current
19 | Collections.Locations.Current
20 | locationsFormSchema: -> Schema.locations
21 | assetClassification: -> Collections.Locations.Current.assetClassification.text
22 |
23 | Template.viewAssetPage.events
24 | 'click .viewAsset .btnEdit': ->
25 | if (Session.get('currentID').toString() == '#')
26 | alert 'No location or asset selected!'
27 | else
28 | if (Collections.Locations.Current.type == 'asset')
29 | FlowRouter.go '/assets/edit-asset'
30 | else
31 | FlowRouter.go '/assets/edit-location'
32 | 'click .viewAsset .btnCopy': ->
33 | if (Session.get('currentID').toString() == '#')
34 | alert 'No location or asset selected!'
35 | else
36 | if (Collections.Locations.Current.type == 'asset')
37 | FlowRouter.go '/assets/duplicate-asset'
38 | else
39 | FlowRouter.go '/assets/duplicate-location'
40 |
--------------------------------------------------------------------------------
/client/templates/application/assets/assets/viewLocation.coffee:
--------------------------------------------------------------------------------
1 | Template.viewLocationPage.onCreated ->
2 | self = this
3 | self.autorun ->
4 | self.subscribe 'singleLocation', (Session.get('currentID').toString())
5 |
6 | Template.viewLocationPage.onRendered ->
7 | $(".dropdown-button").dropdown()
8 | $('.tooltipped').tooltip {delay: 50}
9 |
10 | Template.viewLocationPage.onDestroyed ->
11 | $('.tooltipped').tooltip 'remove'
12 |
13 | Template.viewLocationPage.helpers
14 | customTemplate: -> Customisations.viewLocation
15 | locationsFormSchema: -> Schema.locations
16 | viewDoc: ->
17 | Collections.Locations.Current = Locations.findOne {'id':Session.get('currentID').toString()}
18 | return Collections.Locations.Current
19 |
20 | Template.viewLocationPage.events
21 | 'click .viewLocation .btnEdit': ->
22 | if (Session.get('currentID').toString()== '#')
23 | alert 'No location or asset selected!'
24 | else
25 | if (Collections.Locations.Current.type == 'asset')
26 | FlowRouter.go '/assets/edit-asset'
27 | else
28 | FlowRouter.go '/assets/edit-location'
29 | 'click .viewLocation .btnCopy': ->
30 | if (Session.get('currentID').toString()== '#')
31 | alert 'No location or asset selected!'
32 | else
33 | if (Collections.Locations.Current.type == 'asset')
34 | FlowRouter.go '/assets/duplicate-asset'
35 | else
36 | FlowRouter.go '/assets/duplicate-location'
37 |
--------------------------------------------------------------------------------
/client/templates/application/assets/assets/viewLocation.jade:
--------------------------------------------------------------------------------
1 | template(name='viewLocationPage')
2 | if customTemplate
3 | +viewLocationPageCustom
4 | else
5 | .flow-text.container2.viewLocation
6 | +fabBackCopyEdit
7 | br
8 | fieldset
9 | legend View Location
10 | +autoForm schema=locationsFormSchema id="viewLocationPage" type="readonly" collection="Locations" doc=viewDoc
11 | if Template.subscriptionsReady
12 | .row
13 | h6.teal-text Asset Details
14 | .col.s12.m6.l3
15 | +afQuickField name="id"
16 | .col.s12.m6.l3
17 | +afQuickField name="criticality"
18 | div
19 | +afQuickField name="text"
20 | div
21 | +afQuickField name="description"
22 | div
23 | +afQuickField name="safety"
24 | .row
25 | .divider.teal
26 | .section
27 | h6.teal-text Geolocation Information
28 | .col.s12.m6.l3
29 | +afQuickField name="lat1"
30 | .col.s12.m6.l3
31 | +afQuickField name="long1"
32 | // Other info
33 | .row
34 | .divider.teal
35 | .section
36 | h6.teal-text Address Information
37 | .col.s12.m6.l3
38 | +afQuickField name="address"
39 | .col.s12.m6.l3
40 | +afQuickField name="state"
41 | .col.s12.m6.l3
42 | +afQuickField name="zip"
43 | .col.s12.m6.l3
44 | +afQuickField name="country"
45 | .row
46 | .divider.teal
47 | .section
48 | h6.teal-text Additional Information
49 | .col.s12.m6.l3
50 | +afQuickField name="urlTechData"
51 | .col.s12.m6.l3
52 | +afQuickField name="urlOpData"
53 | .col.s12.m6.l3
54 | +afQuickField name="urlPhoto"
55 | else
56 | +spinner
57 |
--------------------------------------------------------------------------------
/client/templates/application/assets/classifications/createAssetClass.coffee:
--------------------------------------------------------------------------------
1 | Template.createAssetClassificationPage.helpers
2 | customTemplate: -> Customisations.createAssetClassification
3 |
--------------------------------------------------------------------------------
/client/templates/application/assets/classifications/createAssetClass.jade:
--------------------------------------------------------------------------------
1 | template(name='createAssetClassificationPage')
2 | if customTemplate
3 | +createAssetClassificationCustom
4 | else
5 | // template located in layouts folder
6 | +createClassificationPage classificationType='asset-classification'
7 |
--------------------------------------------------------------------------------
/client/templates/application/assets/classifications/deleteAssetClass.coffee:
--------------------------------------------------------------------------------
1 | Template.deleteAssetClassificationPage.onRendered ->
2 | $(".dropdown-button").dropdown()
3 | $('.tooltipped').tooltip {delay: 50}
4 |
5 | Template.deleteAssetClassificationPage.onDestroyed ->
6 | $('.tooltipped').tooltip 'remove'
7 |
8 | Template.deleteAssetClassificationPage.helpers
9 | customTemplate: -> Customisations.deleteAssetClassification
10 | textDoc: -> Classification.findOne({'id':Session.get('currentClassID').toString()}).text
11 |
--------------------------------------------------------------------------------
/client/templates/application/assets/classifications/deleteAssetClass.jade:
--------------------------------------------------------------------------------
1 | template(name='deleteAssetClassificationPage')
2 | if customTemplate
3 | +deleteAssetClassificationCustom
4 | else
5 | // template located in layouts folder
6 | +deleteClassificationPage doc=textDoc
7 |
--------------------------------------------------------------------------------
/client/templates/application/assets/classifications/editAssetClass.coffee:
--------------------------------------------------------------------------------
1 | Template.editAssetClassificationPage.onRendered ->
2 | $(".dropdown-button").dropdown()
3 | $('.tooltipped').tooltip {delay: 50}
4 |
5 | Template.editAssetClassificationPage.onDestroyed ->
6 | $('.tooltipped').tooltip 'remove'
7 |
8 | Template.editAssetClassificationPage.helpers
9 | customTemplate: -> Customisations.editAssetClassification # user customised template if applicable
10 |
--------------------------------------------------------------------------------
/client/templates/application/assets/classifications/editAssetClass.jade:
--------------------------------------------------------------------------------
1 | template(name='editAssetClassificationPage')
2 | if customTemplate
3 | +editAssetClassificationCustom
4 | else
5 | // template located in layouts folder
6 | +editClassificationPage
7 |
--------------------------------------------------------------------------------
/client/templates/application/assets/classifications/viewAssetClass.coffee:
--------------------------------------------------------------------------------
1 | Template.viewAssetClassificationPage.onRendered ->
2 | $(".dropdown-button").dropdown()
3 | $('.tooltipped').tooltip {delay: 50}
4 |
5 | Template.viewAssetClassificationPage.onDestroyed ->
6 | $('.tooltipped').tooltip 'remove'
7 |
8 | Template.viewAssetClassificationPage.helpers
9 | customTemplate: -> Customisations.viewAssetClassification
10 | viewDoc: ->
11 | Collections.Classification.Current = Classification.findOne {'id':Session.get('currentClassID').toString()}
12 | return Collections.Classification.Current
13 |
14 | Template.viewAssetClassificationPage.events
15 | 'click .viewAssetClassification .btnEdit': ->
16 | if (Session.get('currentClassID').toString() == '#')
17 | alert 'No classification selected!'
18 | else
19 | FlowRouter.go '/assets/edit-classification'
20 | 'click .viewAssetClassification .btnCopy': ->
21 | if (Session.get('currentClassID').toString() == '#')
22 | alert 'No classification selected!'
23 | else
24 | FlowRouter.go '/assets/duplicate-classification'
25 |
--------------------------------------------------------------------------------
/client/templates/application/assets/classifications/viewAssetClass.jade:
--------------------------------------------------------------------------------
1 | template(name='viewAssetClassificationPage')
2 | if customTemplate
3 | +viewAssetClassificationCustom
4 | else
5 | // template located in layouts folder
6 | +viewClassificationPage classDoc=viewDoc
7 |
--------------------------------------------------------------------------------
/client/templates/application/assets/classifications/viewAssetClasses.coffee:
--------------------------------------------------------------------------------
1 | Template.viewAssetClassificationsPage.onCreated ->
2 | # Set Navbar so Assets highlighted
3 | $('#header1DesktopUL li').removeClass 'active'
4 | $('#header1DesktopUL li').eq(0).addClass 'active'
5 | Session.set 'treeviewData', 'asset-classification'
6 |
7 | Template.viewAssetClassificationsPage.onRendered ->
8 | $(".dropdown-button").dropdown()
9 | $('.tooltipped').tooltip {delay: 50}
10 |
11 | Template.viewAssetClassificationsPage.onDestroyed ->
12 | $('.tooltipped').tooltip 'remove'
13 |
14 | Template.viewAssetClassificationsPage.helpers
15 | customTemplate: -> Customisations.viewAssetClassifications
16 | classificationDetails: -> Classification.findOne {_id: Session.get('currentClassID').toString() }
17 |
--------------------------------------------------------------------------------
/client/templates/application/assets/classifications/viewAssetClasses.jade:
--------------------------------------------------------------------------------
1 | template(name='viewAssetClassificationsPage')
2 | if customTemplate
3 | +viewAssetClassificationsPageCustom
4 | else
5 | .container
6 | .row
7 | div.viewClassifications
8 | // template located in layouts folder
9 | +viewClassificationsPage type='assets'
10 | +treeView nodeID=classificationDetails.classificationID nodeText=classificationDetails.text
11 |
--------------------------------------------------------------------------------
/client/templates/application/assets/meters/createMeter.coffee:
--------------------------------------------------------------------------------
1 | Template.createMeterPage.onCreated ->
2 | self = this
3 | self.autorun -> self.subscribe 'singleLocation', (Session.get('currentID').toString())
4 |
5 | Template.createMeterPage.onRendered ->
6 | $(".dropdown-button").dropdown()
7 | $('.tooltipped').tooltip {delay: 50}
8 |
9 | Template.createMeterPage.onDestroyed ->
10 | $('.tooltipped').tooltip 'remove'
11 |
12 | Template.createMeterPage.helpers
13 | customTemplate: -> Customisations.createMeter
14 | currentDoc: ->
15 | Collections.Locations.Current = Locations.findOne {'id':Session.get('currentID').toString()}
16 | return Collections.Locations.Current
17 |
18 | Template.createMeterPage.events
19 | 'click .createMeter .btnSubmit': ->
20 | doc = Collections.Locations.Current
21 | meter =
22 | text: $('#inpCreateMeterPageTitle').val()
23 | id: $('#inpCreateMeterPageID').val()
24 | units: $('#inpCreateMeterPageUnits').val()
25 | reading: $('#inpCreateMeterPageReading').val()
26 | Meteor.call 'createMeter', doc, meter, (error, result) ->
27 | if error
28 | toast 'error', error
29 | else
30 | toast 'success', result
31 | return
32 | FlowRouter.go history.back()
33 |
--------------------------------------------------------------------------------
/client/templates/application/assets/meters/createMeter.jade:
--------------------------------------------------------------------------------
1 | template(name='createMeterPage')
2 | if customTemplate
3 | +createMeterPageCustom
4 | else
5 | .flow-text
6 | if Template.subscriptionsReady
7 | br
8 | fieldset.createMeter
9 | legend Create Meter for
10 | =currentDoc.text
11 | | (id:
12 | =currentDoc.id
13 | |)
14 | form.new-record
15 | br
16 | .row
17 | .input-field.col.s12.m6.l3
18 | input#inpCreateMeterPageTitle.validate(placeholder='Give your meter a name', type='text', required='')
19 | label.active(for='inpCreateMeterPageTitle') Title
20 | .input-field.col.s12.m6.l3
21 | input#inpCreateMeterPageID.validate(placeholder='Give your meter an ID', type='text', required='')
22 | label.active(for='inpCreateMeterPageID') Meter ID
23 | .input-field.col.s12.m6.l3
24 | input#inpCreateMeterPageReading.validate(placeholder='Current meter value', type='number', value='0', required='')
25 | label.active(for='inpCreateMeterPageReading') Meter Reading
26 | .input-field.col.s12.m6.l3
27 | input#inpCreateMeterPageUnits.validate(placeholder='Measurement units', type='text', required='')
28 | label.active(for='inpCreateMeterPageUnits') Units
29 | br
30 | .row
31 | button.btn.waves-effect.waves-light.btnSubmit(type='button')
32 | i.fa.fa-tachometer
33 | | Create
34 | a(href="{{pathFor '../assets/view-locations'}}")
35 | button.btn.waves-effect.waves-light.tooltipped.red(type='button', data-delay='50', data-position='left', data-tooltip='Go back')
36 | i.material-icons skip_previous
37 | | Cancel
38 | else
39 | +spinner
40 | br
41 |
--------------------------------------------------------------------------------
/client/templates/application/assets/meters/viewMeters.coffee:
--------------------------------------------------------------------------------
1 | Template.viewMetersPage.onCreated ->
2 | self = this;
3 | self.autorun ->
4 | self.subscribe 'singleLocation', (Session.get('currentID').toString())
5 |
6 | Template.viewMetersPage.onRendered ->
7 | $(".dropdown-button").dropdown()
8 | $('.tooltipped').tooltip {delay: 50}
9 |
10 | Template.viewMetersPage.onDestroyed ->
11 | $('.tooltipped').tooltip 'remove'
12 |
13 | Template.viewMetersPage.helpers
14 | customTemplate: -> Customisations.viewMeters
15 | currentDoc: ->
16 | Collections.Locations.Current = Locations.findOne {'id':Session.get('currentID').toString()}
17 | return Collections.Locations.Current
18 |
19 | Template.viewMetersPage.events
20 | 'click .btnEach': (event) ->
21 | Collections.Locations.Current.meter = this
22 | $('#viewMetersPageModal1').openModal()
23 |
24 | 'click .btnEach2': (event) ->
25 | Collections.Locations.Current.meter = this
26 | $('#viewMetersPageModal2').openModal()
27 |
28 | 'click #viewMetersPageModal1 button': (event) ->
29 | doc = Collections.Locations.Current
30 | temp = $('#viewMetersPageModal1 input').val()
31 | TempArray = []
32 | tempArray = doc.meters
33 | Collections.Locations.Current.meter.reading = temp
34 | # find index of meter in array
35 | for a in [0...doc.meters.length]
36 | if (doc.meters[a].id == Collections.Locations.Current.meter.id)
37 | meterIndex = a
38 | break
39 | Meteor.call 'updateMeter', doc._id, meterIndex, temp, (error, result) ->
40 | if error
41 | toast 'error', error
42 | else
43 | toast 'success', result
44 | return
45 |
46 | 'click #viewMetersPageModal2 button': (event) ->
47 | doc = Collections.Locations.Current
48 | # find index of meter in array
49 | for a in [0...doc.meters.length]
50 | if (doc.meters[a].id == Collections.Locations.Current.meter.id)
51 | meterIndex = a
52 | break
53 | Meteor.call 'deleteMeter', doc._id, meterIndex, (error, result) ->
54 | if error
55 | toast 'error', error
56 | else
57 | toast 'success', result
58 | return
59 |
--------------------------------------------------------------------------------
/client/templates/application/custom/aConfig/index.coffee:
--------------------------------------------------------------------------------
1 | Customisations = {
2 | # This is where you tell the application you will using a custom template
3 | # Create the template in templates/application/custom/
4 | # Then set the Customisations object key to true
5 | #
6 | #eg for a custom createAsset template set:
7 | #createAsset: true
8 | }
9 |
--------------------------------------------------------------------------------
/client/templates/application/custom/assets/assets.jade:
--------------------------------------------------------------------------------
1 | // Example custom template
2 | template(name='assetsPageCustom')
3 | .container
4 | h1.icon-page.hide-on-small-only Custom Assets Page
5 | br
6 | .row.center-align
7 | .col.s6.m4.l3
8 | a.waves-effect.waves-dark.icon-page(href='{{pathFor "assets/view-locations"}}')
9 | i.fa-5x.fa.fa-gears
10 | br
11 | br
12 | | Assets & Locations
13 | br
14 | br
15 |
--------------------------------------------------------------------------------
/client/templates/application/custom/readme.txt:
--------------------------------------------------------------------------------
1 | User customized templates.
2 |
--------------------------------------------------------------------------------
/client/templates/application/help/help.coffee:
--------------------------------------------------------------------------------
1 | Template.helpPage.onCreated ->
2 | # Set Navbar so Help highlighted
3 | $('#header1DesktopUL li').removeClass 'active'
4 | $('#header1DesktopUL li').eq(7).addClass 'active'
5 |
6 | Template.helpPage.onRendered ->
7 | $(".dropdown-button").dropdown()
8 | $('.tooltipped').tooltip {delay: 50}
9 |
10 | Template.helpPage.onDestroyed ->
11 | $('.tooltipped').tooltip 'remove'
12 |
13 | Template.helpPage.helpers
14 | customTemplate: -> Customisations.help
15 |
--------------------------------------------------------------------------------
/client/templates/application/help/help.jade:
--------------------------------------------------------------------------------
1 | template(name='helpPage')
2 | if customTemplate
3 | +helpPageCustom
4 | else
5 | .container
6 | h1 Help
7 | br
8 | br
9 |
--------------------------------------------------------------------------------
/client/templates/application/inventory/equipment/createEquipment.coffee:
--------------------------------------------------------------------------------
1 | Template.createEquipmentPage.onRendered ->
2 | $(".dropdown-button").dropdown()
3 | $('.tooltipped').tooltip {delay: 50}
4 |
5 | Template.createEquipmentPage.onDestroyed ->
6 | $('.tooltipped').tooltip 'remove'
7 |
8 | Template.createEquipmentPage.helpers
9 | parentID: -> Session.get('currentID').toString()
10 | children: -> []
11 | equipmentFormSchema: -> Schema.equipment
12 | customTemplate: -> Customisations.createEquipment
13 | ClassID: -> Session.get 'currentClassID'
14 | txtClassificationID: -> Classification.findOne(Session.get('currentClassID').toString()).text
15 |
16 | Template.createEquipmentPage.events
17 | 'click .firstRow .btnAdd': (event, template) ->
18 | MaterializeModal.confirm
19 | title: 'Select Equipment Classification'
20 | bodyTemplate: "createEquipmentAddEquipmentClass"
21 |
22 | Template.createEquipmentAddEquipmentClass.onRendered ->
23 | tempData = Classification.find(type: 'equipment-classification').fetch()
24 | dataTree(tempData, 'classification')
25 |
26 | Template.createEquipmentAddEquipmentClass.helpers
27 | classificationDetails: -> Classification.findOne(_id: Session.get('currentClassID').toString())
28 |
--------------------------------------------------------------------------------
/client/templates/application/inventory/equipment/createEquipment.jade:
--------------------------------------------------------------------------------
1 | template(name='createEquipmentPage')
2 | if customTemplate
3 | +createEquipmentPageCustom
4 | else
5 | .container2
6 | br
7 | +autoForm schema=equipmentFormSchema id='createEquipmentPage' type='method' meteormethod='createEquipment'
8 | fieldset
9 | legend New Equipment
10 | .row.firstRow
11 | +afQuickField name='id' type='hidden'
12 | +afQuickField name='parent' value=parentID defaultValue='#' type='hidden'
13 | .col.s12.m6.l3
14 | +afQuickField name='referenceID'
15 | .col.s12.m6.l3
16 | +afQuickField name='stockUnits'
17 | +smlField item=txtClassificationID label='Equipment Classification'
18 | +afQuickField name='classificationID' value=equipmentClassID type='hidden'
19 | +frmBtnAdd label='Add'
20 | .col.s12.m6.l3
21 | +afQuickField name='status'
22 | .row
23 | div
24 | +afQuickField name='text'
25 | div
26 | +afQuickField name='description'
27 | +fabBackResetSubmit
28 | br
29 |
30 | template(name='createEquipmentAddEquipmentClass')
31 | +treeView nodeID=classificationDetails.classificationID nodeText=classificationDetails.text
32 |
33 |
--------------------------------------------------------------------------------
/client/templates/application/inventory/equipment/createEquipmentClass.coffee:
--------------------------------------------------------------------------------
1 | Template.createEquipmentClassificationPage.helpers
2 | customTemplate: -> Customisations.createEquipmentClassification
3 |
--------------------------------------------------------------------------------
/client/templates/application/inventory/equipment/createEquipmentClass.jade:
--------------------------------------------------------------------------------
1 | template(name='createEquipmentClassificationPage')
2 | if customTemplate
3 | +createEquipmentClassificationCustom
4 | else
5 | // template located in layouts folder
6 | +createClassificationPage classificationType='equipment-classification'
7 |
--------------------------------------------------------------------------------
/client/templates/application/inventory/equipment/deleteEquipmentClass.coffee:
--------------------------------------------------------------------------------
1 | Template.deleteEquipmentClassificationPage.onRendered ->
2 | $(".dropdown-button").dropdown()
3 | $('.tooltipped').tooltip {delay: 50}
4 |
5 | Template.deleteEquipmentClassificationPage.onDestroyed ->
6 | $('.tooltipped').tooltip 'remove'
7 |
8 | Template.deleteEquipmentClassificationPage.helpers
9 | customTemplate: -> Customisations.deleteEquipmentClassification
10 | textDoc: -> Classification.findOne({'id':Session.get('currentClassID').toString()}).text
11 |
--------------------------------------------------------------------------------
/client/templates/application/inventory/equipment/deleteEquipmentClass.jade:
--------------------------------------------------------------------------------
1 | template(name='deleteEquipmentClassificationPage')
2 | if customTemplate
3 | +deleteEquipmentClassificationCustom
4 | else
5 | // template located in layouts folder
6 | +deleteClassificationPage doc=textDoc
7 |
--------------------------------------------------------------------------------
/client/templates/application/inventory/equipment/editEquipment.coffee:
--------------------------------------------------------------------------------
1 | Template.editEquipmentPage.onCreated ->
2 | this.assetClassID = new ReactiveVar
3 |
4 | Template.editEquipmentPage.onRendered ->
5 | $(".dropdown-button").dropdown()
6 | $('.tooltipped').tooltip {delay: 50}
7 |
8 | Template.editEquipmentPage.onDestroyed ->
9 | $('.tooltipped').tooltip 'remove'
10 |
11 | Template.editEquipmentPage.helpers
12 | parentID: -> Collections.Equipment.Current.parent
13 | equipmentFormSchema: -> Schema.equipment
14 | customTemplate: -> Customisations.editEquipment
15 | currentDoc: -> Session.get 'currentDoc'
16 | equipmentClassID: -> Session.get 'currentClassID'
17 | txtClassificationID: -> Classification.findOne(Session.get('currentClassID').toString()).text
18 |
19 | Template.editEquipmentPage.events
20 | 'click .firstRow .btnAdd': (event, template) ->
21 | MaterializeModal.confirm
22 | title: 'Select Asset Classification'
23 | bodyTemplate: "modaleditEquipmentPage"
24 |
25 | #------------------- Modal -------------------------------------
26 |
27 | Template.modaleditEquipmentPage.onRendered ->
28 | tempData = Classification.find(type: 'equipment-classification').fetch()
29 | dataTree(tempData, 'classification')
30 |
31 | Template.modaleditEquipmentPage.helpers
32 | classificationDetails: -> Classification.findOne {_id:Session.get 'currentClassID'}
33 |
--------------------------------------------------------------------------------
/client/templates/application/inventory/equipment/editEquipment.jade:
--------------------------------------------------------------------------------
1 | template(name='editEquipmentPage')
2 | if customTemplate
3 | +editEquipmentPageCustom
4 | else
5 | .container2
6 | br
7 | fieldset.active
8 | legend Edit Equipment
9 | +autoForm schema=equipmentFormSchema id="editEquipmentPage" type="update" collection="Equipment" doc=currentDoc
10 | if Template.subscriptionsReady
11 | .row.firstRow
12 | .col.s12.m6.l3
13 | +afQuickField name='referenceID'
14 | .col.s12.m6.l3
15 | +afQuickField name='stockUnits'
16 | +smlField item=txtClassificationID label='Equipment Classification'
17 | +afQuickField name='classificationID' value=equipmentClassID type='hidden'
18 | +frmBtnAdd label='Add'
19 | .col.s12.m6.l3
20 | +afQuickField name='status'
21 | .row
22 | div
23 | +afQuickField name='text'
24 | div
25 | +afQuickField name='description'
26 | else
27 | +spinner
28 | +fabBackResetSubmit
29 |
30 | template(name='modaleditEquipmentPage')
31 | +treeView nodeID=classificationDetails.classificationID nodeText=classificationDetails.text
32 |
--------------------------------------------------------------------------------
/client/templates/application/inventory/equipment/editEquipmentClass.coffee:
--------------------------------------------------------------------------------
1 | Template.editEquipmentClassificationPage.onRendered ->
2 | $(".dropdown-button").dropdown()
3 | $('.tooltipped').tooltip {delay: 50}
4 |
5 | Template.editEquipmentClassificationPage.onDestroyed ->
6 | $('.tooltipped').tooltip 'remove'
7 |
8 | Template.editEquipmentClassificationPage.helpers
9 | customTemplate: -> Customisations.editEquipmentClassification # user customised template if applicable
10 |
--------------------------------------------------------------------------------
/client/templates/application/inventory/equipment/editEquipmentClass.jade:
--------------------------------------------------------------------------------
1 | template(name='editEquipmentClassificationPage')
2 | if customTemplate
3 | +editEquipmentClassificationCustom
4 | else
5 | // template located in layouts folder
6 | +editClassificationPage
7 |
--------------------------------------------------------------------------------
/client/templates/application/inventory/equipment/viewEquipment.coffee:
--------------------------------------------------------------------------------
1 | Template.viewEquipmentPage.onRendered ->
2 | $(".dropdown-button").dropdown()
3 | $('.tooltipped').tooltip {delay: 50}
4 |
5 | Template.viewEquipmentPage.onDestroyed ->
6 | $('.tooltipped').tooltip 'remove'
7 |
8 | Template.viewEquipmentPage.helpers
9 | customTemplate: -> Customisations.viewEquipment
10 | currentDoc: -> Session.get 'currentDoc'
11 | txtClassificationID: -> Classification.findOne(Session.get('currentClassID').toString()).text
12 |
13 | Template.viewEquipmentPage.events
14 | 'click .viewEquipment .btnEdit': ->
15 | if (Session.get('currentID').toString() == '#')
16 | alert 'No item selected!'
17 | else
18 | FlowRouter.go '/items/edit-equipment'
19 |
--------------------------------------------------------------------------------
/client/templates/application/inventory/equipment/viewEquipment.jade:
--------------------------------------------------------------------------------
1 | template(name='viewEquipmentPage')
2 | if customTemplate
3 | +viewEquipmentPageCustom
4 | else
5 | .flow-text.container2.viewEquipment
6 | +fabBackCopyEdit
7 | br
8 | fieldset
9 | legend View Equipment
10 | if Template.subscriptionsReady
11 | .row
12 | +smlField item=currentDoc._id label='System ID'
13 | +smlField item=currentDoc.referenceID label='Reference ID'
14 | +smlField item=currentDoc.stockUnits label='Units'
15 | +smlField item=currentDoc.status label='Status'
16 | +smlField item=txtClassificationID label='Equipment Classification'
17 | +lgeField item=currentDoc.text label='Title'
18 | +lgeField item=currentDoc.description label='Description'
19 | else
20 | +spinner
21 |
--------------------------------------------------------------------------------
/client/templates/application/inventory/equipment/viewEquipmentClass.coffee:
--------------------------------------------------------------------------------
1 | Template.viewEquipmentClassificationPage.onRendered ->
2 | $(".dropdown-button").dropdown()
3 | $('.tooltipped').tooltip {delay: 50}
4 |
5 | Template.viewEquipmentClassificationPage.onDestroyed ->
6 | $('.tooltipped').tooltip 'remove'
7 |
8 | Template.viewEquipmentClassificationPage.helpers
9 | customTemplate: -> Customisations.viewEquipmentClassification
10 | viewDoc: ->
11 | Collections.Classification.Current = Classification.findOne {'id':Session.get('currentClassID').toString()}
12 | return Collections.Classification.Current
13 |
14 | Template.viewEquipmentClassificationPage.events
15 | 'click .viewEquipmentClassification .btnEdit': ->
16 | if (Session.get('currentClassID').toString() == '#')
17 | alert 'No classification selected!'
18 | else
19 | FlowRouter.go '/inventory/equipment/edit-classification'
20 |
--------------------------------------------------------------------------------
/client/templates/application/inventory/equipment/viewEquipmentClass.jade:
--------------------------------------------------------------------------------
1 | template(name='viewEquipmentClassificationPage')
2 | if customTemplate
3 | +viewEquipmentClassificationCustom
4 | else
5 | // template located in layouts folder
6 | +viewClassificationPage classDoc=viewDoc
7 |
--------------------------------------------------------------------------------
/client/templates/application/inventory/equipment/viewEquipmentClasses.coffee:
--------------------------------------------------------------------------------
1 | Template.viewEquipmentClassificationsPage.onCreated ->
2 | # Set Navbar so Resources highlighted
3 | $('#header1DesktopUL li').removeClass 'active'
4 | $('#header1DesktopUL li').eq(0).addClass 'active'
5 | Session.set 'treeviewData', 'equipment-classification'
6 |
7 | Template.viewEquipmentClassificationsPage.onRendered ->
8 | $(".dropdown-button").dropdown()
9 | $('.tooltipped').tooltip {delay: 50}
10 |
11 | Template.viewEquipmentClassificationsPage.onDestroyed ->
12 | $('.tooltipped').tooltip 'remove'
13 |
14 | Template.viewEquipmentClassificationsPage.helpers
15 | customTemplate: -> Customisations.viewEquipmentClassifications
16 | classificationDetails: -> Classification.findOne {_id: Session.get('currentClassID').toString() }
17 |
--------------------------------------------------------------------------------
/client/templates/application/inventory/equipment/viewEquipmentClasses.jade:
--------------------------------------------------------------------------------
1 | template(name='viewEquipmentClassificationsPage')
2 | if customTemplate
3 | +viewEquipmentClassificationsPageCustom
4 | else
5 | .container
6 | .row
7 | div.viewClassifications
8 | // template located in layouts folder
9 | +viewClassificationsPage type='inventory/equipment'
10 | +treeView nodeID=classificationDetails.classificationID nodeText=classificationDetails.text
11 |
--------------------------------------------------------------------------------
/client/templates/application/inventory/equipment/viewEquipments.coffee:
--------------------------------------------------------------------------------
1 | Template.viewEquipmentsPage.onRendered ->
2 | $(".dropdown-button").dropdown()
3 | $('.tooltipped').tooltip {delay: 50}
4 |
5 | Template.viewEquipmentsPage.onDestroyed ->
6 | $('.tooltipped').tooltip 'remove'
7 |
8 | Template.viewEquipmentsPage.helpers
9 | customTemplate: -> Customisations.viewEquipments
10 | rtCollection: -> Equipment
11 | settings: -> {
12 | rowsPerPage: 10
13 | showFilter: true
14 | fields: [
15 | { key: '_id', label: ' System ID' }
16 | { key: 'supplier_id', label: ' Supplier ID' }
17 | { key: 'equipmentID', label: ' Equipment ID' }
18 | { key: 'type', label: ' Type' }
19 | { key: 'referenceID', label: ' Reference ID' }
20 | { key: 'text', label: ' Title' }
21 | { key: 'description', label: ' Description' }
22 | { key: '', label: 'View/Edit/Delete', tmpl: Template.rtViewEditDelete }
23 | ]
24 | }
25 |
26 | Template.viewEquipmentsPage.events
27 | 'click .viewEquipments .btnView': (event) ->
28 | Session.set 'currentDoc', Equipment.findOne {_id: this._id}
29 | Session.set 'currentClassID', ''
30 | FlowRouter.go '/inventory/Equipment/view-equipment'
31 |
32 | 'click .viewEquipments .btnEdit': (event) ->
33 | Session.set 'currentDoc', Equipment.findOne {_id: this._id}
34 | Session.set 'currentClassID', ''
35 | FlowRouter.go '/inventory/equipment/edit-equipment'
36 |
37 | 'click .viewEquipments .btnDelete': (event) ->
38 | Collections.Equipment.CurrentID = this._id
39 | MaterializeModal.display
40 | bodyTemplate: 'viewEquipmentsDelete'
41 | title: 'Delete equipment!'
42 | submitLabel: 'Delete'
43 | closeLabel: 'Cancel'
44 | callback: (error, response) ->
45 | if error
46 | console.error error
47 | else
48 | if response.submit
49 | Meteor.call 'deleteEquipment', Collections.Equipment.CurrentID, (error, result) ->
50 | if error
51 | toast 'error', error
52 | else
53 | toast 'success', result
54 | return
55 | return
56 |
--------------------------------------------------------------------------------
/client/templates/application/inventory/equipment/viewEquipments.jade:
--------------------------------------------------------------------------------
1 | template(name='viewEquipmentsPage')
2 | if customTemplate
3 | +viewEquipmentsPageCustom
4 | else
5 | .container2
6 | br
7 | fieldset.viewEquipments
8 | legend View Equipment
9 | a(href='{{pathFor "create-equipment"}}')
10 | button.btn-floating.waves-effect.waves-light.tooltipped(type='button', data-delay='50', data-position='bottom', data-tooltip='Create Equipment')
11 | i.fa.fa-plus
12 | .row
13 | if Template.subscriptionsReady
14 | +reactiveTable collection=rtCollection settings=settings class='table striped'
15 | else
16 | +spinner
17 | +fabBack
18 |
19 | template(name='viewEquipmentsDelete')
20 | h5.red-text Warning this will permanently delete the equipment!
21 | | This process cannot be undone.
22 |
--------------------------------------------------------------------------------
/client/templates/application/inventory/inventory.coffee:
--------------------------------------------------------------------------------
1 | Template.inventoryPage.onCreated ->
2 | # Set Navbar so Inventory highlighted
3 | $('#header1DesktopUL li').removeClass 'active'
4 | $('#header1DesktopUL li').eq(4).addClass 'active'
5 |
6 | Template.inventoryPage.onRendered ->
7 | $(".dropdown-button").dropdown()
8 | $('.tooltipped').tooltip {delay: 50}
9 |
10 | Template.inventoryPage.onDestroyed ->
11 | $('.tooltipped').tooltip 'remove'
12 |
13 | Template.inventoryPage.helpers
14 | customTemplate: -> Customisations.inventory
15 |
16 | Template.inventoryPage.events
17 | 'click .btnViewItemsClassifications': (event) ->
18 | FlowRouter.go '/inventory/item/view-classifications'
19 | 'click .btnViewEquipmentClassifications': (event) ->
20 | FlowRouter.go '/inventory/equipment/view-classifications'
21 | 'click .btnViewLocationClassifications': (event) ->
22 | FlowRouter.go '/inventory/locations/view-classifications'
23 | 'click .btnViewItems': (event) ->
24 | FlowRouter.go '/inventory/items/view-items'
25 | 'click .btnViewEquipment': (event) ->
26 | FlowRouter.go '/inventory/equipment/view-equipments'
27 | 'click .btnViewLocations': (event) ->
28 | FlowRouter.go '/inventory/locations/view-locations'
29 |
--------------------------------------------------------------------------------
/client/templates/application/inventory/inventory.jade:
--------------------------------------------------------------------------------
1 | template(name='inventoryPage')
2 | if customTemplate
3 | +inventoryPageCustom
4 | else
5 | .container
6 | h1.icon-page Inventory
7 | .row.flow-text.center-align
8 | .col.s12.m6.l3
9 | a.btnViewItems.waves-effect.waves-dark.icon-page
10 | i.fa-5x.fa.fa-cube
11 | br
12 | br
13 | | Items
14 | br
15 | br
16 | .col.s12.m6.l3
17 | a.btnViewItemsClassifications.waves-effect.waves-dark.icon-page
18 | i.fa-5x.fa.fa-file-o
19 | br
20 | br
21 | | Item Classification
22 | br
23 | br
24 | .col.s12.m6.l3
25 | a.btnViewEquipment.waves-effect.waves-dark.icon-page
26 | i.fa-5x.fa.fa-wrench
27 | br
28 | br
29 | | Equipment
30 | br
31 | br
32 | .col.s12.m6.l3
33 | a.btnViewEquipmentClassifications.waves-effect.waves-dark.icon-page
34 | i.fa-5x.fa.fa-file-o
35 | br
36 | br
37 | | Equipment Classification
38 | br
39 | br
40 | .col.s12.m6.l3
41 | a.btnViewLocations.waves-effect.waves-dark.icon-page
42 | i.fa-5x.fa.fa-cubes
43 | br
44 | br
45 | | Inventory Locations
46 | br
47 | br
48 | .col.s12.m6.l3
49 | a.btnViewLocationClassifications.waves-effect.waves-dark.icon-page
50 | i.fa-5x.fa.fa-file-o
51 | br
52 | br
53 | | Inventory Location Classification
54 | br
55 | br
56 | .col.s12.m6.l3
57 | a.btnViewBOM.waves-effect.waves-dark.icon-page
58 | i.fa-5x.fa.fa-list-ul
59 | br
60 | br
61 | | Bill of Materials
62 | br
63 | br
64 | .col.s12.m6.l3
65 | a.btnViewSettings.waves-effect.waves-dark.icon-page
66 | i.fa-5x.fa.fa-calculator
67 | br
68 | br
69 | | Settings
70 | br
71 | br
72 |
--------------------------------------------------------------------------------
/client/templates/application/inventory/item/createItem.coffee:
--------------------------------------------------------------------------------
1 | Template.createItemPage.onRendered ->
2 | $(".dropdown-button").dropdown()
3 | $('.tooltipped').tooltip {delay: 50}
4 |
5 | Template.createItemPage.onDestroyed ->
6 | $('.tooltipped').tooltip 'remove'
7 |
8 | Template.createItemPage.helpers
9 | parentID: -> Session.get('currentID').toString()
10 | children: -> []
11 | itemFormSchema: -> Schema.items
12 | customTemplate: -> Customisations.createItem
13 | itemClassID: -> Session.get 'currentClassID'
14 | txtClassificationID: -> Classification.findOne(Session.get('currentClassID').toString()).text
15 |
16 | Template.createItemPage.events
17 | 'click .firstRow .btnAdd': (event, template) ->
18 | MaterializeModal.confirm
19 | title: 'Select Item Classification'
20 | bodyTemplate: "createItemAddItemClass"
21 |
22 | Template.createItemAddItemClass.onRendered ->
23 | tempData = Classification.find(type: 'item-classification').fetch()
24 | dataTree(tempData, 'classification')
25 |
26 | Template.createItemAddItemClass.helpers
27 | classificationDetails: -> Classification.findOne(_id: Session.get('currentClassID').toString())
28 |
--------------------------------------------------------------------------------
/client/templates/application/inventory/item/createItem.jade:
--------------------------------------------------------------------------------
1 | template(name='createItemPage')
2 | if customTemplate
3 | +createItemPageCustom
4 | else
5 | .container2
6 | br
7 | +autoForm schema=itemFormSchema id='createItemPage' type='method' meteormethod='createItem'
8 | fieldset
9 | legend New Item
10 | .row.firstRow
11 | +afQuickField name='id' type='hidden'
12 | +afQuickField name='parent' value=parentID defaultValue='#' type='hidden'
13 | .col.s12.m6.l3
14 | +afQuickField name='referenceID'
15 | .col.s12.m6.l3
16 | +afQuickField name='stockUnits'
17 | +smlField item=txtClassificationID label='Item Classification'
18 | +afQuickField name='classificationID' value=itemClassID type='hidden'
19 | +frmBtnAdd label='Add'
20 | .col.s12.m6.l3
21 | +afQuickField name='status'
22 | .row
23 | div
24 | +afQuickField name='text'
25 | div
26 | +afQuickField name='description'
27 | +fabBackResetSubmit
28 | br
29 |
30 | template(name='createItemAddItemClass')
31 | +treeView nodeID=classificationDetails.classificationID nodeText=classificationDetails.text
32 |
33 |
--------------------------------------------------------------------------------
/client/templates/application/inventory/item/createItemClass.coffee:
--------------------------------------------------------------------------------
1 | Template.createItemClassificationPage.helpers
2 | customTemplate: -> Customisations.createItemClassification
3 |
--------------------------------------------------------------------------------
/client/templates/application/inventory/item/createItemClass.jade:
--------------------------------------------------------------------------------
1 | template(name='createItemClassificationPage')
2 | if customTemplate
3 | +createItemClassificationCustom
4 | else
5 | // template located in layouts folder
6 | +createClassificationPage classificationType='item-classification'
7 |
--------------------------------------------------------------------------------
/client/templates/application/inventory/item/deleteItemClass.coffee:
--------------------------------------------------------------------------------
1 | Template.deleteItemClassificationPage.onRendered ->
2 | $(".dropdown-button").dropdown()
3 | $('.tooltipped').tooltip {delay: 50}
4 |
5 | Template.deleteItemClassificationPage.onDestroyed ->
6 | $('.tooltipped').tooltip 'remove'
7 |
8 | Template.deleteItemClassificationPage.helpers
9 | customTemplate: -> Customisations.deleteItemClassification
10 | textDoc: -> Classification.findOne({'id':Session.get('currentClassID').toString()}).text
11 |
--------------------------------------------------------------------------------
/client/templates/application/inventory/item/deleteItemClass.jade:
--------------------------------------------------------------------------------
1 | template(name='deleteItemClassificationPage')
2 | if customTemplate
3 | +deleteItemClassificationCustom
4 | else
5 | // template located in layouts folder
6 | +deleteClassificationPage doc=textDoc
7 |
--------------------------------------------------------------------------------
/client/templates/application/inventory/item/editItem.coffee:
--------------------------------------------------------------------------------
1 | Template.editItemPage.onRendered ->
2 | $(".dropdown-button").dropdown()
3 | $('.tooltipped').tooltip {delay: 50}
4 |
5 | Template.editItemPage.onDestroyed ->
6 | $('.tooltipped').tooltip 'remove'
7 |
8 | Template.editItemPage.helpers
9 | parentID: -> Collections.Items.Current.parent
10 | itemFormSchema: -> Schema.items
11 | customTemplate: -> Customisations.editItem
12 | currentDoc: -> Session.get 'currentDoc'
13 | itemClassID: -> Session.get 'currentClassID'
14 | txtClassificationID: -> Classification.findOne(Session.get('currentClassID').toString()).text
15 |
16 | Template.editItemPage.events
17 | 'click .firstRow .btnAdd': (event, template) ->
18 | MaterializeModal.confirm
19 | title: 'Select Asset Classification'
20 | bodyTemplate: "modaleditItemPage"
21 |
22 | #------------------- Modal -------------------------------------
23 |
24 | Template.modaleditItemPage.onRendered ->
25 | tempData = Classification.find(type: 'item-classification').fetch()
26 | dataTree(tempData, 'classification')
27 |
28 | Template.modaleditItemPage.helpers
29 | classificationDetails: -> Classification.findOne {_id:Session.get 'currentClassID'}
30 |
--------------------------------------------------------------------------------
/client/templates/application/inventory/item/editItem.jade:
--------------------------------------------------------------------------------
1 | template(name='editItemPage')
2 | if customTemplate
3 | +editItemPageCustom
4 | else
5 | .container2
6 | br
7 | fieldset.active
8 | legend Edit Item
9 | +autoForm schema=itemFormSchema id="editItemPage" type="update" collection="Items" doc=currentDoc
10 | if Template.subscriptionsReady
11 | .row.firstRow
12 | .col.s12.m6.l3
13 | +afQuickField name='referenceID'
14 | .col.s12.m6.l3
15 | +afQuickField name='stockUnits'
16 | +smlField item=txtClassificationID label='Item Classification'
17 | +afQuickField name='classificationID' value=itemClassID type='hidden'
18 | +frmBtnAdd label='Add'
19 | .col.s12.m6.l3
20 | +afQuickField name='status'
21 | .row
22 | div
23 | +afQuickField name='text'
24 | div
25 | +afQuickField name='description'
26 | else
27 | +spinner
28 | +fabBackResetSubmit
29 |
30 | template(name='modaleditItemPage')
31 | +treeView nodeID=classificationDetails.classificationID nodeText=classificationDetails.text
32 |
--------------------------------------------------------------------------------
/client/templates/application/inventory/item/editItemClass.coffee:
--------------------------------------------------------------------------------
1 | Template.editItemClassificationPage.onRendered ->
2 | $(".dropdown-button").dropdown()
3 | $('.tooltipped').tooltip {delay: 50}
4 |
5 | Template.editItemClassificationPage.onDestroyed ->
6 | $('.tooltipped').tooltip 'remove'
7 |
8 | Template.editItemClassificationPage.helpers
9 | customTemplate: -> Customisations.editItemClassification # user customised template if applicable
10 |
--------------------------------------------------------------------------------
/client/templates/application/inventory/item/editItemClass.jade:
--------------------------------------------------------------------------------
1 | template(name='editItemClassificationPage')
2 | if customTemplate
3 | +editItemClassificationCustom
4 | else
5 | // template located in layouts folder
6 | +editClassificationPage
7 |
--------------------------------------------------------------------------------
/client/templates/application/inventory/item/viewItem.coffee:
--------------------------------------------------------------------------------
1 | Template.viewItemPage.onRendered ->
2 | $(".dropdown-button").dropdown()
3 | $('.tooltipped').tooltip {delay: 50}
4 |
5 | Template.viewItemPage.onDestroyed ->
6 | $('.tooltipped').tooltip 'remove'
7 |
8 | Template.viewItemPage.helpers
9 | customTemplate: -> Customisations.viewItem
10 | currentDoc: -> Session.get 'currentDoc'
11 | txtClassificationID: -> Classification.findOne(_id: Session.get('currentDoc').classificationID ).text
12 |
13 | Template.viewItemPage.events
14 | 'click .viewItem .btnEdit': ->
15 | if (Session.get('currentID').toString() == '#')
16 | alert 'No item selected!'
17 | else
18 | FlowRouter.go '/items/edit-item'
19 |
--------------------------------------------------------------------------------
/client/templates/application/inventory/item/viewItem.jade:
--------------------------------------------------------------------------------
1 | template(name='viewItemPage')
2 | if customTemplate
3 | +viewItemPageCustom
4 | else
5 | .flow-text.container2.viewItem
6 | +fabBackCopyEdit
7 | br
8 | fieldset
9 | legend View Item
10 | if Template.subscriptionsReady
11 | .row
12 | +smlField item=currentDoc._id label='System ID'
13 | +smlField item=currentDoc.referenceID label='Reference ID'
14 | +smlField item=currentDoc.stockUnits label='Units'
15 | +smlField item=currentDoc.status label='Status'
16 | +smlField item=txtClassificationID label='Item Classification'
17 | +lgeField item=currentDoc.text label='Title'
18 | +lgeField item=currentDoc.description label='Description'
19 | else
20 | +spinner
21 |
--------------------------------------------------------------------------------
/client/templates/application/inventory/item/viewItemClass.coffee:
--------------------------------------------------------------------------------
1 | Template.viewItemClassificationPage.onRendered ->
2 | $(".dropdown-button").dropdown()
3 | $('.tooltipped').tooltip {delay: 50}
4 |
5 | Template.viewItemClassificationPage.onDestroyed ->
6 | $('.tooltipped').tooltip 'remove'
7 |
8 | Template.viewItemClassificationPage.helpers
9 | customTemplate: -> Customisations.viewItemClassification
10 | viewDoc: ->
11 | Collections.Classification.Current = Classification.findOne {'id':Session.get('currentClassID').toString()}
12 | return Collections.Classification.Current
13 |
14 | Template.viewItemClassificationPage.events
15 | 'click .viewItemClassification .btnEdit': ->
16 | if (Session.get('currentClassID').toString() == '#')
17 | alert 'No classification selected!'
18 | else
19 | FlowRouter.go '/inventory/item/edit-classification'
20 |
--------------------------------------------------------------------------------
/client/templates/application/inventory/item/viewItemClass.jade:
--------------------------------------------------------------------------------
1 | template(name='viewItemClassificationPage')
2 | if customTemplate
3 | +viewItemClassificationCustom
4 | else
5 | // template located in layouts folder
6 | +viewClassificationPage classDoc=viewDoc
7 |
--------------------------------------------------------------------------------
/client/templates/application/inventory/item/viewItemClasses.coffee:
--------------------------------------------------------------------------------
1 | Template.viewItemClassificationsPage.onCreated ->
2 | # Set Navbar so Resources highlighted
3 | $('#header1DesktopUL li').removeClass 'active'
4 | $('#header1DesktopUL li').eq(0).addClass 'active'
5 | Session.set 'treeviewData', 'item-classification'
6 |
7 | Template.viewItemClassificationsPage.onRendered ->
8 | $(".dropdown-button").dropdown()
9 | $('.tooltipped').tooltip {delay: 50}
10 |
11 | Template.viewItemClassificationsPage.onDestroyed ->
12 | $('.tooltipped').tooltip 'remove'
13 |
14 | Template.viewItemClassificationsPage.helpers
15 | customTemplate: -> Customisations.viewItemClassifications
16 | classificationDetails: -> Classification.findOne {_id: Session.get('currentClassID').toString() }
17 |
--------------------------------------------------------------------------------
/client/templates/application/inventory/item/viewItemClasses.jade:
--------------------------------------------------------------------------------
1 | template(name='viewItemClassificationsPage')
2 | if customTemplate
3 | +viewItemClassificationsPageCustom
4 | else
5 | .container
6 | .row
7 | div.viewClassifications
8 | // template located in layouts folder
9 | +viewClassificationsPage type='inventory/item'
10 | +treeView nodeID=classificationDetails.classificationID nodeText=classificationDetails.text
11 |
--------------------------------------------------------------------------------
/client/templates/application/inventory/item/viewItems.coffee:
--------------------------------------------------------------------------------
1 | Template.viewItemsPage.onRendered ->
2 | $(".dropdown-button").dropdown()
3 | $('.tooltipped').tooltip {delay: 50}
4 |
5 | Template.viewItemsPage.onDestroyed ->
6 | $('.tooltipped').tooltip 'remove'
7 |
8 | Template.viewItemsPage.helpers
9 | customTemplate: -> Customisations.viewItems
10 | rtCollection: -> Items
11 | settings: -> {
12 | rowsPerPage: 10
13 | showFilter: true
14 | fields: [
15 | { key: '_id', label: ' System ID' }
16 | { key: 'supplier_id', label: ' Supplier ID' }
17 | { key: 'itemID', label: ' Item ID' }
18 | { key: 'type', label: ' Type' }
19 | { key: 'referenceID', label: ' Reference ID' }
20 | { key: 'text', label: ' Title' }
21 | { key: 'description', label: ' Description' }
22 | { key: '', label: 'View/Edit/Delete', tmpl: Template.rtViewEditDelete }
23 | ]
24 | }
25 |
26 | Template.viewItemsPage.events
27 | 'click .viewItems .btnView': (event) ->
28 | Session.set 'currentDoc', Items.findOne {_id: this._id}
29 | Session.set 'currentClassID', ''
30 | FlowRouter.go '/inventory/items/view-item'
31 |
32 | 'click .viewItems .btnEdit': (event) ->
33 | Session.set 'currentDoc', Items.findOne {_id: this._id}
34 | Session.set 'currentClassID', ''
35 | FlowRouter.go '/inventory/items/edit-item'
36 |
37 | 'click .viewItems .btnDelete': (event) ->
38 | Collections.Items.CurrentID = this._id
39 | MaterializeModal.display
40 | bodyTemplate: 'viewItemsDelete'
41 | title: 'Delete Item!'
42 | submitLabel: 'Delete'
43 | closeLabel: 'Cancel'
44 | callback: (error, response) ->
45 | if error
46 | console.error error
47 | else
48 | if response.submit
49 | Meteor.call 'deleteItem', Collections.Items.CurrentID, (error, result) ->
50 | if error
51 | toast 'error', error
52 | else
53 | toast 'success', result
54 | return
55 | return
56 |
--------------------------------------------------------------------------------
/client/templates/application/inventory/item/viewItems.jade:
--------------------------------------------------------------------------------
1 | template(name='viewItemsPage')
2 | if customTemplate
3 | +viewItemsPageCustom
4 | else
5 | .container2
6 | br
7 | fieldset.viewItems
8 | legend View Items
9 | a(href='{{pathFor "create-item"}}')
10 | button.btn-floating.waves-effect.waves-light.tooltipped(type='button', data-delay='50', data-position='bottom', data-tooltip='Create Item')
11 | i.fa.fa-plus
12 | .row
13 | if Template.subscriptionsReady
14 | +reactiveTable collection=rtCollection settings=settings class='table striped'
15 | else
16 | +spinner
17 | +fabBack
18 |
19 | template(name='viewItemsDelete')
20 | h5.red-text Warning this will permanently delete the item!
21 | | This process cannot be undone.
22 |
--------------------------------------------------------------------------------
/client/templates/application/inventory/locations/createInvLoc.coffee:
--------------------------------------------------------------------------------
1 | Template.createInvLocPage.onRendered ->
2 | $(".dropdown-button").dropdown()
3 | $('.tooltipped').tooltip {delay: 50}
4 |
5 | Template.createInvLocPage.onDestroyed ->
6 | $('.tooltipped').tooltip 'remove'
7 |
8 | Template.createInvLocPage.helpers
9 | parentID: -> Session.get('currentID').toString()
10 | children: -> []
11 | formSchema: -> Schema.bins
12 | customTemplate: -> Customisations.createInvLoc
13 | classID: -> Session.get 'currentClassID'
14 | txtClassificationID: -> Classification.findOne(Session.get('currentClassID').toString()).text
15 |
16 | Template.createInvLocPage.events
17 | 'click .firstRow .btnAdd': (event, template) ->
18 | MaterializeModal.confirm
19 | title: 'Select Inventory Location Classification'
20 | bodyTemplate: "createInvLocModal"
21 |
22 | Template.createInvLocModal.onRendered ->
23 | tempData = Classification.find(type: 'invloc-classification').fetch()
24 | dataTree(tempData, 'classification')
25 |
26 | Template.createInvLocModal.helpers
27 | classificationDetails: -> Classification.findOne(_id: Session.get('currentClassID').toString())
28 |
--------------------------------------------------------------------------------
/client/templates/application/inventory/locations/createInvLoc.jade:
--------------------------------------------------------------------------------
1 | template(name='createInvLocPage')
2 | if customTemplate
3 | +createInvLocPageCustom
4 | else
5 | .container2
6 | br
7 | +autoForm schema=formSchema id='createInvLocPage' type='method' meteormethod='createInvLoc'
8 | fieldset
9 | legend New Inventory Location
10 | .row.firstRow
11 | +afQuickField name='id' type='hidden'
12 | +afQuickField name='parent' value=parentID defaultValue='#' type='hidden'
13 | .col.s12.m6.l3
14 | +afQuickField name='referenceID'
15 | .col.s12.m6.l3
16 | +afQuickField name='type'
17 | .col.s12.m6.l3
18 | +afQuickField name='status'
19 | +afQuickField name='classificationID' value=classID type='hidden'
20 | +smlField item=txtClassificationID label='Inventory Location Classification'
21 | +frmBtnAdd label='Add'
22 | .row
23 | div
24 | +afQuickField name='text'
25 | div
26 | +afQuickField name='description'
27 | +fabBackResetSubmit
28 | br
29 |
30 | template(name='createInvLocModal')
31 | +treeView nodeID=classificationDetails.classificationID nodeText=classificationDetails.text
32 |
33 |
--------------------------------------------------------------------------------
/client/templates/application/inventory/locations/createInvLocClass.coffee:
--------------------------------------------------------------------------------
1 | Template.createInvLocClassificationPage.helpers
2 | customTemplate: -> Customisations.createInvLocClassification
3 |
--------------------------------------------------------------------------------
/client/templates/application/inventory/locations/createInvLocClass.jade:
--------------------------------------------------------------------------------
1 | template(name='createInvLocClassificationPage')
2 | if customTemplate
3 | +createInvLocClassificationCustom
4 | else
5 | // template located in layouts folder
6 | +createClassificationPage classificationType='invloc-classification'
7 |
--------------------------------------------------------------------------------
/client/templates/application/inventory/locations/deleteInvLocClass.coffee:
--------------------------------------------------------------------------------
1 | Template.deleteInvLocClassificationPage.onRendered ->
2 | $(".dropdown-button").dropdown()
3 | $('.tooltipped').tooltip {delay: 50}
4 |
5 | Template.deleteInvLocClassificationPage.onDestroyed ->
6 | $('.tooltipped').tooltip 'remove'
7 |
8 | Template.deleteInvLocClassificationPage.helpers
9 | customTemplate: -> Customisations.deleteInvLocClassification
10 | textDoc: -> Classification.findOne({'id':Session.get('currentClassID').toString()}).text
11 |
--------------------------------------------------------------------------------
/client/templates/application/inventory/locations/deleteInvLocClass.jade:
--------------------------------------------------------------------------------
1 | template(name='deleteInvLocClassificationPage')
2 | if customTemplate
3 | +deleteInvLocClassificationCustom
4 | else
5 | // template located in layouts folder
6 | +deleteClassificationPage doc=textDoc
7 |
--------------------------------------------------------------------------------
/client/templates/application/inventory/locations/editInvLoc.coffee:
--------------------------------------------------------------------------------
1 | Template.editInvLocPage.onRendered ->
2 | $(".dropdown-button").dropdown()
3 | $('.tooltipped').tooltip {delay: 50}
4 | Session.set 'currentClassID', Collections.Bins.Current.classificationID
5 |
6 | Template.editInvLocPage.onDestroyed ->
7 | $('.tooltipped').tooltip 'remove'
8 |
9 | Template.editInvLocPage.helpers
10 | parentID: -> Session.get('currentID').toString()
11 | formSchema: -> Schema.bins
12 | customTemplate: -> Customisations.createInvLoc
13 | currentDoc: -> Collections.Bins.Current
14 | classID: -> Session.get 'currentClassID'
15 | txtClassificationID: -> Classification.findOne(_id: Session.get('currentClassID').toString()).text
16 |
17 | Template.editInvLocPage.events
18 | 'click .firstRow .btnAdd': (event, template) ->
19 | MaterializeModal.confirm
20 | title: 'Select Inventory Location Classification'
21 | bodyTemplate: "modaleditInvLocPage"
22 |
23 | #------------------- Modal -------------------------------------
24 |
25 | Template.modaleditInvLocPage.onRendered ->
26 | tempData = Classification.find(type: 'invloc-classification').fetch()
27 | dataTree(tempData, 'classification')
28 |
29 | Template.modaleditInvLocPage.helpers
30 | classificationDetails: -> Classification.findOne {_id: Session.get('currentClassID').toString()}
31 |
--------------------------------------------------------------------------------
/client/templates/application/inventory/locations/editInvLoc.jade:
--------------------------------------------------------------------------------
1 | template(name='editInvLocPage')
2 | if customTemplate
3 | +editInvLocPageCustom
4 | else
5 | .container2
6 | br
7 | fieldset.active
8 | legend Edit Inventory Location
9 | +autoForm schema=formSchema id="editInvLocPage" type="update" collection="Bins" doc=currentDoc
10 | if Template.subscriptionsReady
11 | .row.firstRow
12 | .col.s12.m6.l3
13 | +afQuickField name='referenceID'
14 | .col.s12.m6.l3
15 | +afQuickField name='status'
16 | .col.s12.m6.l3
17 | +afQuickField name='type'
18 | +smlField item=txtClassificationID label='Inventory Location Classification'
19 | +afQuickField name='classificationID' value=classID type='hidden'
20 | +frmBtnAdd label='Add'
21 | .row
22 | div
23 | +afQuickField name='text'
24 | div
25 | +afQuickField name='description'
26 | else
27 | +spinner
28 | +fabBackResetSubmit
29 |
30 | template(name='modaleditInvLocPage')
31 | +treeView nodeID=classificationDetails.classificationID nodeText=classificationDetails.text
32 |
--------------------------------------------------------------------------------
/client/templates/application/inventory/locations/editInvLocClass.coffee:
--------------------------------------------------------------------------------
1 | Template.editInvLocClassificationPage.onRendered ->
2 | $(".dropdown-button").dropdown()
3 | $('.tooltipped').tooltip {delay: 50}
4 |
5 | Template.editInvLocClassificationPage.onDestroyed ->
6 | $('.tooltipped').tooltip 'remove'
7 |
8 | Template.editInvLocClassificationPage.helpers
9 | customTemplate: -> Customisations.editInvLocClassification # user customised template if applicable
10 |
--------------------------------------------------------------------------------
/client/templates/application/inventory/locations/editInvLocClass.jade:
--------------------------------------------------------------------------------
1 | template(name='editInvLocClassificationPage')
2 | if customTemplate
3 | +editInvLocClassificationCustom
4 | else
5 | // template located in layouts folder
6 | +editClassificationPage
7 |
--------------------------------------------------------------------------------
/client/templates/application/inventory/locations/stockLevels.jade:
--------------------------------------------------------------------------------
1 | template(name='stockLevelsPage')
2 | if customTemplate
3 | +stockLevelsPageCustom
4 | else
5 | .container2
6 | br
7 | fieldset
8 | legend Inventory Levels
9 | .row
10 | .section.items
11 | if Template.subscriptionsReady
12 | +reactiveTable collection=inventoryItems settings=settings class='table striped'
13 | else
14 | +spinner
15 | +fabBackResetSubmit
16 |
17 | template(name='stockLevelsModal')
18 | .row
19 | .input-field.col.s12.m6.l3
20 | input#stockLevelsQty.validate(placeholder='Enter level', type='number' value=stockDetails.stockLevel)
21 | label.active(for='stockLevelsQty') New Stock Level
22 | .input-field.col.s12.m6.l3
23 | input#reorderLevelsQty.validate(placeholder='Enter level', type='number' value=stockDetails.reorderLevel)
24 | label.active(for='reorderLevelsQty') New Reorder Level
25 | .input-field.col.s12.m6.l3
26 | input#newOrderQty.validate(placeholder='Enter quantity', type='number' value=stockDetails.orderQuantity)
27 | label.active(for='newOrderQty') New Order Quantity
28 |
29 | template(name='stockMoveModal')
30 | .row
31 | .input-field.col.s12.m6.l3
32 | input#moveStockQty.validate(placeholder='Enter quantity to move', type='number' max=stockDetails.stockLevel min='0')
33 | label.active(for='moveStockQty') Qty Stock Moved
34 | .col.s12.m6.l9
35 | = invLocDetails.text
36 | +treeView nodeID=invLocDetails.invLocID nodeText=invLocDetails.text
37 |
38 | template(name='woIssueModal')
39 | .row
40 | .input-field.col.s12.m6.l3
41 | input#issueStockQty.validate(placeholder='Enter quantity to issue', type='number' max=stockDetails.stockLevel min='0')
42 | label.active(for='issueStockQty') Qty Stock Issued
43 | .col.s12.m6.l9
44 | = woDetails.text
45 | +reactiveTable collection='workorders-list' settings=settings class='table striped'
46 |
47 |
--------------------------------------------------------------------------------
/client/templates/application/inventory/locations/viewInvLoc.coffee:
--------------------------------------------------------------------------------
1 | Template.viewInvLocPage.onRendered ->
2 | $(".dropdown-button").dropdown()
3 | $('.tooltipped').tooltip {delay: 50}
4 |
5 | Template.viewInvLocPage.onDestroyed ->
6 | $('.tooltipped').tooltip 'remove'
7 |
8 | Template.viewInvLocPage.helpers
9 | customTemplate: -> Customisations.viewInvLoc
10 | currentDoc: -> Collections.Bins.Current
11 | txtClassificationID: -> Classification.findOne(_id: Collections.Bins.Current.classificationID ).text
12 |
13 | Template.viewInvLocPage.events
14 | 'click .viewInvLoc .btnEdit': ->
15 | if (Session.get('currentID').toString() == '#')
16 | alert 'No item selected!'
17 | else
18 | FlowRouter.go '/inventory/locations/edit-location'
19 |
--------------------------------------------------------------------------------
/client/templates/application/inventory/locations/viewInvLoc.jade:
--------------------------------------------------------------------------------
1 | template(name='viewInvLocPage')
2 | if customTemplate
3 | +viewInvLocPageCustom
4 | else
5 | .flow-text.container2.viewInvLoc
6 | +fabBackCopyEdit
7 | br
8 | fieldset
9 | legend View Inventory Location
10 | if Template.subscriptionsReady
11 | .row
12 | +smlField item=currentDoc._id label='System ID'
13 | +smlField item=currentDoc.referenceID label='Reference ID'
14 | +smlField item=currentDoc.status label='Status'
15 | +smlField item=txtClassificationID label='Inventory Location Classification'
16 | +lgeField item=currentDoc.text label='Title'
17 | +lgeField item=currentDoc.description label='Description'
18 | else
19 | +spinner
20 |
--------------------------------------------------------------------------------
/client/templates/application/inventory/locations/viewInvLocClass.coffee:
--------------------------------------------------------------------------------
1 | Template.viewInvLocClassificationPage.onRendered ->
2 | $(".dropdown-button").dropdown()
3 | $('.tooltipped').tooltip {delay: 50}
4 |
5 | Template.viewInvLocClassificationPage.onDestroyed ->
6 | $('.tooltipped').tooltip 'remove'
7 |
8 | Template.viewInvLocClassificationPage.helpers
9 | customTemplate: -> Customisations.viewInvLocClassification
10 | viewDoc: ->
11 | Collections.Classification.Current = Classification.findOne {'id':Session.get('currentClassID').toString()}
12 | return Collections.Classification.Current
13 |
14 | Template.viewInvLocClassificationPage.events
15 | 'click .viewInvLocClassification .btnEdit': ->
16 | if (Session.get('currentClassID').toString() == '#')
17 | alert 'No classification selected!'
18 | else
19 | FlowRouter.go '/inventory/locations/edit-classification'
20 |
--------------------------------------------------------------------------------
/client/templates/application/inventory/locations/viewInvLocClass.jade:
--------------------------------------------------------------------------------
1 | template(name='viewInvLocClassificationPage')
2 | if customTemplate
3 | +viewInvLocClassificationCustom
4 | else
5 | // template located in layouts folder
6 | +viewClassificationPage classDoc=viewDoc
7 |
--------------------------------------------------------------------------------
/client/templates/application/inventory/locations/viewInvLocClasses.coffee:
--------------------------------------------------------------------------------
1 | Template.viewInvLocClassificationsPage.onCreated ->
2 | # Set Navbar so Resources highlighted
3 | $('#header1DesktopUL li').removeClass 'active'
4 | $('#header1DesktopUL li').eq(0).addClass 'active'
5 | Session.set 'treeviewData', 'invloc-classification'
6 |
7 | Template.viewInvLocClassificationsPage.onRendered ->
8 | $(".dropdown-button").dropdown()
9 | $('.tooltipped').tooltip {delay: 50}
10 |
11 | Template.viewInvLocClassificationsPage.onDestroyed ->
12 | $('.tooltipped').tooltip 'remove'
13 |
14 | Template.viewInvLocClassificationsPage.helpers
15 | customTemplate: -> Customisations.viewInvLocClassifications
16 | classificationDetails: -> Classification.findOne {_id: Session.get('currentClassID').toString() }
17 |
--------------------------------------------------------------------------------
/client/templates/application/inventory/locations/viewInvLocClasses.jade:
--------------------------------------------------------------------------------
1 | template(name='viewInvLocClassificationsPage')
2 | if customTemplate
3 | +viewInvLocClassificationsPageCustom
4 | else
5 | .container
6 | .row
7 | div.viewClassifications
8 | // template located in layouts folder
9 | +viewClassificationsPage type='inventory/locations'
10 | +treeView nodeID=classificationDetails.classificationID nodeText=classificationDetails.text
11 |
--------------------------------------------------------------------------------
/client/templates/application/pm/assetGroups.coffee:
--------------------------------------------------------------------------------
1 | Template.assetGroupsPage.onRendered ->
2 | $(".dropdown-button").dropdown()
3 | $('.tooltipped').tooltip {delay: 50}
4 |
5 | Template.assetGroupsPage.onDestroyed ->
6 | $('.tooltipped').tooltip 'remove'
7 |
8 | Template.assetGroupsPage.helpers
9 | customTemplate: -> Customisations.assetGroups
10 | assetGroupsCollection: -> Assetgroups
11 | settings: ->
12 | return {
13 | rowsPerPage: 10
14 | showFilter: true
15 | fields: [
16 | { key: '_id', label: ' System ID' }
17 | { key: 'groupCreatedBy', label: ' Created By' }
18 | { key: 'groupText', label: ' Title' }
19 | { key: '', label: 'View/Edit/Delete', tmpl: Template.rtViewEditDelete }
20 | ]
21 | }
22 |
23 | Template.assetGroupsPage.events
24 | 'click .assetGroups .btnView': (event) ->
25 | Collections.Assetgroups.Current = this
26 | Session.set 'currentDoc', this
27 | FlowRouter.go '/pm/view-group'
28 | 'click .assetGroups .btnEdit': (event) ->
29 | Collections.Assetgroups.Current = this
30 | Session.set 'currentDoc', this
31 | FlowRouter.go '/pm/edit-group'
32 | 'click .assetGroups .btnDelete': (event) ->
33 | Collections.Assetgroups.Current = this
34 | MaterializeModal.display
35 | bodyTemplate: 'assetGroupsDelete'
36 | title: 'Delete Asset Group!'
37 | submitLabel: 'Delete'
38 | closeLabel: 'Cancel'
39 | callback: (error, response) ->
40 | if error
41 | console.error error
42 | else
43 | if response.submit
44 | Meteor.call 'deleteAssetGroup', Collections.Assetgroups.Current._id, (error, result) ->
45 | if error
46 | toast 'error', error
47 | else
48 | toast 'success', result
49 | return
50 | return
51 |
--------------------------------------------------------------------------------
/client/templates/application/pm/assetGroups.jade:
--------------------------------------------------------------------------------
1 | template(name='assetGroupsPage')
2 | if customTemplate
3 | +assetGroupsPageCustom
4 | else
5 | .flow-text.container2
6 | br
7 | fieldset.assetGroups
8 | legend Asset Groups
9 | a(href='{{pathFor "../pm/create-group"}}')
10 | button.btn-floating.btn-large.waves-effect.waves-light.tooltipped(type='button', data-position='bottom', data-delay='50', data-tooltip='Create new asset group')
11 | i.fa.fa-file-o
12 | if Template.subscriptionsReady
13 | +reactiveTable collection=assetGroupsCollection settings=settings class='table striped'
14 | +fabBack
15 |
16 | template(name='assetGroupsDelete')
17 | h5.red-text Warning this will permanently delete the Asset Group!
18 | | This process cannot be undone.
19 |
--------------------------------------------------------------------------------
/client/templates/application/pm/createAssetGroup.coffee:
--------------------------------------------------------------------------------
1 | Template.createAssetGroupPage.onCreated ->
2 | this.assetArray = new ReactiveVar []
3 |
4 | Template.createAssetGroupPage.onRendered ->
5 | $(".dropdown-button").dropdown()
6 | $('.tooltipped').tooltip {delay: 50}
7 | dataTree()
8 |
9 | Template.createAssetGroupPage.onDestroyed ->
10 | $('.tooltipped').tooltip 'remove'
11 |
12 | Template.createAssetGroupPage.helpers
13 | customTemplate: -> Customisations.createAssetGroup
14 | assetGroupSchema: -> Schema.assetGroup
15 | assetGroupCreatedBy: -> Meteor.userId()
16 | assetArray: -> Template.instance().assetArray.get()
17 | assetArrayDetails: ->
18 | tempArray=[]
19 | temp = Template.instance().assetArray.get()
20 | for a in [0...temp.length]
21 | tempArray[a] = Locations.findOne {'id':temp[a]}
22 | return tempArray
23 | assetDetails: -> Locations.findOne {'id':Session.get('currentID').toString()}
24 | settings: ->
25 | return {
26 | rowsPerPage: 10
27 | showFilter: true
28 | fields: [
29 | { key: 'assetID', label: ' Asset ID' }
30 | { key: 'text', label: ' Asset Name' }
31 | { key: '', label: 'Delete', tmpl: Template.rtDelete }
32 | ]
33 | }
34 |
35 | Template.createAssetGroupPage.events
36 | 'click .createAssetGroup .btnAdd': (event, template) ->
37 | temp = template.assetArray.get()
38 | if temp.indexOf(Session.get('currentID').toString()) == -1
39 | temp.push Session.get('currentID').toString()
40 | template.assetArray.set temp
41 | toast 'success', 'Asset added'
42 | else
43 | toast 'error', 'Asset already added'
44 |
45 | 'click .createAssetGroup .btnDelete': (event, template) ->
46 | temp = template.assetArray.get()
47 | temp.splice(temp.indexOf(this._id), 1)
48 | template.assetArray.set temp
49 | toast 'success', 'Asset removed'
50 |
--------------------------------------------------------------------------------
/client/templates/application/pm/createAssetGroup.jade:
--------------------------------------------------------------------------------
1 | template(name='createAssetGroupPage')
2 | if customTemplate
3 | +createAssetGroupPageCustom
4 | else
5 | .container2
6 | br
7 | +autoForm schema=assetGroupSchema id='createAssetGroupPage' type='method' meteormethod='createAssetGroup'
8 | fieldset.createAssetGroup
9 | legend New Asset Group
10 | .row
11 | +afQuickField name='groupText'
12 | .row
13 | .divider.teal
14 | .section
15 | h6.teal-text Asset
16 | .row
17 | +afQuickField name='asset_IDs' value=assetArray type='hidden'
18 | +afQuickField name='groupCreatedBy' value=assetGroupCreatedBy type='hidden'
19 | +reactiveTable collection=assetArrayDetails settings=settings class='table striped'
20 | +treeViewAdd treeData=assetDetails
21 | +fabBackResetSubmit
22 |
--------------------------------------------------------------------------------
/client/templates/application/pm/editAssetGroup.coffee:
--------------------------------------------------------------------------------
1 | Template.editAssetGroupPage.onCreated ->
2 | self = this
3 | self.autorun ->
4 | self.subscribe 'singleAssetGroup', Session.get('currentDoc')._id.toString()
5 | this.assetArray = new ReactiveVar Assetgroups.findOne({_id: Session.get('currentDoc')._id.toString()}).asset_IDs
6 |
7 | Template.editAssetGroupPage.onRendered ->
8 | $(".dropdown-button").dropdown()
9 | dataTree()
10 | $('.tooltipped').tooltip {delay: 50}
11 |
12 | Template.editAssetGroupPage.onDestroyed ->
13 | $('.tooltipped').tooltip 'remove'
14 |
15 | Template.editAssetGroupPage.helpers
16 | customTemplate: -> Customisations.editAssetGroup
17 | assetGroupSchema: -> Schema.assetGroup
18 | viewDoc: -> Assetgroups.findOne({_id: Session.get('currentDoc')._id.toString()})
19 | assetArray: -> Template.instance().assetArray.get()
20 | assetArrayDetails: ->
21 | tempArray=[]
22 | temp = Template.instance().assetArray.get()
23 | for a in [0...temp.length]
24 | tempArray[a] = Locations.findOne {'id':temp[a]}
25 | tempArray
26 | assetDetails: -> Locations.findOne {'id':Session.get('currentID').toString()} # ID of current asset/location not the current Asset Group
27 | settings: ->
28 | return {
29 | rowsPerPage: 10
30 | showFilter: true
31 | fields: [
32 | { key: 'id', label: ' System ID' }
33 | { key: 'assetID', label: ' Asset ID' }
34 | { key: 'text', label: ' Asset Name' }
35 | { key: '', label: 'Delete', tmpl: Template.rtDelete }
36 | ]
37 | }
38 |
39 | Template.editAssetGroupPage.events
40 | # Click event from asset tree
41 | 'click .editAssetGroup .btnAdd': (event, template) ->
42 | temp = template.assetArray.get()
43 | if temp.indexOf(Session.get('currentID').toString()) == -1
44 | temp.push Session.get('currentID').toString()
45 | template.assetArray.set temp
46 | toast 'success', 'Asset added'
47 | else
48 | toast 'error', 'Asset already added'
49 | # Click event from reactive table
50 | 'click .editAssetGroup .btnDelete': (event, template) ->
51 | temp = template.assetArray.get()
52 | temp.splice(temp.indexOf(this._id), 1)
53 | template.assetArray.set temp
54 | toast 'success', 'Asset removed'
55 |
--------------------------------------------------------------------------------
/client/templates/application/pm/editAssetGroup.jade:
--------------------------------------------------------------------------------
1 | template(name='editAssetGroupPage')
2 | if customTemplate
3 | +editAssetGroupPageCustom
4 | else
5 | .container2
6 | br
7 | +autoForm schema=assetGroupSchema collection='Assetgroups' id='editAssetGroupPage' type='update' doc=viewDoc
8 | fieldset.editAssetGroup.active
9 | legend Edit Asset Group
10 | if Template.subscriptionsReady
11 | .row.active
12 | +afQuickField name='groupText'
13 | .row
14 | .divider.teal
15 | .section
16 | h6.teal-text Asset
17 | .row
18 | +afQuickField name='asset_IDs' value=assetArray type='hidden'
19 | +afQuickField name='groupCreatedBy' value=assetGroupCreatedBy type='hidden'
20 | +reactiveTable collection=assetArrayDetails settings=settings class='table striped'
21 | else
22 | +spinner
23 | +treeViewAdd treeData=assetDetails
24 | +fabBackResetSubmit
25 |
--------------------------------------------------------------------------------
/client/templates/application/pm/pm.coffee:
--------------------------------------------------------------------------------
1 | Template.pmPage.onCreated ->
2 | # Set Navbar so PM highlighted
3 | $('#header1DesktopUL li').removeClass 'active'
4 | $('#header1DesktopUL li').eq(2).addClass 'active'
5 |
6 | Template.pmPage.onRendered ->
7 | $(".dropdown-button").dropdown()
8 | $('.tooltipped').tooltip {delay: 50}
9 |
10 | Template.pmPage.onDestroyed ->
11 | $('.tooltipped').tooltip 'remove'
12 |
13 | Template.pmPage.helpers
14 | customTemplate: -> Customisations.pm
15 |
--------------------------------------------------------------------------------
/client/templates/application/pm/pm.jade:
--------------------------------------------------------------------------------
1 | template(name='pmPage')
2 | if customTemplate
3 | +pmPageCustom
4 | else
5 | .container
6 | h1.icon-page Planned Maintenance
7 | .row.flow-text.center-align
8 | .col.s12.m6.l3
9 | a.waves-effect.waves-dark.icon-page(href='{{pathFor "pm/view-groups"}}')
10 | i.fa-5x.fa.fa-cogs
11 | br
12 | br
13 | | Asset Groups
14 | br
15 | br
16 | .col.s12.m6.l3
17 | a.waves-effect.waves-dark.icon-page(href='{{pathFor "pm/view-pms"}}')
18 | i.fa-5x.fa.fa-calendar
19 | br
20 | br
21 | | PM Plans
22 | br
23 | br
24 |
--------------------------------------------------------------------------------
/client/templates/application/pm/viewAssetGroup.coffee:
--------------------------------------------------------------------------------
1 | Template.viewAssetGroupPage.onCreated ->
2 | self = this
3 | self.autorun ->
4 | self.subscribe 'singleAssetGroup', Session.get('currentDoc')._id.toString()
5 |
6 | Template.viewAssetGroupPage.onRendered ->
7 | $(".dropdown-button").dropdown()
8 | $('.tooltipped').tooltip {delay: 50}
9 |
10 | Template.viewAssetGroupPage.onDestroyed ->
11 | $('.tooltipped').tooltip 'remove'
12 |
13 | Template.viewAssetGroupPage.helpers
14 | customTemplate: -> Customisations.viewAssetGroup
15 | groupText: -> Assetgroups.findOne({_id: Session.get('currentDoc')._id.toString()}).groupText
16 | assetArray: ->
17 | temp = Assetgroups.findOne({_id: Session.get('currentDoc')._id.toString()}).asset_IDs
18 | tempArray=[]
19 | for a in [0...temp.length]
20 | tempArray[a] = Locations.findOne {'id':temp[a]}
21 | tempArray
22 |
23 | settings: ->
24 | return {
25 | rowsPerPage: 10
26 | showFilter: true
27 | fields: [
28 | { key: 'assetID', label: ' Asset ID' }
29 | { key: 'text', label: ' Asset Name' }
30 | ]
31 | }
32 |
--------------------------------------------------------------------------------
/client/templates/application/pm/viewAssetGroup.jade:
--------------------------------------------------------------------------------
1 | template(name='viewAssetGroupPage')
2 | if customTemplate
3 | +viewAssetGroupPageCustom
4 | else
5 | .container2
6 | br
7 | fieldset
8 | legend View Asset Group
9 | a(href='{{pathFor "edit-group"}}')
10 | button.btn-floating.waves-effect.waves-light.tooltipped(type='button', data-delay='50', data-position='bottom', data-tooltip='Edit Group')
11 | i.fa.fa-edit
12 | .row
13 | =groupText
14 | .row
15 | +reactiveTable collection=assetArray settings=settings class='table striped'
16 | +fabBack
17 |
--------------------------------------------------------------------------------
/client/templates/application/pm/viewPM.coffee:
--------------------------------------------------------------------------------
1 | Template.viewPMPage.onCreated ->
2 | self = this
3 | self.autorun ->
4 | self.subscribe 'singlePM', Session.get('currentDoc')._id.toString()
5 |
6 | Template.viewPMPage.onRendered ->
7 | Session.set 'temp', true
8 |
9 | Template.viewPMPage.onRendered ->
10 | $(".dropdown-button").dropdown()
11 | $('.tooltipped').tooltip {delay: 50}
12 |
13 | Template.viewPMPage.onDestroyed ->
14 | $('.tooltipped').tooltip 'remove'
15 |
16 | Template.viewPMPage.helpers
17 | customTemplate: -> Customisations.viewPM
18 | pmSchema: -> Schema.pm
19 | viewDoc: ->
20 | Collections.PM.Current = PM.findOne ({ _id: Session.get('currentDoc')._id.toString() })
21 | console.log JSON.stringify Collections.PM.Current
22 | Collections.PM.Current
23 | settings: -> {
24 | rowsPerPage: 10
25 | showFilter: true
26 | fields: [
27 | { key: '_id', label: ' System ID' }
28 | { key: 'pmDescription', label: ' Title' }
29 | ]
30 | }
31 | assetGrpDetails: -> Collections.PM.Current.assetGroupDetails
32 | assetGrpList: -> Collections.PM.Current.assetGroupDetails.assetList
33 | agSettings: -> {
34 | rowsPerPage: 10
35 | showFilter: true
36 | fields: [
37 | { key: 'assetID', label: ' Asset ID' }
38 | { key: 'text', label: ' Title' }
39 | ]
40 | }
41 | safetyMthdDetails: -> Collections.PM.Current.safetyPlanDetails
42 | safetyMthdList: -> Collections.PM.Current.safetyPlanDetails.safetyMethod
43 | smSettings: -> {
44 | rowsPerPage: 10
45 | showFilter: false
46 | fields: [
47 | { key: 'id', label: ' Sequence ID' }
48 | { key: 'activity', label: ' Activity' }
49 | { key: 'hazards', label: ' Hazards' }
50 | { key: 'controls', label: ' Controls' }
51 | { key: 'responsible', label: ' Responsible' }
52 | ]
53 | }
54 | workPlanDetails: -> Collections.PM.Current.workPlanDetails
55 | workPlanList: -> Collections.PM.Current.workPlanDetails.workPlan
56 | wpSettings: -> {
57 | rowsPerPage: 10
58 | showFilter: false
59 | fields: [
60 | { key: 'id', label: ' Sequence ID' }
61 | { key: 'activity', label: ' Activity' }
62 | { key: 'text', label: ' Title' }
63 | { key: 'estimatedTime', label: ' Est Time' }
64 | { key: 'trade', label: ' Trade' }
65 | { key: 'tradeLevel', label: ' Trade Level' }
66 | ]
67 | }
68 |
--------------------------------------------------------------------------------
/client/templates/application/pm/viewPM.jade:
--------------------------------------------------------------------------------
1 | template(name='viewPMPage')
2 | if customTemplate
3 | +viewPMPageCustom
4 | else
5 | .flow-text.container2
6 | br
7 | fieldset.viewPM
8 | legend View PM Plan
9 | if Template.subscriptionsReady
10 | .row
11 | .section
12 | h6.teal-text PM Details
13 | =viewDoc.pmDescription
14 | .row
15 | .divider.teal
16 | .section
17 | h6.teal-text Asset Group
18 | =assetGrpDetails.groupText
19 | +reactiveTable collection=assetGrpList settings=agSettings class='table striped'
20 | .row
21 | .divider.teal
22 | .section
23 | h6.teal-text Safety Method
24 | =safetyMthdDetails.text
25 | +reactiveTable collection=safetyMthdList settings=smSettings class='table striped'
26 | .row
27 | .divider.teal
28 | .section
29 | h6.teal-text Work Plan
30 | =workPlanDetails.text
31 | +reactiveTable collection=workPlanList settings=wpSettings class='table striped'
32 | else
33 | +spinner
34 | +fabBack
35 |
--------------------------------------------------------------------------------
/client/templates/application/pm/viewPMs.coffee:
--------------------------------------------------------------------------------
1 | Template.viewPMsPage.onRendered ->
2 | $(".dropdown-button").dropdown()
3 | $('.tooltipped').tooltip {delay: 50}
4 |
5 | Template.viewPMsPage.onDestroyed ->
6 | $('.tooltipped').tooltip 'remove'
7 |
8 | Template.viewPMsPage.helpers
9 | customTemplate: -> Customisations.viewPMs
10 | collectionPM: -> PM
11 | settings: -> {
12 | rowsPerPage: 10
13 | showFilter: true
14 | fields: [
15 | { key: '_id', label: ' System ID' }
16 | { key: 'userDetails.profile.firstName', label: ' First Name ' }
17 | { key: 'userDetails.profile.lastName', label: ' Last Name' }
18 | { key: 'assetGroupDetails.groupText', label: ' Asset Group' }
19 | { key: 'pmDescription', label: ' PM Description' }
20 | { key: '', label: 'View/Edit/Delete', tmpl: Template.rtViewEditDelete }
21 | { key: '', label: 'Activate', tmpl: Template.viewPMsActivate }
22 | ]
23 | }
24 |
25 | Template.viewPMsPage.events
26 | 'click .viewPMs .btnView': (event) ->
27 | Session.set 'currentDoc', PM.findOne {_id: this._id}
28 | FlowRouter.go '/pm/view-pm'
29 |
30 | 'click .viewPMs .btnEdit': (event) ->
31 | Session.set 'currentDoc', PM.findOne {_id: this._id}
32 | FlowRouter.go '/pm/edit-pm'
33 |
34 | 'click .viewPMs .btnDelete': (event) ->
35 | Collections.PM.CurrentID = this._id
36 | MaterializeModal.display
37 | bodyTemplate: 'viewPMsDelete'
38 | title: 'Delete PM!'
39 | submitLabel: 'Delete'
40 | closeLabel: 'Cancel'
41 | callback: (error, response) ->
42 | if error
43 | console.error error
44 | else
45 | if response.submit
46 | Meteor.call 'deletePM', Collections.PM.CurrentID, (error, result) ->
47 | if error
48 | toast 'error', error
49 | else
50 | toast 'success', result
51 | return
52 | return
53 |
54 | 'click .viewPMs .btnStart': (event) ->
55 | Collections.PM.Current = PM.findOne {_id: this._id}
56 | Session.set 'currentDoc', Collections.PM.Current
57 | FlowRouter.go '/pm/activate-pm'
58 |
--------------------------------------------------------------------------------
/client/templates/application/pm/viewPMs.jade:
--------------------------------------------------------------------------------
1 | template(name='viewPMsPage')
2 | if customTemplate
3 | +viewPMsPageCustom
4 | else
5 | .container2
6 | br
7 | fieldset.viewPMs
8 | legend View PM Plans
9 | a(href='{{pathFor "create-pm"}}')
10 | button.btn-floating.waves-effect.waves-light.tooltipped(type='button', data-delay='50', data-position='bottom', data-tooltip='Create PM')
11 | i.fa.fa-plus
12 | .row
13 | if Template.subscriptionsReady
14 | +reactiveTable collection=collectionPM settings=settings class='table striped'
15 | else
16 | +spinner
17 | +fabBack
18 |
19 | template(name='viewPMsActivate')
20 | button.btn-floating.waves-effect.waves-light.tooltipped.green.btnStart(type='button', data-delay='50', data-position='bottom', data-tooltip='Activate PM')
21 | i.fa.fa-clock-o
22 |
23 | template(name='viewPMsDelete')
24 | h5.red-text Warning this will permanently delete the PM and all work history!
25 | | This process cannot be undone. Please consider making PM inactive instead.
26 |
--------------------------------------------------------------------------------
/client/templates/application/procurement/companies/createCompany.coffee:
--------------------------------------------------------------------------------
1 | Template.createCompanyPage.onRendered ->
2 | $(".dropdown-button").dropdown()
3 | $('.tooltipped').tooltip {delay: 50}
4 |
5 | Template.createCompanyPage.onDestroyed ->
6 | $('.tooltipped').tooltip 'remove'
7 |
8 | Template.createCompanyPage.helpers
9 | formSchema: -> Schema.companies
10 | customTemplate: -> Customisations.createCompany
11 | classID: -> Session.get 'currentClassID'
12 | txtClassificationID: -> Classification.findOne(Session.get('currentClassID').toString()).text
13 |
14 | Template.createCompanyPage.events
15 | 'click .firstRow .btnAdd': (event, template) ->
16 | MaterializeModal.confirm
17 | title: 'Select Company Classification'
18 | bodyTemplate: "createCompanyModal"
19 |
20 | Template.createCompanyModal.onRendered ->
21 | tempData = Classification.find(type: 'company-classification').fetch()
22 | dataTree(tempData, 'classification')
23 |
24 | Template.createCompanyModal.helpers
25 | classificationDetails: -> Classification.findOne(_id: Session.get('currentClassID').toString())
26 |
--------------------------------------------------------------------------------
/client/templates/application/procurement/companies/createCompanyClass.coffee:
--------------------------------------------------------------------------------
1 | Template.createCompanyClassificationPage.helpers
2 | customTemplate: -> Customisations.createCompanyClassification
3 |
--------------------------------------------------------------------------------
/client/templates/application/procurement/companies/createCompanyClass.jade:
--------------------------------------------------------------------------------
1 | template(name='createCompanyClassificationPage')
2 | if customTemplate
3 | +createCompanyClassificationCustom
4 | else
5 | // template located in layouts folder
6 | +createClassificationPage classificationType='company-classification'
7 |
--------------------------------------------------------------------------------
/client/templates/application/procurement/companies/deleteCompany.coffee:
--------------------------------------------------------------------------------
1 | Template.deleteCompanyPage.onRendered ->
2 | $(".dropdown-button").dropdown()
3 | $('.tooltipped').tooltip {delay: 50}
4 |
5 | Template.deleteCompanyPage.onDestroyed ->
6 | $('.tooltipped').tooltip 'remove'
7 |
8 | Template.deleteCompanyPage.helpers
9 | customTemplate: -> Customisations.deleteCompany
10 | textDoc: -> (Items.findOne {'id':Session.get('currentID').toString()}).text
11 |
12 | Template.deleteCompanyPage.events
13 | 'click .deleteCompany .btnDelete': (event) ->
14 | temp = Items.findOne {'parent':Session.get('currentID').toString()}
15 | if temp
16 | alert 'You cannot delete an item that has children!'
17 | else
18 | Meteor.call 'deleteCompany', Session.get('currentID').toString(), (error, result) ->
19 | if error
20 | toast 'error', error
21 | else
22 | toast 'success', result
23 | return
24 | FlowRouter.go history.back()
25 |
--------------------------------------------------------------------------------
/client/templates/application/procurement/companies/deleteCompany.jade:
--------------------------------------------------------------------------------
1 | template(name='deleteCompanyPage')
2 | if customTemplate
3 | +deleteCompanyPageCustom
4 | else
5 | .flow-text.deleteCompany
6 | if Template.subscriptionsReady
7 | .row
8 | br
9 | h1.red-text
10 | |Delete
11 | = textDoc
12 | |?
13 | h2
14 | | Warning this will permanently delete
15 | = textDoc
16 | |!
17 | | This will also affect any other documents that refer to
18 | = textDoc
19 | |.
20 | br
21 | div
22 | button.btn.waves-effect.waves-light.red.btnDelete Delete permanently
23 | a(href="{{pathFor '../inventory/items/view-items'}}")
24 | button.btn.waves-effect.waves-light(type='button')
25 | i.material-icons skip_previous
26 | | Back to safety
27 |
--------------------------------------------------------------------------------
/client/templates/application/procurement/companies/deleteCompanyClass.coffee:
--------------------------------------------------------------------------------
1 | Template.deleteCompanyClassificationPage.onRendered ->
2 | $(".dropdown-button").dropdown()
3 | $('.tooltipped').tooltip {delay: 50}
4 |
5 | Template.deleteCompanyClassificationPage.onDestroyed ->
6 | $('.tooltipped').tooltip 'remove'
7 |
8 | Template.deleteCompanyClassificationPage.helpers
9 | customTemplate: -> Customisations.deleteCompanyClassification
10 | textDoc: -> Classification.findOne({'id':Session.get('currentClassID').toString()}).text
11 |
--------------------------------------------------------------------------------
/client/templates/application/procurement/companies/deleteCompanyClass.jade:
--------------------------------------------------------------------------------
1 | template(name='deleteCompanyClassificationPage')
2 | if customTemplate
3 | +deleteCompanyClassificationCustom
4 | else
5 | // template located in layouts folder
6 | +deleteClassificationPage doc=textDoc
7 |
--------------------------------------------------------------------------------
/client/templates/application/procurement/companies/editCompany.coffee:
--------------------------------------------------------------------------------
1 | Template.editCompanyPage.onCreated ->
2 | this.assetClassID = new ReactiveVar
3 |
4 | Template.editCompanyPage.onRendered ->
5 | $(".dropdown-button").dropdown()
6 | $('.tooltipped').tooltip {delay: 50}
7 |
8 | Template.editCompanyPage.onDestroyed ->
9 | $('.tooltipped').tooltip 'remove'
10 |
11 | Template.editCompanyPage.helpers
12 | formSchema: -> Schema.companies
13 | customTemplate: -> Customisations.editCompany
14 | currentDoc: -> Session.get 'currentDoc'
15 | classID: -> Session.get 'currentClassID'
16 | txtClassificationID: -> Classification.findOne(Session.get('currentClassID').toString()).text
17 |
18 | Template.editCompanyPage.events
19 | 'click .firstRow .btnAdd': (event, template) ->
20 | MaterializeModal.confirm
21 | title: 'Select Asset Classification'
22 | bodyTemplate: "modaleditCompanyPage"
23 |
24 | #------------------- Modal -------------------------------------
25 |
26 | Template.modaleditCompanyPage.onRendered ->
27 | tempData = Classification.find(type: 'company-classification').fetch()
28 | dataTree(tempData, 'classification')
29 |
30 | Template.modaleditCompanyPage.helpers
31 | classificationDetails: -> Classification.findOne {_id:Session.get 'currentClassID'}
32 |
--------------------------------------------------------------------------------
/client/templates/application/procurement/companies/editCompanyClass.coffee:
--------------------------------------------------------------------------------
1 | Template.editCompanyClassificationPage.onRendered ->
2 | $(".dropdown-button").dropdown()
3 | $('.tooltipped').tooltip {delay: 50}
4 |
5 | Template.editCompanyClassificationPage.onDestroyed ->
6 | $('.tooltipped').tooltip 'remove'
7 |
8 | Template.editCompanyClassificationPage.helpers
9 | customTemplate: -> Customisations.editCompanyClassification # user customised template if applicable
10 |
--------------------------------------------------------------------------------
/client/templates/application/procurement/companies/editCompanyClass.jade:
--------------------------------------------------------------------------------
1 | template(name='editCompanyClassificationPage')
2 | if customTemplate
3 | +editCompanyClassificationCustom
4 | else
5 | // template located in layouts folder
6 | +editClassificationPage
7 |
--------------------------------------------------------------------------------
/client/templates/application/procurement/companies/viewCompanies.coffee:
--------------------------------------------------------------------------------
1 | Template.viewCompaniesPage.onRendered ->
2 | $(".dropdown-button").dropdown()
3 | $('.tooltipped').tooltip {delay: 50}
4 |
5 | Template.viewCompaniesPage.onDestroyed ->
6 | $('.tooltipped').tooltip 'remove'
7 |
8 | Template.viewCompaniesPage.helpers
9 | customTemplate: -> Customisations.viewCompanies
10 | rtCollection: -> Companies
11 | settings: -> {
12 | rowsPerPage: 10
13 | showFilter: true
14 | fields: [
15 | { key: '_id', label: ' System ID' }
16 | { key: 'company_id', label: ' Company ID' }
17 | { key: 'type', label: ' Type' }
18 | { key: 'referenceID', label: ' Reference ID' }
19 | { key: 'status', label: ' Status' }
20 | { key: 'name', label: ' Company Name' }
21 | { key: 'tradingName', label: ' Trading Name' }
22 | { key: 'companyNumber', label: ' Reg Number' }
23 | { key: '', label: 'View/Edit/Delete', tmpl: Template.rtViewEditDelete }
24 | ]
25 | }
26 |
27 | Template.viewCompaniesPage.events
28 | 'click .viewCompanies .btnView': (event) ->
29 | Session.set 'currentDoc', Companies.findOne {_id: this._id}
30 | Session.set 'currentClassID', ''
31 | FlowRouter.go '/procurement/company/view-company'
32 |
33 | 'click .viewCompanies .btnEdit': (event) ->
34 | Session.set 'currentDoc', Companies.findOne {_id: this._id}
35 | Session.set 'currentClassID', ''
36 | FlowRouter.go '/procurement/company/edit-company'
37 |
38 | 'click .viewCompanies .btnDelete': (event) ->
39 | Collections.Companies.CurrentID = this._id
40 | MaterializeModal.display
41 | bodyTemplate: 'viewCompaniesDelete'
42 | title: 'Delete Company!'
43 | submitLabel: 'Delete'
44 | closeLabel: 'Cancel'
45 | callback: (error, response) ->
46 | if error
47 | console.error error
48 | else
49 | if response.submit
50 | Meteor.call 'deleteCompany', Collections.Companies.CurrentID, (error, result) ->
51 | if error
52 | toast 'error', error
53 | else
54 | toast 'success', result
55 | return
56 | return
57 |
--------------------------------------------------------------------------------
/client/templates/application/procurement/companies/viewCompanies.jade:
--------------------------------------------------------------------------------
1 | template(name='viewCompaniesPage')
2 | if customTemplate
3 | +viewCompaniesPageCustom
4 | else
5 | .container2
6 | br
7 | fieldset.viewCompanies
8 | legend View Companies
9 | a(href='{{pathFor "create-company"}}')
10 | button.btn-floating.waves-effect.waves-light.tooltipped(type='button', data-delay='50', data-position='bottom', data-tooltip='Create Company')
11 | i.fa.fa-plus
12 | .row
13 | if Template.subscriptionsReady
14 | +reactiveTable collection=rtCollection settings=settings class='table striped'
15 | else
16 | +spinner
17 | +fabBack
18 |
19 | template(name='viewCompaniesDelete')
20 | h5.red-text Warning this will permanently delete the company!
21 | | This process cannot be undone.
22 |
--------------------------------------------------------------------------------
/client/templates/application/procurement/companies/viewCompany.coffee:
--------------------------------------------------------------------------------
1 | Template.viewCompanyPage.onRendered ->
2 | $(".dropdown-button").dropdown()
3 | $('.tooltipped').tooltip {delay: 50}
4 |
5 | Template.viewCompanyPage.onDestroyed ->
6 | $('.tooltipped').tooltip 'remove'
7 |
8 | Template.viewCompanyPage.helpers
9 | customTemplate: -> Customisations.viewCompany
10 | currentDoc: -> Session.get 'currentDoc'
11 | txtClassificationID: -> Classification.findOne(_id: Session.get('currentDoc').classificationID ).text
12 |
13 | Template.viewCompanyPage.events
14 | 'click .viewCompany .btnEdit': ->
15 | if (Session.get('currentID').toString() == '#')
16 | alert 'No company selected!'
17 | else
18 | FlowRouter.go '/company/edit-company'
19 |
--------------------------------------------------------------------------------
/client/templates/application/procurement/companies/viewCompany.jade:
--------------------------------------------------------------------------------
1 | template(name='viewCompanyPage')
2 | if customTemplate
3 | +viewCompanyPageCustom
4 | else
5 | .flow-text.container2.viewCompany
6 | +fabBack
7 | br
8 | fieldset
9 | legend View Item
10 | if Template.subscriptionsReady
11 | .row
12 | +smlField item=currentDoc._id label='System ID'
13 | +smlField item=currentDoc.company_id label='Company ID'
14 | +smlDateField item=currentDoc.createdDate label='Created Date'
15 | +smlField item=txtClassificationID label='Item Classification'
16 | +smlField item=currentDoc.type label='Type'
17 | +smlField item=currentDoc.referenceID label='Reference ID'
18 | +smlField item=currentDoc.status label='Status'
19 | +smlField item=currentDoc.name label='Company Name'
20 | +smlField item=currentDoc.tradingName label='Trading Name'
21 | +smlField item=currentDoc.companyNumber label='Company registration number'
22 | +smlField item=currentDoc.taxNumber label='Tax registration number'
23 | .row
24 | +lgeField item=currentDoc.text label='Title'
25 | +lgeField item=currentDoc.description label='Description'
26 | .row
27 | .divider.teal
28 | .section
29 | h6.teal-text Contact
30 | +smlField item=currentDoc.email label='Email Address'
31 | +smlField item=currentDoc.website label='Website'
32 | +smlField item=currentDoc.phone label='Phone Number'
33 | +smlField item=currentDoc.fax label='Fax Number'
34 | .row
35 | .divider.teal
36 | .section
37 | h6.teal-text Street Address
38 | +lgeField item=currentDoc.streetAddress label='Address'
39 | +smlField item=currentDoc.streetCity label='City'
40 | +smlField item=currentDoc.streetState label='State'
41 | +smlField item=currentDoc.streetCountry label='Country'
42 | +smlField item=currentDoc.streetZip label='Zip Post Code'
43 | .row
44 | .divider.teal
45 | .section
46 | h6.teal-text Postal Address
47 | +lgeField item=currentDoc.postalAddress label='Postal Address'
48 | +smlField item=currentDoc.postalCity label='City'
49 | +smlField item=currentDoc.postalState label='State'
50 | +smlField item=currentDoc.postalCountry label='Country'
51 | +smlField item=currentDoc.postalZip label='Zip Post Code'
52 |
53 | else
54 | +spinner
55 |
--------------------------------------------------------------------------------
/client/templates/application/procurement/companies/viewCompanyClass.coffee:
--------------------------------------------------------------------------------
1 | Template.viewCompanyClassificationPage.onRendered ->
2 | $(".dropdown-button").dropdown()
3 | $('.tooltipped').tooltip {delay: 50}
4 |
5 | Template.viewCompanyClassificationPage.onDestroyed ->
6 | $('.tooltipped').tooltip 'remove'
7 |
8 | Template.viewCompanyClassificationPage.helpers
9 | customTemplate: -> Customisations.viewCompanyClassification
10 | viewDoc: ->
11 | Collections.Classification.Current = Classification.findOne {'id':Session.get('currentClassID').toString()}
12 | return Collections.Classification.Current
13 |
14 | Template.viewCompanyClassificationPage.events
15 | 'click .viewCompanyClassification .btnEdit': ->
16 | if (Session.get('currentClassID').toString() == '#')
17 | alert 'No classification selected!'
18 | else
19 | FlowRouter.go '/inventory/item/edit-classification'
20 |
--------------------------------------------------------------------------------
/client/templates/application/procurement/companies/viewCompanyClass.jade:
--------------------------------------------------------------------------------
1 | template(name='viewCompanyClassificationPage')
2 | if customTemplate
3 | +viewCompanyClassificationCustom
4 | else
5 | // template located in layouts folder
6 | +viewClassificationPage classDoc=viewDoc
7 |
--------------------------------------------------------------------------------
/client/templates/application/procurement/companies/viewCompanyClasses.coffee:
--------------------------------------------------------------------------------
1 | Template.viewCompanyClassificationsPage.onCreated ->
2 | # Set Navbar so Resources highlighted
3 | $('#header1DesktopUL li').removeClass 'active'
4 | $('#header1DesktopUL li').eq(0).addClass 'active'
5 | Session.set 'treeviewData', 'company-classification'
6 |
7 | Template.viewCompanyClassificationsPage.onRendered ->
8 | $(".dropdown-button").dropdown()
9 | $('.tooltipped').tooltip {delay: 50}
10 |
11 | Template.viewCompanyClassificationsPage.onDestroyed ->
12 | $('.tooltipped').tooltip 'remove'
13 |
14 | Template.viewCompanyClassificationsPage.helpers
15 | customTemplate: -> Customisations.viewCompanyClassifications
16 | classificationDetails: -> Classification.findOne {_id: Session.get('currentClassID').toString() }
17 |
--------------------------------------------------------------------------------
/client/templates/application/procurement/companies/viewCompanyClasses.jade:
--------------------------------------------------------------------------------
1 | template(name='viewCompanyClassificationsPage')
2 | if customTemplate
3 | +viewCompanyClassificationsPageCustom
4 | else
5 | .container
6 | .row
7 | div.viewClassifications
8 | // template located in layouts folder
9 | +viewClassificationsPage type='procurement/company'
10 | +treeView nodeID=classificationDetails.classificationID nodeText=classificationDetails.text
11 |
--------------------------------------------------------------------------------
/client/templates/application/procurement/procurement.coffee:
--------------------------------------------------------------------------------
1 | Template.procurementPage.onCreated ->
2 | # Set Navbar so Procurement highlighted
3 | $('#header1DesktopUL li').removeClass 'active'
4 | $('#header1DesktopUL li').eq(5).addClass 'active'
5 |
6 | Template.procurementPage.onRendered ->
7 | $(".dropdown-button").dropdown()
8 | $('.tooltipped').tooltip {delay: 50}
9 |
10 | Template.procurementPage.onDestroyed ->
11 | $('.tooltipped').tooltip 'remove'
12 |
13 | Template.procurementPage.helpers
14 | customTemplate: -> Customisations.procurement
15 |
--------------------------------------------------------------------------------
/client/templates/application/procurement/procurement.jade:
--------------------------------------------------------------------------------
1 | template(name='procurementPage')
2 | if customTemplate
3 | +procurementPageCustom
4 | else
5 | .container
6 | h1.icon-page Procurement
7 | .row.flow-text.center-align
8 | .col.s12.m6.l3
9 | a.waves-effect.waves-dark.icon-page(href='{{pathFor "procurement/purchase/view-purchases"}}')
10 | i.fa-5x.fa.fa-shopping-cart
11 | br
12 | br
13 | | Purchases
14 | br
15 | br
16 | .col.s12.m6.l3
17 | a.waves-effect.waves-dark.icon-page(href='{{pathFor "procurement/company/view-companies"}}')
18 | i.fa-5x.fa.fa-building-o
19 | br
20 | br
21 | | Companies
22 | br
23 | br
24 | .col.s12.m6.l3
25 | a.waves-effect.waves-dark.icon-page(href='{{pathFor "procurement/company/view-classifications"}}')
26 | i.fa-5x.fa.fa-file-o
27 | br
28 | br
29 | | Company Classification
30 | br
31 | br
32 | .col.s12.m6.l3
33 | a.waves-effect.waves-dark.icon-page(href='#')
34 | i.fa-5x.fa.fa-money
35 | br
36 | br
37 | | Schedule of Rates
38 | br
39 | br
40 |
--------------------------------------------------------------------------------
/client/templates/application/procurement/purchasing/receiveGoods.jade:
--------------------------------------------------------------------------------
1 | template(name='receiveGoodsPage')
2 | if customTemplate
3 | +receiveGoodsPageCustom
4 | else
5 | .container2
6 | br
7 | fieldset
8 | legend Goods Received
9 | .row
10 | .section.items
11 | if Template.subscriptionsReady
12 | +reactiveTable collection=purchaseItems settings=settings class='table striped'
13 | else
14 | +spinner
15 | +fabBackResetSubmit
16 |
17 | template(name='receiveGoodsModal')
18 | .row
19 | .input-field.col.s12.m6.l3
20 | input#receiveGoodsQty.validate(placeholder='Enter quantity received', type='number')
21 | label.active(for='receiveGoodsQty') Qty Goods Received
22 | .col.s12.m6.l9
23 | = invLocText
24 | +treeView nodeID=invLocDetails.invLocID nodeText=invLocDetails.text
25 |
--------------------------------------------------------------------------------
/client/templates/application/procurement/purchasing/viewPurchase.coffee:
--------------------------------------------------------------------------------
1 | Template.viewPurchasePage.onRendered ->
2 | self = this
3 | self.autorun ->
4 | self.subscribe 'singlePurchase', Collections.Purchases.Current._id
5 |
6 | Template.viewPurchasePage.onRendered ->
7 | $(".dropdown-button").dropdown()
8 | $('.tooltipped').tooltip {delay: 50}
9 | Session.set 'currentDoc', {} # Requisition doc
10 |
11 | Template.viewPurchasePage.onDestroyed ->
12 | $('.tooltipped').tooltip 'remove'
13 |
14 | Template.viewPurchasePage.helpers
15 | customTemplate: -> Customisations.viewPurchase
16 | frmTitle: ->
17 | if Collections.Purchases.Current.status == '1'
18 | return 'View Purchase Requisition'
19 | else
20 | return 'View Purchase Order'
21 | editDoc: ->
22 | temp = Session.get 'currentDoc'
23 | if jQuery.isEmptyObject(temp)
24 | Session.set 'currentDoc', Purchases.findOne {_id: Collections.Purchases.Current._id }
25 | temp
26 | purchaseItems: -> Session.get('currentDoc').reqItems
27 | settings: -> ## Purchase Items
28 | return {
29 | rowsPerPage: 10
30 | showFilter: true
31 | fields: [
32 | { key: 'referenceID', label: ' Reference ID' }
33 | { key: 'text', label: ' Title' }
34 | { key: 'orderQty', label: ' Qty' }
35 | { key: 'stockUnits', hidden: true }
36 | { key: 'itemPrice', label: ' Price' }
37 | { key: 'excludesTax', label: ' Ex Tax', tmpl: Template.rtBoolean }
38 | { key: 'comments', label: ' Comments' }
39 | ]
40 | }
41 |
--------------------------------------------------------------------------------
/client/templates/application/procurement/purchasing/viewPurchases.coffee:
--------------------------------------------------------------------------------
1 | Template.viewPurchasesPage.onRendered ->
2 | $(".dropdown-button").dropdown()
3 | $('.tooltipped').tooltip {delay: 50}
4 |
5 | Template.viewPurchasesPage.onDestroyed ->
6 | $('.tooltipped').tooltip 'remove'
7 |
8 | Template.viewPurchasesPage.helpers
9 | purchases: -> Purchases.find {}
10 | spinner: ->
11 | MaterializeModal.loading
12 | nospinner: ->
13 | MaterializeModal.close
14 | numDocs: ->
15 | temp = Counts.get 'workorders-count'
16 | if temp > 1000
17 | FlowRouter.go '/work'
18 | toast 'error', ('Your query exceeds 1000 docs. ('+temp+')')
19 | else
20 | return temp
21 | customTemplate: -> Customisations.viewPeople
22 | settings: ->
23 | return {
24 | rowsPerPage: 10
25 | showFilter: true
26 | fields: [
27 | { key: '_id', hidden: true }
28 | { key: 'createdDate', label: ' Date Raised' }
29 | { key: 'status', label: ' Status' }
30 | { key: 'refID', label: ' Reference ID' }
31 | { key: 'billingDetails.text', label: ' Bill to' }
32 | { key: 'supplierDetails.text', label: ' Supplier' }
33 | { key: 'assetID', label: ' Asset ID' }
34 | { key: 'assetText', label: ' Asset' }
35 | { key: 'workID', label: ' Work Order ID' }
36 | { key: '', label: 'View/Edit/Receive/Delete', tmpl: Template.rtViewEditReceivedDelete }
37 | ]
38 | }
39 |
40 | Template.viewPurchasesPage.events
41 | 'click .btnReceived': (event) ->
42 | if this.status < 5
43 | MaterializeModal.error
44 | title: "Error"
45 | label: "Not a purchase order!"
46 | message: "Can only receive goods against an approved purchase order (status = 5)"
47 | else
48 | Collections.Purchases.Current = this
49 | FlowRouter.go '/procurement/purchase/receive-goods'
50 | 'click .viewPurchases .btnView': (event) ->
51 | Collections.Purchases.Current = this
52 | FlowRouter.go '/procurement/purchase/view-purchase'
53 | 'click .viewPurchases .btnEdit': (event) ->
54 | Collections.Purchases.Current = this
55 | FlowRouter.go '/procurement/purchase/edit-purchase'
56 | 'click .viewPurchases .btnDelete': (event) ->
57 | temp = this._id
58 | MaterializeModal.confirm
59 | title: 'Delete Document'
60 | label: 'Warning - Permanent Delete'
61 | message: 'You are about permanently delete a document. This cannot be reversed and may affect other documents that reference it.'
62 | callback: (error, response) ->
63 | if (response.submit)
64 | Meteor.call 'deletePurchase', temp, (error, result) ->
65 | if error
66 | toast 'error', error
67 | else
68 | toast 'success', result
69 |
--------------------------------------------------------------------------------
/client/templates/application/procurement/purchasing/viewPurchases.jade:
--------------------------------------------------------------------------------
1 | template(name='viewPurchasesPage')
2 | if customTemplate
3 | +viewPurchasesPageCustom
4 | else
5 | .flow-text.container2
6 | br
7 | fieldset.viewPurchases
8 | legend Purchases
9 | a(href='{{pathFor "create-purchase"}}')
10 | +frmBtnNew label='New Purchase Requisition'
11 | +reactiveTable collection='purchases-list' settings=settings class='table striped'
12 | +fabBack
13 |
--------------------------------------------------------------------------------
/client/templates/application/reports/reports.coffee:
--------------------------------------------------------------------------------
1 | Template.reportsPage.onCreated ->
2 | # Set Navbar so Reports highlighted
3 | $('#header1DesktopUL li').removeClass 'active'
4 | $('#header1DesktopUL li').eq(6).addClass 'active'
5 |
6 | Template.reportsPage.onRendered ->
7 | $(".dropdown-button").dropdown()
8 | $('.tooltipped').tooltip {delay: 50}
9 |
10 | Template.reportsPage.onDestroyed ->
11 | $('.tooltipped').tooltip 'remove'
12 |
13 | Template.reportsPage.helpers
14 | customTemplate: -> Customisations.reports
15 |
--------------------------------------------------------------------------------
/client/templates/application/reports/reports.jade:
--------------------------------------------------------------------------------
1 | template(name='reportsPage')
2 | if customTemplate
3 | +reportsPageCustom
4 | else
5 | .container
6 | h1 Welcome to Lightning Reports!
7 | br
8 | br
9 | .row.valign-wrapper
10 | .col.s12.m6.l3.valign
11 | a(href='#')
12 | img(src='Logo_D3.png')
13 | .col.s12.m6.l3.valign
14 | a(href='#')
15 | img(src='Birt-logo.png')
16 | br
17 | br
18 |
--------------------------------------------------------------------------------
/client/templates/application/resources/credentials.coffee:
--------------------------------------------------------------------------------
1 | Template.credentialsPage.onCreated ->
2 | self = this
3 | self.autorun -> self.subscribe 'singleUser',Collections.Users.Current._id
4 | Session.set 'currentDoc', Collections.Users.Current
5 |
6 | Template.credentialsPage.onRendered ->
7 | $(".dropdown-button").dropdown()
8 | $('.tooltipped').tooltip {delay: 50}
9 |
10 | Template.credentialsPage.onDestroyed ->
11 | $('.tooltipped').tooltip 'remove'
12 |
13 | Template.credentialsPage.helpers
14 | currentUser: -> Session.get 'currentDoc'
15 | professionsValue: -> Collections.Users.Current.professions
16 | tradesValue: -> Collections.Users.Current.trades
17 | customTemplate: -> Customisations.credentials
18 |
19 | Template.credentialsPage.events
20 | 'click .credentials .btnSubmit': (event) ->
21 | FlowRouter.go '/resources/view-people'
22 |
--------------------------------------------------------------------------------
/client/templates/application/resources/credentials.jade:
--------------------------------------------------------------------------------
1 | template(name='credentialsPage')
2 | if customTemplate
3 | +credentialsPageCustom
4 | else
5 | .flow-text.container2.credentials
6 | .form-group
7 | +autoForm id='editPeoplePage' collection='Meteor.users' doc=currentUser type='update'
8 | if Template.subscriptionsReady
9 | br
10 | fieldset
11 | legend Edit User Credentials and Records
12 | .row
13 | h6.teal-text Role
14 | .col.s12.m6.l3
15 | +afQuickField name='roles'
16 | .row
17 | .divider.teal
18 | .section
19 | .row
20 | h6.teal-text Database Access
21 | .col.s12.m6.l3
22 | +afQuickField name='databases' class='active'
23 | .row
24 | .divider.teal
25 | .section
26 | +afxArrayAdd title='Trade Qualifications' field='trades' item='trades' tip='Add Trade Qualification'
27 | .row
28 | .divider.teal
29 | .section
30 | +afxArrayAdd title='Academic Qualifications' field='professions' item='professions' tip='Add Academic Qualification'
31 | .row
32 | .divider.teal
33 | .section
34 | +afxArrayAdd title='Certifications' field='certifications' item='certifications' tip='Add Certifications'
35 | +fabBackResetSubmit
36 | else
37 | +spinner
38 |
--------------------------------------------------------------------------------
/client/templates/application/resources/editPeople.coffee:
--------------------------------------------------------------------------------
1 | Template.editPeoplePage.onCreated ->
2 | self = this
3 | self.autorun -> self.subscribe 'singleUser',Collections.Users.Current._id
4 |
5 | Template.editPeoplePage.onRendered ->
6 | $(".dropdown-button").dropdown()
7 | $('.tooltipped').tooltip {delay: 50}
8 |
9 | Template.editPeoplePage.onDestroyed ->
10 | $('.tooltipped').tooltip 'remove'
11 |
12 | Template.editPeoplePage.helpers
13 | currentUser: -> Collections.Users.Current
14 | professionsValue: -> Collections.Users.Current.professions
15 | tradesValue: -> Collections.Users.Current.trades
16 | customTemplate: -> Customisations.editPeople
17 |
18 | Template.editPeoplePage.events
19 | 'click .editPeople .btnSubmit': (event) ->
20 | FlowRouter.go '/resources/view-people'
21 |
--------------------------------------------------------------------------------
/client/templates/application/resources/editPeople.jade:
--------------------------------------------------------------------------------
1 | template(name='editPeoplePage')
2 | if customTemplate
3 | +editPeoplePageCustom
4 | else
5 | .flow-text.container2.editPeople
6 | +autoForm id='editPeoplePage' collection='Meteor.users' doc=currentUser type='update'
7 | +fabBackResetSubmit
8 | br
9 | if Template.subscriptionsReady
10 | fieldset.active
11 | legend Edit User Profile
12 | .row.z-depth-1
13 | .col.s12.m6.l3
14 | +afQuickField name='profile.firstName'
15 | .col.s12.m6.l3
16 | +afQuickField name='profile.lastName'
17 | .col.s12.m6.l3
18 | +afQuickField name='profile.cpyPosition'
19 | .col.s12.m6.l3
20 | +afQuickField name='profile.cpyName'
21 | .col.s12.m6.l3
22 | +afQuickField name='profile.cpyDiv'
23 | .col.s12.m6.l3
24 | +afQuickField name='profile.website'
25 | .col.s12.m6.l3
26 | +afQuickField name='profile.phone'
27 | .col.s12.m6.l3
28 | +afQuickField name='profile.mobile'
29 | .row
30 | .divider.teal
31 | .section
32 | .row
33 | h6.teal-text Email
34 | button.autoform-add-item.btn-floating.waves-effect.waves-light.teal(type='button', data-autoform-field='emails', data-position='bottom', data-tooltip='Add')
35 | i.fa.fa-plus
36 | +afEachArrayItem name='emails'
37 | .col.s12.m6.l3
38 | button.autoform-remove-item.btn-floating.waves-effect.waves-light.red(type='button', data-position='bottom', data-tooltip='Remove')
39 | i.fa.fa-trash
40 | +afQuickField name=this.name label=false
41 | else
42 | +spinner
43 |
--------------------------------------------------------------------------------
/client/templates/application/resources/viewPeople.coffee:
--------------------------------------------------------------------------------
1 | Template.viewPeoplePage.onCreated ->
2 | # Set Navbar so Resources highlighted
3 | $('#header1DesktopUL li').removeClass 'active'
4 | $('#header1DesktopUL li').eq(3).addClass 'active'
5 | self = this
6 | self.autorun ->
7 | self.subscribe 'directory'
8 |
9 | Template.viewPeoplePage.onRendered ->
10 | $(".dropdown-button").dropdown()
11 | $('.tooltipped').tooltip {delay: 50}
12 |
13 | Template.viewPeoplePage.onDestroyed ->
14 | $('.tooltipped').tooltip 'remove'
15 |
16 | Template.viewPeoplePage.helpers
17 | customTemplate: -> Customisations.viewPeople
18 | userEmail: -> this.emails[0].address
19 | userID: -> this._id
20 | userRole: -> this.roles[0]
21 | settings: ->
22 | return {
23 | rowsPerPage: 10
24 | showFilter: true
25 | fields: [
26 | { key: 'profile.firstName', label: ' First Name' }
27 | { key: 'profile.lastName', label: 'Last Name' }
28 | { key: 'profile.cpyName', label: 'Company' }
29 | { key: 'profile.cpyDiv', label: 'Division' }
30 | { key: 'emails.0.address', label: 'Email' }
31 | { key: 'roles.0', label: 'Role' }
32 | { key: 'location', label: 'Edit/Secure/Delete', tmpl: Template.editPerson }
33 | ]
34 | }
35 |
36 | Template.viewPeoplePage.events
37 | 'click .viewPeople .btnEach': (event) ->
38 | Collections.Users.Current = this
39 | FlowRouter.go '/resources/edit-people'
40 | 'click .viewPeople .btnEach2': (event) ->
41 | Collections.Users.Current = this
42 | FlowRouter.go '/resources/credentials'
43 | 'click .viewPeople .btnDelete': (event) ->
44 | Collections.Users.Current = this
45 | $('#viewPeoplePageModal').openModal()
46 | 'click .viewPeople .btnConfirm': (event) ->
47 | temp = Collections.Users.Current
48 | Meteor.call 'deleteUser', temp._id, (error, result) ->
49 | if error
50 | toast 'error', error
51 | else
52 | toast 'success', result
53 | return
54 | FlowRouter.go '/resources'
55 |
56 | Template.editPerson.onRendered ->
57 | $('.tooltipped').tooltip {delay: 50}
58 |
59 | Template.editPerson.onDestroyed ->
60 | $('.tooltipped').tooltip 'remove'
61 |
--------------------------------------------------------------------------------
/client/templates/application/resources/viewPeople.jade:
--------------------------------------------------------------------------------
1 | template(name='viewPeoplePage')
2 | if customTemplate
3 | +viewPeoplePageCustom
4 | else
5 | .flow-text.container2.viewPeople
6 | if Template.subscriptionsReady
7 | br
8 | fieldset
9 | legend People
10 | +reactiveTable collection='resources-data' settings=settings class='table striped'
11 | else
12 | +spinner
13 | .fixed-action-btn(style='bottom: 45px; right: 24px;')
14 | a.btn-floating.btn-large(href="{{pathFor '../resources'}}")
15 | i.large.material-icons skip_previous
16 | // Delete Modal
17 | #viewPeoplePageModal.modal
18 | .container
19 | .modal-content
20 | h4.red-text Delete User
21 | p Warning! This will permanently delete the user.
22 | .modal-footer
23 | a.modal-action.modal-close.waves-effect.waves-red.btn-flat(href='#!') Cancel
24 | button.modal-action.modal-close.waves-effect.waves-green.btn-flat.btnConfirm(type='button') Delete
25 |
26 | template(name='editPerson')
27 | button.btn-floating.waves-effect.waves-light.tooltipped.btnEach(type='button', data-delay='50', data-position='bottom,', data-tooltip='edit user')
28 | i.fa.fa-edit
29 | button.btn-floating.waves-effect.waves-light.tooltipped.btnEach2(type='button', data-delay='50', data-position='bottom', data-tooltip='edit permissions')
30 | i.fa.fa-shield
31 | button.btn-floating.waves-effect.waves-light.tooltipped.btnDelete.red(type='button', data-delay='50', data-position='bottom', data-tooltip='Permanently delete user!')
32 | i.fa.fa-trash-o
33 |
--------------------------------------------------------------------------------
/client/templates/application/work/createSafetyTemplate.coffee:
--------------------------------------------------------------------------------
1 | Template.createSafetyTemplatePage.onRendered ->
2 | $(".dropdown-button").dropdown()
3 | $('.tooltipped').tooltip {delay: 50}
4 |
5 | Template.createSafetyTemplatePage.onDestroyed ->
6 | $('.tooltipped').tooltip 'remove'
7 |
8 | Template.createSafetyTemplatePage.helpers
9 | customTemplate: -> Customisations.createSafetyTemplate
10 | createdID: -> Meteor.userId()
11 | createSafetyTemplateSchema: -> Schema.safetyMethodTemplate
12 |
--------------------------------------------------------------------------------
/client/templates/application/work/createSafetyTemplate.jade:
--------------------------------------------------------------------------------
1 | template(name='createSafetyTemplatePage')
2 | if customTemplate
3 | +createSafetyTemplatePageCustom
4 | else
5 | .container2
6 | br
7 | +autoForm schema=createSafetyTemplateSchema id='createSafetyTemplatePage' type='method' meteormethod='createSafetyTemplate'
8 | fieldset
9 | legend New Safety Template
10 | .row
11 | +afQuickField name='createdByID' value=createdID type='hidden'
12 | +afQuickField name='text'
13 | .row
14 | .divider.teal
15 | .section
16 | +afxArrayAdd title='Safety Method' field='safetyMethod' item='safetyMethod' tip='Add Safety Method'
17 | +fabBackResetSubmit
18 | .form-group
19 |
--------------------------------------------------------------------------------
/client/templates/application/work/createWork.coffee:
--------------------------------------------------------------------------------
1 | Template.createWorkPage.onRendered ->
2 | $(".dropdown-button").dropdown()
3 | $('.tooltipped').tooltip {delay: 50}
4 | temp = Locations.find().fetch()
5 | dataTree(temp , 'general')
6 |
7 | Template.createWorkPage.onDestroyed ->
8 | $('.tooltipped').tooltip 'remove'
9 |
10 | Template.createWorkPage.helpers
11 | customTemplate: -> Customisations.createWork
12 | formSchema: -> Schema.requests
13 | requestor: ->
14 | temp=Meteor.user()
15 | return {
16 | reqBy_id: temp._id
17 | reqByFirstName: temp.profile.firstName
18 | reqByLastName: temp.profile.lastName
19 | }
20 | reqDate: -> (new Date()).toISOString()
21 | assetDetails: ->
22 | Collections.Locations.Current = Locations.findOne {'id':Session.get('currentID').toString()}
23 | Collections.Locations.Current
24 |
--------------------------------------------------------------------------------
/client/templates/application/work/createWork.jade:
--------------------------------------------------------------------------------
1 | template(name='createWorkPage')
2 | if customTemplate
3 | +createWorkPageCustom
4 | else
5 | .container2
6 | br
7 | +autoForm schema=formSchema id='createWorkPage' type='method' meteormethod='createWO'
8 | fieldset
9 | legend New Work Request
10 | .row
11 | +afQuickField name='type' value='workorder' type='hidden'
12 | +afQuickField name='reqBy_id' value=requestor.reqBy_id type='hidden'
13 | +afQuickField name='reqByFirstName' value=requestor.reqByFirstName type='hidden'
14 | +afQuickField name='reqByLastName' value=requestor.reqByLastName type='hidden'
15 | +afQuickField name='status' value='1' type='hidden'
16 | +afQuickField name='asset_ID' value=assetDetails._id type='hidden'
17 | +afQuickField name='asset_treePath' value=assetDetails.treePath type='hidden'
18 | +afQuickField name='assetID' value=assetDetails.assetID type='hidden'
19 | +afQuickField name='assetText' value=assetDetails.text type='hidden'
20 | .col.s12.m6.l3
21 | +afQuickField name='refID'
22 | .col.s12.m6.l3
23 | +afQuickField name='reqPriority'
24 | div
25 | +afQuickField name='reqDescription'
26 | .row
27 | .divider.teal
28 | .section
29 | h6.teal-text Asset
30 | +treeView nodeID=assetDetails.assetID nodeText=assetDetails.text
31 | +fabBackResetSubmit
32 |
--------------------------------------------------------------------------------
/client/templates/application/work/createWorkTemplate.coffee:
--------------------------------------------------------------------------------
1 | Template.createWorkTemplatePage.onRendered ->
2 | $(".dropdown-button").dropdown()
3 | $('.tooltipped').tooltip {delay: 50}
4 |
5 | Template.createWorkTemplatePage.onDestroyed ->
6 | $('.tooltipped').tooltip 'remove'
7 |
8 | Template.createWorkTemplatePage.helpers
9 | customTemplate: -> Customisations.createWorkTemplate
10 | createdID: -> Meteor.userId()
11 | createWorkTemplateSchema: -> Schema.workPlanTemplate
12 |
--------------------------------------------------------------------------------
/client/templates/application/work/createWorkTemplate.jade:
--------------------------------------------------------------------------------
1 | template(name='createWorkTemplatePage')
2 | if customTemplate
3 | +createWorkTemplatePageCustom
4 | else
5 | .container2
6 | br
7 | +autoForm schema=createWorkTemplateSchema id='createWorkTemplatePage' type='method' meteormethod='createWorkTemplate'
8 | fieldset
9 | legend New Work Template
10 | .row
11 | +afQuickField name='createdByID' value=createdID type='hidden'
12 | +afQuickField name='text'
13 | .row
14 | .divider.teal
15 | .section
16 | +afxArrayAdd title='Work Plan' field='workPlan' item='workPlan' tip='Add Work Plan Task'
17 | +fabBackResetSubmit
18 |
--------------------------------------------------------------------------------
/client/templates/application/work/editSafetyTemplate.coffee:
--------------------------------------------------------------------------------
1 | Template.editSafetyTemplatePage.onCreated ->
2 | self = this
3 | self.autorun ->
4 | self.subscribe 'singleSafetymethod', Collections.Safetyplans.Current._id
5 |
6 | Template.editSafetyTemplatePage.onRendered ->
7 | $(".dropdown-button").dropdown()
8 | $('.tooltipped').tooltip {delay: 50}
9 |
10 | Template.editSafetyTemplatePage.onDestroyed ->
11 | $('.tooltipped').tooltip 'remove'
12 |
13 | Template.editSafetyTemplatePage.helpers
14 | customTemplate: -> Customisations.viewSafetyTemplate
15 | viewDoc: -> Safetyplans.findOne '_id': Collections.Safetyplans.Current._id
16 | schemaSafetyplans: -> Schema.safetyMethodTemplate
17 |
--------------------------------------------------------------------------------
/client/templates/application/work/editSafetyTemplate.jade:
--------------------------------------------------------------------------------
1 | template(name='editSafetyTemplatePage')
2 | if customTemplate
3 | +editSafetyTemplatePageCustom
4 | else
5 | .flow-text.container2
6 | br
7 | fieldset.active
8 | legend Safety Method Template
9 | if Template.subscriptionsReady
10 | +autoForm schema=schemaSafetyplans id='editSafetyTemplatePage' type='update' collection='Safetyplans' doc=viewDoc
11 | .row
12 | +afQuickField name='text'
13 | .row
14 | .divider.teal
15 | .section
16 | +afxArrayAdd title='Safety Method' field='safetyMethod' item='safetyMethod' tip='Add Safety Method Task'
17 | +fabBackResetSubmit
18 | else
19 | +spinner
20 |
21 |
--------------------------------------------------------------------------------
/client/templates/application/work/editWorkTemplate.coffee:
--------------------------------------------------------------------------------
1 | Template.editWorkTemplatePage.onCreated ->
2 | self = this
3 | self.autorun ->
4 | self.subscribe 'singleWorkplan', Collections.Workplans.Current._id
5 |
6 | Template.editWorkTemplatePage.onRendered ->
7 | $(".dropdown-button").dropdown()
8 | $('.tooltipped').tooltip {delay: 50}
9 |
10 | Template.editWorkTemplatePage.onDestroyed ->
11 | $('.tooltipped').tooltip 'remove'
12 |
13 | Template.editWorkTemplatePage.helpers
14 | customTemplate: -> Customisations.editWorkTemplate
15 | viewDoc: -> Workplans.findOne '_id': Collections.Workplans.Current._id
16 |
--------------------------------------------------------------------------------
/client/templates/application/work/editWorkTemplate.jade:
--------------------------------------------------------------------------------
1 | template(name='editWorkTemplatePage')
2 | if customTemplate
3 | +editWorkTemplatePageCustom
4 | else
5 | .flow-text.container2
6 | br
7 | fieldset.active
8 | legend Work Plan Template
9 | if Template.subscriptionsReady
10 | +autoForm id='editWorkTemplatePage' type='update' collection='Workplans' doc=viewDoc
11 | .row
12 | +afQuickField name='text'
13 | .row
14 | .divider.teal
15 | .section
16 | +afxArrayAdd title='Work Plan' field='workPlan' item='workPlan' tip='Add Task'
17 | +fabBackResetSubmit
18 | else
19 | +spinner
20 |
--------------------------------------------------------------------------------
/client/templates/application/work/myWorkorders.coffee:
--------------------------------------------------------------------------------
1 | Template.myWorkordersPage.onRendered ->
2 | $(".dropdown-button").dropdown()
3 | $('.tooltipped').tooltip {delay: 50}
4 |
5 | Template.myWorkordersPage.onDestroyed ->
6 | $('.tooltipped').tooltip 'remove'
7 |
8 | Template.myWorkordersPage.helpers
9 | myWork: -> Workorders.find {}
10 | spinner: ->
11 | MaterializeModal.loading
12 | nospinner: ->
13 | MaterializeModal.close
14 | numDocs: ->
15 | temp = Counts.get 'workorders-count'
16 | if temp > 1000
17 | FlowRouter.go '/work'
18 | toast 'error', ('Your query exceeds 1000 docs. ('+temp+')')
19 | else
20 | return temp
21 | customTemplate: -> Customisations.viewPeople
22 | settings: ->
23 | return {
24 | rowsPerPage: 10
25 | showFilter: true
26 | fields: [
27 | { key: '_id', label: 'System ID' }
28 | { key: 'refID', label: 'Reference ID' }
29 | { key: 'assetID', label: 'Asset ID' }
30 | { key: 'assetText', label: 'Asset' }
31 | { key: 'text', label: 'Title' }
32 | { key: 'location', label: 'Start/View/Edit', tmpl: Template.startWO }
33 | { key: 'status', label: 'Status' }
34 | ]
35 | }
36 |
37 | Template.myWorkordersPage.events
38 | 'click .myWorkorders .btnStart': (event) ->
39 | Collections.Workorders.Current = this
40 | FlowRouter.go '/work/my-workorder'
41 | 'click .myWorkorders .btnView': (event) ->
42 | Collections.Workorders.Current = this
43 | FlowRouter.go '/work/view-workorder'
44 | 'click .myWorkorders .btnEdit': (event) ->
45 | Collections.Workorders.Current = this
46 | FlowRouter.go '/work/edit-workorder'
47 |
48 | Template.startWO.onRendered ->
49 | $('.tooltipped').tooltip {delay: 50}
50 |
51 | Template.startWO.onDestroyed ->
52 | $('.tooltipped').tooltip 'remove'
53 |
--------------------------------------------------------------------------------
/client/templates/application/work/myWorkorders.jade:
--------------------------------------------------------------------------------
1 | template(name='myWorkordersPage')
2 | if customTemplate
3 | +myWorkordersPageCustom
4 | else
5 | .flow-text.container2
6 | br
7 | fieldset.myWorkorders
8 | legend My Work
9 | +reactiveTable collection=myWork settings=settings class='table striped'
10 |
11 | +fabBack
12 |
13 | template(name='startWO')
14 | button.btn-floating.waves-effect.waves-light.tooltipped.green.btnStart(type='button', data-delay='50', data-position='bottom', data-tooltip='Start')
15 | i.fa.fa-wrench
16 | button.btn-floating.waves-effect.waves-light.tooltipped.btnView(type='button', data-delay='50', data-position='bottom', data-tooltip='View')
17 | i.fa.fa-eye
18 | button.btn-floating.waves-effect.waves-light.tooltipped.btnEdit(type='button', data-delay='50', data-position='bottom', data-tooltip='Edit')
19 | i.fa.fa-edit
20 |
--------------------------------------------------------------------------------
/client/templates/application/work/query.coffee:
--------------------------------------------------------------------------------
1 | Template.workQueryPage.onRendered ->
2 | $(".dropdown-button").dropdown()
3 | $('.tooltipped').tooltip {delay: 50}
4 |
5 | Template.workQueryPage.onDestroyed ->
6 | $('.tooltipped').tooltip 'remove'
7 |
8 | Template.workQueryPage.helpers
9 | spinner: ->
10 | MaterializeModal.loading
11 | nospinner: ->
12 | MaterializeModal.close
13 | numDocs: ->
14 | temp = Counts.get 'workorders-count'
15 | if temp > 1000
16 | FlowRouter.go '/work'
17 | Materialize.toast('Your query exceeds 1000 docs. ('+temp+')', 3000, 'red')
18 | else
19 | return temp
20 | customTemplate: -> Customisations.viewPeople
21 | settings: ->
22 | return {
23 | rowsPerPage: 10
24 | showFilter: true
25 | fields: [
26 | { key: '_id', label: 'System ID' }
27 | { key: 'refID', label: 'Reference ID' }
28 | { key: 'reqByFirstName', label: ' First Name' }
29 | { key: 'reqByLastName', label: 'Last Name' }
30 | { key: 'reqDate', label: 'Date Requested' }
31 | { key: 'assetID', label: 'Asset ID' }
32 | { key: 'assetText', label: 'Asset' }
33 | { key: 'reqDescription', label: 'Request' }
34 | { key: 'description', label: 'Description' }
35 | { key: 'location', label: 'View/Edit/Delete', tmpl: Template.editWO }
36 | { key: 'status', label: 'Status' }
37 | ]
38 | }
39 |
40 | Template.workQueryPage.events
41 | 'click .workQuery .btnView': (event) ->
42 | Collections.Workorders.Current = this
43 | FlowRouter.go '/work/view-workorder'
44 | 'click .workQuery .btnEdit': (event) ->
45 | Collections.Workorders.Current = this
46 | FlowRouter.go '/work/edit-workorder'
47 | 'click .workQuery .btnDelete': (event) ->
48 | Collections.Workorders.Current = this
49 | MaterializeModal.display
50 | bodyTemplate: 'workQueryDelete'
51 | title: 'Delete Work Record!'
52 | submitLabel: 'Delete'
53 | closeLabel: 'Cancel'
54 | callback: (error, response) ->
55 | if error
56 | console.error error
57 | else
58 | if response.submit
59 | Meteor.call 'deleteWO', Collections.Workorders.Current._id, (error, result) ->
60 | if error
61 | Materialize.toast("Error", 3000, "red")
62 | else
63 | Materialize.toast("Deleted", 3000, "teal")
64 | return
65 | return
66 |
67 | Template.editWO.onRendered ->
68 | $('.tooltipped').tooltip {delay: 50}
69 |
70 | Template.editWO.onDestroyed ->
71 | $('.tooltipped').tooltip 'remove'
72 |
--------------------------------------------------------------------------------
/client/templates/application/work/query.jade:
--------------------------------------------------------------------------------
1 | template(name='workQueryPage')
2 | if customTemplate
3 | +workQueryPageCustom
4 | else
5 | .flow-text.container2
6 | br
7 | fieldset.workQuery
8 | legend Work
9 | +reactiveTable collection='workorder-data' settings=settings class='table striped'
10 | +fabBack
11 |
12 | template(name='editWO')
13 | button.btn-floating.waves-effect.waves-light.tooltipped.btnView(type='button', data-delay='50', data-position='bottom', data-tooltip='View')
14 | i.fa.fa-eye
15 | button.btn-floating.waves-effect.waves-light.tooltipped.btnEdit(type='button', data-delay='50', data-position='bottom', data-tooltip='Edit')
16 | i.fa.fa-edit
17 | button.btn-floating.waves-effect.waves-light.tooltipped.btnDelete.red(type='button', data-delay='50', data-position='bottom', data-tooltip='Delete')
18 | i.fa.fa-trash
19 |
20 | template(name='workQueryDelete')
21 | h5.red-text Warning this will permanently delete the work request or order!
22 | | This process cannot be undone.
23 |
24 |
--------------------------------------------------------------------------------
/client/templates/application/work/safetyTemplates.coffee:
--------------------------------------------------------------------------------
1 | Template.safetyTemplatesPage.onRendered ->
2 | $(".dropdown-button").dropdown()
3 | $('.tooltipped').tooltip {delay: 50}
4 |
5 | Template.safetyTemplatesPage.onDestroyed ->
6 | $('.tooltipped').tooltip 'remove'
7 |
8 | Template.safetyTemplatesPage.helpers
9 | customTemplate: -> Customisations.safetyTemplates
10 | safetyCollection: -> Safetyplans
11 | settings: ->
12 | return {
13 | rowsPerPage: 10
14 | showFilter: true
15 | fields: [
16 | { key: 'createdByID', label: ' Created by ID' }
17 | { key: 'text', label: ' Title' }
18 | { key: 'location', label: 'View/Edit/Delete', tmpl: Template.rtViewEditDelete }
19 | ]
20 | }
21 |
22 | Template.safetyTemplatesPage.events
23 | 'click .safetyTemplates .btnView': (event) ->
24 | Collections.Safetyplans.Current = this
25 | FlowRouter.go '/work/view-safety'
26 | 'click .safetyTemplates .btnEdit': (event) ->
27 | Collections.Safetyplans.Current = this
28 | FlowRouter.go '/work/edit-safety'
29 | 'click .safetyTemplates .btnDelete': (event) ->
30 | Collections.Safetyplans.Current = this
31 | MaterializeModal.display
32 | bodyTemplate: 'safetyTemplatesDelete'
33 | title: 'Delete Safety Template!'
34 | submitLabel: 'Delete'
35 | closeLabel: 'Cancel'
36 | callback: (error, response) ->
37 | if error
38 | console.error error
39 | else
40 | if response.submit
41 | Meteor.call 'deleteSafety', Collections.Safetyplans.Current._id, (error, result) ->
42 | if error
43 | toast 'error', error
44 | else
45 | toast 'success', result
46 | return
47 | return
48 |
--------------------------------------------------------------------------------
/client/templates/application/work/safetyTemplates.jade:
--------------------------------------------------------------------------------
1 | template(name='safetyTemplatesPage')
2 | if customTemplate
3 | +safetyTemplatesPageCustom
4 | else
5 | .flow-text.container2
6 | br
7 | fieldset.safetyTemplates
8 | legend Safety Method Templates
9 | a(href='{{pathFor "../work/create-safety"}}')
10 | button.btn-floating.btn-large.waves-effect.waves-light.tooltipped(type='button', data-position='bottom', data-delay='50', data-tooltip='Create new template')
11 | i.fa.fa-file-o
12 | if Template.subscriptionsReady
13 | +reactiveTable collection=safetyCollection settings=settings class='table striped'
14 | +fabBack
15 |
16 | template(name='safetyTemplatesDelete')
17 | h5.red-text Warning this will permanently delete the safety method template!
18 | | This process cannot be undone.
19 |
20 |
--------------------------------------------------------------------------------
/client/templates/application/work/viewSafetyTemplate.coffee:
--------------------------------------------------------------------------------
1 | Template.viewSafetyTemplatePage.onCreated ->
2 | self = this
3 | self.autorun ->
4 | self.subscribe 'singleSafetymethod', Collections.Safetyplans.Current._id
5 |
6 | Template.viewSafetyTemplatePage.onRendered ->
7 | $(".dropdown-button").dropdown()
8 | $('.tooltipped').tooltip {delay: 50}
9 |
10 | Template.viewSafetyTemplatePage.onDestroyed ->
11 | $('.tooltipped').tooltip 'remove'
12 |
13 | Template.viewSafetyTemplatePage.helpers
14 | customTemplate: -> Customisations.viewSafetyTemplate
15 | viewDoc: -> Safetyplans.findOne '_id': Collections.Safetyplans.Current._id
16 | schemaSafetyplans: -> Schema.safetyMethodTemplate
17 | collectionSafetyplans: -> Safetyplans
18 | settings: -> {
19 | rowsPerPage: 10
20 | showFilter: true
21 | fields: [
22 | { key: 'id', label: ' Sequence ID' }
23 | { key: 'activity', label: ' Activity' }
24 | { key: 'hazards', label: ' Hazards' }
25 | { key: 'controls', label: ' Controls' }
26 | { key: 'responsible', label: ' Responsible' }
27 | ]
28 | }
29 |
30 | Template.viewSafetyTemplatePage.events
31 | 'click .btnEdit': (event) ->
32 | FlowRouter.go '/work/edit-safety'
33 |
--------------------------------------------------------------------------------
/client/templates/application/work/viewSafetyTemplate.jade:
--------------------------------------------------------------------------------
1 | template(name='viewSafetyTemplatePage')
2 | if customTemplate
3 | +viewSafetyTemplatePageCustom
4 | else
5 | .flow-text.container2
6 | br
7 | +fabBackEdit
8 | fieldset
9 | legend Safety Method Template
10 | if Template.subscriptionsReady
11 | +lgeField label='Title' item=viewDoc.text
12 | .row
13 | .divider.teal
14 | .section
15 | +reactiveTable collection=viewDoc.safetyMethod settings=settings class='table striped'
16 | else
17 | +spinner
18 |
--------------------------------------------------------------------------------
/client/templates/application/work/viewWorkTemplate.coffee:
--------------------------------------------------------------------------------
1 | Template.viewWorkTemplatePage.onCreated ->
2 | self = this
3 | self.autorun ->
4 | self.subscribe 'singleWorkplan', Collections.Workplans.Current._id
5 |
6 | Template.viewWorkTemplatePage.onRendered ->
7 | $(".dropdown-button").dropdown()
8 | $('.tooltipped').tooltip {delay: 50}
9 |
10 | Template.viewWorkTemplatePage.onDestroyed ->
11 | $('.tooltipped').tooltip 'remove'
12 |
13 | Template.viewWorkTemplatePage.helpers
14 | customTemplate: -> Customisations.viewWorkTemplate
15 | viewDoc: -> Workplans.findOne '_id': Collections.Workplans.Current._id
16 |
--------------------------------------------------------------------------------
/client/templates/application/work/viewWorkTemplate.jade:
--------------------------------------------------------------------------------
1 | template(name='viewWorkTemplatePage')
2 | if customTemplate
3 | +viewWorkTemplatePageCustom
4 | else
5 | .flow-text.container2
6 | br
7 | .form-group
8 | .fixed-action-btn.click-to-toggle(style='bottom: 45px; right: 24px;')
9 | a.btn-floating.btn-large.purple
10 | i.large.mdi-navigation-menu
11 | ul
12 | li
13 | button.btn-floating.yellow.darken-1.tooltipped(type='button', onclick='history.back(-1)', data-position='left', data-tooltip='Go Back')
14 | i.material-icons skip_previous
15 | li
16 | a.btnEdit.btn-floating.blue.tooltipped(href='{{pathFor "edit-work"}}' data-position='left', data-tooltip='Edit')
17 | i.fa.fa-edit
18 | fieldset
19 | legend Work Plan Template
20 | if Template.subscriptionsReady
21 | +autoForm id='viewWorkTemplatePage' type='readonly' collection='Workplans' doc=viewDoc
22 | .row
23 | +afQuickField name='text'
24 | .row
25 | .divider.teal
26 | .section
27 | .row
28 | h6.teal-text Work Plan
29 | +afEachArrayItem name='workPlan'
30 | .col.s12.m6.l3
31 | +afQuickField name=this.name label=false
32 | else
33 | +spinner
34 |
35 |
--------------------------------------------------------------------------------
/client/templates/application/work/viewWorkorder.coffee:
--------------------------------------------------------------------------------
1 | Template.viewWorkorderPage.onRendered ->
2 | $(".dropdown-button").dropdown()
3 | $('.tooltipped').tooltip {delay: 50}
4 |
5 | Template.viewWorkorderPage.onDestroyed ->
6 | $('.tooltipped').tooltip 'remove'
7 |
8 | Template.viewWorkorderPage.helpers
9 | customTemplate: -> Customisations.viewAsset
10 | viewDoc: -> Collections.Workorders.Current
11 | workorder: -> Collections.Workorders.Current.status > 2
12 |
13 | Template.viewWoForm.helpers
14 | viewDoc: -> Collections.Workorders.Current
15 | safetyDoc: -> Collections.Workorders.Current.safetyMethod
16 | settingsSafety: -> {
17 | rowsPerPage: 10
18 | showFilter: false
19 | fields: [
20 | { key: 'id', label: 'Sequence ID'}
21 | { key: 'createdBy', label: 'Created by' }
22 | { key: 'activity', label: ' Activity' }
23 | { key: 'hazards', label: ' Hazards' }
24 | { key: 'controls', label: ' Risk control measures' }
25 | { key: 'responsible', label: 'Responsible' }
26 | { key: 'completedTime', label: 'Completed Time' }
27 | { key: '', label: 'Start/Complete', tmpl: Template.rtViewEditDelete }
28 | ]
29 | }
30 | workDoc: -> Collections.Workorders.Current.workPlan
31 | settingsWork: -> {
32 | rowsPerPage: 10
33 | showFilter: false
34 | fields: [
35 | { key: 'id', label: 'Sequence ID'}
36 | { key: 'text', label: 'Instructions' }
37 | { key: 'estimatedTime', label: 'Est hrs' }
38 | { key: 'finishTime', label: 'Finish Time' }
39 | { key: 'completedTime', label: 'Completed Time' }
40 | { key: '', label: 'Start/Complete', tmpl: Template.rtViewEditDelete }
41 | ]
42 | }
43 |
--------------------------------------------------------------------------------
/client/templates/application/work/work.coffee:
--------------------------------------------------------------------------------
1 | Template.workPage.onCreated ->
2 | # Set Navbar so Work highlighted
3 | $('#header1DesktopUL li').removeClass 'active'
4 | $('#header1DesktopUL li').eq(1).addClass 'active'
5 |
6 | Template.workPage.onRendered ->
7 | $(".dropdown-button").dropdown()
8 | $('.tooltipped').tooltip {delay: 50}
9 |
10 | Template.workPage.onDestroyed ->
11 | $('.tooltipped').tooltip 'remove'
12 |
13 | Template.workPage.helpers
14 | customTemplate: -> Customisations.work
15 |
--------------------------------------------------------------------------------
/client/templates/application/work/work.jade:
--------------------------------------------------------------------------------
1 | template(name='workPage')
2 | if customTemplate
3 | +workPageCustom
4 | else
5 | .container
6 | h1.icon-page {{_ 'work-mgt'}}
7 | .row.flow-text.center-align
8 | .col.s12.m6.l3
9 | a.waves-effect.waves-dark.icon-page(href='{{pathFor "work/create"}}')
10 | i.fa-5x.fa.fa-commenting-o
11 | br
12 | br
13 | | {{_ 'create-request'}}
14 | br
15 | br
16 | .col.s12.m6.l3
17 | a.waves-effect.waves-dark.icon-page(href='{{pathFor "work/view"}}')
18 | i.fa-5x.fa.fa-wrench
19 | br
20 | br
21 | | {{_ 'work'}}
22 | br
23 | br
24 | .col.s12.m6.l3
25 | a.waves-effect.waves-dark.icon-page(href='{{pathFor "work/my-workorders"}}')
26 | i.fa-5x.fa.fa-user
27 | br
28 | br
29 | | {{_ 'my-work'}}
30 | br
31 | br
32 | .col.s12.m6.l3
33 | a.waves-effect.waves-dark.icon-page(href='{{pathFor "work/work-template"}}')
34 | i.fa-5x.fa.fa-file-o
35 | br
36 | br
37 | | {{_ 'work-template'}}
38 | br
39 | br
40 | .col.s12.m6.l3
41 | a.waves-effect.waves-dark.icon-page(href='{{pathFor "work/safety-template"}}')
42 | i.fa-5x.fa.fa-file-o
43 | br
44 | br
45 | | {{_ 'safety-template'}}
46 | br
47 | br
48 |
--------------------------------------------------------------------------------
/client/templates/application/work/workTemplates.coffee:
--------------------------------------------------------------------------------
1 | Template.workTemplatesPage.onRendered ->
2 | $(".dropdown-button").dropdown()
3 | $('.tooltipped').tooltip {delay: 50}
4 |
5 | Template.workTemplatesPage.onDestroyed ->
6 | $('.tooltipped').tooltip 'remove'
7 |
8 | Template.workTemplatesPage.helpers
9 | customTemplate: -> Customisations.workTemplates
10 | workCollection: -> Workplans
11 | settings: ->
12 | return {
13 | rowsPerPage: 10
14 | showFilter: true
15 | fields: [
16 | { key: 'createdByID', label: ' Created by ID' }
17 | { key: 'text', label: ' Title' }
18 | { key: 'location', label: 'View/Edit/Delete', tmpl: Template.editWork }
19 | ]
20 | }
21 |
22 | Template.workTemplatesPage.events
23 | 'click .workTemplates .btnView': (event) ->
24 | Collections.Workplans.Current = this
25 | FlowRouter.go '/work/view-work'
26 | 'click .workTemplates .btnEdit': (event) ->
27 | Collections.Workplans.Current = this
28 | FlowRouter.go '/work/edit-work'
29 | 'click .workTemplates .btnDelete': (event) ->
30 | Collections.Workplans.Current = this
31 | MaterializeModal.display
32 | bodyTemplate: 'workTemplatesDelete'
33 | title: 'Delete Work Template!'
34 | submitLabel: 'Delete'
35 | closeLabel: 'Cancel'
36 | callback: (error, response) ->
37 | if error
38 | console.error error
39 | else
40 | if response.submit
41 | Meteor.call 'deleteWork', Collections.Workplans.Current._id, (error, result) ->
42 | if error
43 | Materialize.toast("Error", 3000, "red")
44 | else
45 | Materialize.toast("Deleted", 3000, "teal")
46 | return
47 | return
48 |
49 | Template.editWork.onRendered ->
50 | $('.tooltipped').tooltip {delay: 50}
51 |
52 | Template.editWork.onDestroyed ->
53 | $('.tooltipped').tooltip 'remove'
54 |
--------------------------------------------------------------------------------
/client/templates/application/work/workTemplates.jade:
--------------------------------------------------------------------------------
1 | template(name='workTemplatesPage')
2 | if customTemplate
3 | +workTemplatesPageCustom
4 | else
5 | .flow-text.container2
6 | br
7 | fieldset.workTemplates
8 | legend Work Templates
9 | a(href='{{pathFor "../work/create-work"}}')
10 | button.btn-floating.btn-large.waves-effect.waves-light.tooltipped(type='button', data-position='bottom', data-delay='50', data-tooltip='Create new template')
11 | i.fa.fa-file-o
12 | if Template.subscriptionsReady
13 | +reactiveTable collection=workCollection settings=settings class='table striped'
14 | +fabBack
15 |
16 | template(name='editWork')
17 | button.btn-floating.waves-effect.waves-light.tooltipped.btnView(type='button', data-delay='50', data-position='bottom', data-tooltip='View')
18 | i.fa.fa-eye
19 | button.btn-floating.waves-effect.waves-light.tooltipped.btnEdit(type='button', data-delay='50', data-position='bottom', data-tooltip='Edit')
20 | i.fa.fa-edit
21 | button.btn-floating.waves-effect.waves-light.tooltipped.btnDelete.red(type='button', data-delay='50', data-position='bottom', data-tooltip='Delete')
22 | i.fa.fa-trash
23 |
24 | template(name='workTemplatesDelete')
25 | h5.red-text Warning this will permanently delete the work Plan template!
26 | | This process cannot be undone.
27 |
28 |
--------------------------------------------------------------------------------
/client/templates/includes/access_denied.html:
--------------------------------------------------------------------------------
1 |
2 | Access Denied!
4 |
next 10 executes
13 |