Rename status to PENDING

This commit is contained in:
ekzyis 2023-11-27 18:11:58 +01:00
parent 358c44decc
commit 10eaecdf0d
2 changed files with 3 additions and 3 deletions

View File

@ -115,7 +115,7 @@ func (db *DB) CreateOrder(tx *sql.Tx, ctx context.Context, order *Order) error {
func (db *DB) FetchUserOrders(pubkey string, orders *[]Order) error {
query := "" +
"SELECT o.id, share_id, o.pubkey, o.side, o.quantity, o.price, o.invoice_id, o.created_at, s.description, s.market_id, i.confirmed_at, " +
"CASE WHEN o.order_id IS NOT NULL THEN 'EXECUTED' ELSE 'WAITING' END AS status " +
"CASE WHEN o.order_id IS NOT NULL THEN 'EXECUTED' ELSE 'PENDING' END AS status " +
"FROM orders o " +
"JOIN invoices i ON o.invoice_id = i.id " +
"JOIN shares s ON o.share_id = s.id " +
@ -137,7 +137,7 @@ func (db *DB) FetchUserOrders(pubkey string, orders *[]Order) error {
func (db *DB) FetchMarketOrders(marketId int64, orders *[]Order) error {
query := "" +
"SELECT o.id, share_id, o.pubkey, o.side, o.quantity, o.price, o.invoice_id, o.created_at, s.description, s.market_id, " +
"CASE WHEN o.order_id IS NOT NULL THEN 'EXECUTED' ELSE 'WAITING' END AS status " +
"CASE WHEN o.order_id IS NOT NULL THEN 'EXECUTED' ELSE 'PENDING' END AS status " +
"FROM orders o " +
"JOIN shares s ON o.share_id = s.id " +
"JOIN invoices i ON i.id = o.invoice_id " +

View File

@ -23,7 +23,7 @@ const descClassName = computed(() => {
const statusClassName = computed(() => {
const status = order.value.Status
if (status === 'PAID') return 'success'
if (status === 'WAITING') return 'info'
if (status === 'PENDING') return 'info'
return 'error'
})