In this chapter, we will create the Seller 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 07
↳ 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
seller.html
↳CSS
pageStyles.css
↳js
z2b-admin.js
z2b-buyer.js
z2b-events.js
z2b-initiate.js
z2b-seller.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 two existing files are updated:
- hlcClient.js
- This file is update to support the seller interface on the server side
- network/permissions.acl
- This file is updated to allow the seller 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-seller.js
- This file contains all of the browser functional code to support the seller user experience
- seller.html
- This contains the HTML framework for the seller experience. Content for this framework is generated by the functions in the z2b-seller.js file
- Text on this page is determined by the selected language (default is US English)