Fix(admin-ui, medusa): stock location fixes (#3395)

**What**
- A series of minor fixes for admin-ui relating to managing stock locations: 
  - make "create location" `primary`
  - add delete prompt when cancelling creation if information has been input
  - avoid clipping focus border on country select when creating a stock location
  - allow removals of sales channels from stock locations 

Fixes CORE-1191, CORE-1192, CORE-1190, CORE-1189
This commit is contained in:
Philip Korsholm
2023-03-07 10:54:09 +00:00
committed by GitHub
parent aadc1e19e9
commit 15f47baf56
5 changed files with 66 additions and 26 deletions
@@ -1,7 +1,7 @@
import { IsString } from "class-validator"
import { Request, Response } from "express"
import { EntityManager } from "typeorm"
import { EntityManager } from "typeorm"
import { IsString } from "class-validator"
import { SalesChannelLocationService } from "../../../../services"
/**
@@ -80,7 +80,7 @@ export default async (req: Request, res: Response) => {
await manager.transaction(async (transactionManager) => {
await channelLocationService
.withTransaction(transactionManager)
.removeLocation(id, validatedBody.location_id)
.removeLocation(validatedBody.location_id, id)
})
res.json({