In this chapter, we will create the Shipping Company view and add server-side services to support it. This runs on HyperLedger Fabric Version 1.0. The code that we will write is managed in this chapter and all the subsequent chapters in the following folder structure:
Chapter 09
↳ controller
↳restapi
router.js
↳features
↳composer
autoLoad.js
hlcAdmin.js
hlcClient.js
queryBlockChain.js
Z2B_Services.js
Z2B_Utilities.js
↳ text
multi-lingual.js
resources.js
↳ HTML
index.html
admin.html
buyer.html
ceateConnectionProfile.html
createMember.html
createOrder.html
deleteConnectionProfile.html
getMemberSecret.html
removeMember.html
provider.html
seller.html
shipper.html
↳CSS
pageStyles.css
↳js
z2b-admin.js
z2b-buyer.js
z2b-events.js
z2b-initiate.js
z2b-provider.js
z2b-seller.js
z2b-shipper.js
z2b-utilities.js
↳ network
permissions.acl
queries.qry
↳lib
sample.js
↳models
base.cto
events.cto
sample.cto
Two new files are introduced in this chapter and three existing files are updated:
- hlcClient.js
- This file is update to support the shipper interface on the server side
- network/permissions.acl
- This file is updated to allow the shipper to access Orders and to execute selected transactions.
- It determines precisely what transactions a member can execute and what assets a member can see. The basic rule is "If authority is not specifically granted in this file, then access is denied."
- z2b-shipper.js
- This file contains all of the browser functional code to support the shipper user experience
- shipper.html
- This contains the HTML framework for the provider experience. Content for this framework is generated by the functions in the z2b-shipper.js file
- Text on this page is determined by the selected language (default is US English)
- pageStyles.css
- This file is updated to support the accordian action on the Finance Company page