This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import axios from 'axios' | |
import { SERVER_HOST } from './conf' | |
const adapter = () => axios.create({ | |
baseURL: SERVER_HOST, | |
headers: { | |
'Authorization': `Bearer ${localStorage.getItem('token')}` | |
} | |
}) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
loadContracts = async (template: Template) => | |
await axios() | |
.post('/contracts/search', {"templateIds" : [`${template.moduleName}:${template.entityName}`]}) | |
.then(res => res.data.result) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- An agency can offer a visit to many parties (that expressed interest off-ledger) | |
nonconsuming Rental_OfferVisit : ContractId VisitOffer | |
with | |
visitor : Party | |
do | |
create VisitOffer with | |
-- Signatory | |
agency, | |
landlord, | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
RentalContractOffer_Reject : () | |
do | |
create Rental with | |
-- Signatory | |
landlord, | |
agency, | |
-- Data | |
tenant = applicant, | |
authority, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
RentalApplication_Accept : ContractId RentalContractOffer | |
with | |
authority : Party | |
do | |
rentalPendingContractCid <- create RentalPendingContract with | |
-- Signatory | |
landlord, | |
agency, | |
-- Data | |
registerId -- Display only |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
key (agency, registerId) : (Party, Text) | |
maintainer key._1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
AgencyLicenseOffer_Refuse : () do return () |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
AgencyLicense_Revoke : () do return () -- The authority can always revoke licenses |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ensure | |
authority /= landlord && -- Avoid conflict of interest | |
authority /= tenant -- Avoid conflict of interest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
assert (authority /= newAgency) -- Prevent meaningless self-offer |
NewerOlder