# Consultation Queue
Figma: https://www.figma.com/file/yW8JG8TuoIRS9bE9pfOB5c/Hire-us-form?node-id=520%3A355
## Hours Estimate
### Misc.
1. Check Q&A page - 4 hours
2. View homepage - 4 hours
### Hiring Board
1. View highest bounties
- Open bounties - view details - 2 hours
- Connect wallet - 2 hours
- Deposit or withdraw bounty (or "accept" for Raiders) - 4 hours
2. View option to buy raid or fill out consultation form - 2 hours
**Total: 16 hours**
**Total (with 20% buffer): 20 hours**
## User Stories
### Roles
- User: any user
- Submitter: a user that has submitted a consultation request
- Raider: a user that is a full member of RG (380+ shares)
```gherkin=
Feature: All user scenarios
Scenario: User can view Q&A
Given all circumstances
Then the user can view a Question & Answer page
Scenario: User wants to submit a new consultation request
Given all circumstances
Then the user can move to consultation form (already complete)
Scenario: User wants to view bounties
Given all circumstances
Then the user can
* view list of bounties in ranked order
* click on bounties to view more details
Scenario: user wants to donate $RAID to a consultation proposal
Given the user has connected their wallet
And the user is not the submitter of the proposal
Then the user can donate $RAID to a proposal (irreversible)
```
```gherkin=
Feature: Consultation submitter scenarios
Scenario: Submitter wants to deposit $RAID (aka make a bid/add to bounty)
Given the user has connected their wallet
And the user is the submitter of a proposal
Then the user can deposit $RAID into the proposal
(if this is the first deposit, then a one-time 14-day timelock is started)
Scenario: Submitter wants to withdraw deposited $RAID
Given the user has connected their wallet
And the user is the submitter of a proposal
And the deposit lockup period has expired
Then the user can withdraw $RAID from the proposal
Scenario: Submitter wants to cancel their submission
Given the user has connected their wallet
And the user is the submitter of a proposal
And the deposit lockup period has expired
Then the user can cancel a consultation proposal and withdraw all $RAID
```
```gherkin=
Feature: Raider Scenarios
Scenario: Raider accepts a consultation request
Given the Raider has their wallet connected
And they're a full member in RG (>=380 shares)
Then the Raider can accept a bounty of their choosing
```
## Elliott's Subgraph Qeustions
1. The `details` field in a Bid query returns Bytes. Is this supposed to be converted into a UTF-8 string somehow? If not, what is the `details` field?
2. Is this the `bidIncreaseHash` or the `address` of the person making the increase?

## Test Deployments
- [DAO](https://app.daohaus.club/dao/0x4/0xe189a9c5acfd2e53c4663150b2703b9ffad224ff)
- [Queue Contract](https://rinkeby.etherscan.io/address/0x3a9f3147742e51efba1f04ff26e8dc95978dccb4#readContract)
- [Test Token](https://rinkeby.etherscan.io/address/0x982e00b16c313e979c0947b85230907fce45d50e)
- [Subgraph](https://thegraph.com/legacy-explorer/subgraph/slgraham/guildauctionqueues-rinkeby?selected=playground)
## Repos
[Auction Queue](https://github.com/slgraham/guild-auction-queue)
[Subgraph](https://github.com/slgraham/guild-auction-queue/tree/main/subgraph)
[Frontend](https://github.com/manolingam/hireus)
## Timeline
1. - [x] Start Date - **7/5**
2. - [x] "User wants to submit a new consultation request" - **7/6**
3. - [x] "Submitter wants to deposit $RAID (aka make a bid/add to bounty)" - **7/8**
- Style home hiring board (use dummy data)
4. - [x] "Submitter wants to withdraw deposited $RAID" - **7/9**
- Connect Airtable. Make board dynamic.
- Style connect wallet page
- Style connected wallet page
5. - [x] "User wants to view bounties" - **7/12**
- Add snackbar with transaction status
6. - [x] "user wants to donate $RAID to a consultation proposal" - **7/13**
- Open Bounties details card
7. - [x] "Submitter wants to cancel their submission" - **7/4**
8. - [x] "Raider accepts a consultation request" - **7/14**
9. - [ ] End Date - **7/16**
## Test Scripts
1. As a new client, I want to submit a project to the queu with 0 Raid, so that my project will be picked up by raid guild
1. Completed when a project is started by raid guild
3. As a new client, I want to submit a project to the queu with raid
1. 1. Completed when a project is started by raid guildĀ
5. As an existing client,
## Testing Notes
- [x] Snackbar has transparent background
- [x] Display consultation submitter adress, rather than rec
- [x] Unpaid bids shouldn't appear on CQ
- [x] Changing Rec ID -> Submitter ID
- [x] Small Screen Issue: the current raid bid blends in with the rec id (or address id)
- [x] Change "Lock time" to "Status", and change the description/info to one of "Accepted", "Bid can't be decreased or cancelled until <day/time>", "Bid can be decreased or cancelled as of <day/time>". (These are just suggestions; I'm open to other phrasing)
- [x] Double-check fetching after transaction