This is the ShareContract functional page component that will display the share contract of the user
Members
Object
# static contractToPay
This is the state variable that will store the state of the contract to pay
- Default Value:
- {}
View Source pages/Dashboard/ShareContract/ShareContract.jsx, line 57
Array
# static file
This is the state variable that will store the file that will be uploaded
- Default Value:
- null
View Source pages/Dashboard/ShareContract/ShareContract.jsx, line 20
Boolean
# static filterDropdown
This is the state variable that will store the state of the filter dropdown
- Default Value:
- false
View Source pages/Dashboard/ShareContract/ShareContract.jsx, line 36
Array
# static getShareContracts
This is the useMemo hook that will filter the share contracts according to the search input and sort by
Boolean
# static open
This is the state variable that will store the state of the modal
- Default Value:
- false
View Source pages/Dashboard/ShareContract/ShareContract.jsx, line 43
Object
# static product
This is the state variable that will store the state of the product
- Default Value:
- {}
View Source pages/Dashboard/ShareContract/ShareContract.jsx, line 50
String
# static searchInput
This is the state variable that will store the state of the search input
- Default Value:
- ""
View Source pages/Dashboard/ShareContract/ShareContract.jsx, line 65
String
# static sortBy
This is the state variable that will store the state of the sort by
- Default Value:
- ""
View Source pages/Dashboard/ShareContract/ShareContract.jsx, line 72
Unknown
# static submitId
This is the state variable that will store the id of the contract that will be submitted
- Default Value:
- null
View Source pages/Dashboard/ShareContract/ShareContract.jsx, line 28
# static useGetShareContracts
React query hook to get the share contracts
# static usePaymentWithKhalti
React query hook to create payment with khalti
Methods
# async static apicall() → {Promise.<void>}
This is the function that will call the api
Promise.<void>
# static handleFileChange(e, id)
This is the function that will handle the file change
Parameters:
| Name | Type | Description |
|---|---|---|
e |
Event
|
This is the event that will be passed when the file is changed |
id |
Number
|
This is the id of the contract that will be submitted |
# static payNow(dat)
This is the function for opening the modal for payment options
Parameters:
| Name | Type | Description |
|---|---|---|
dat |
Object
|
This is the object that will be passed when the pay now button is clicked |
# static uploadKaranama(id) → {Promise.<void>}
This is the function that will upload the karanama
Parameters:
| Name | Type | Description |
|---|---|---|
id |
Number
|
This is the id of the contract that will be submitted |
Promise.<void>