sending users to restock menu instead of home after completed actions

This commit is contained in:
nek0 2016-01-30 18:36:03 +01:00
parent 74407b1c75
commit f1806a4dfb
4 changed files with 11 additions and 8 deletions

View File

@ -36,7 +36,7 @@ getUpstockR bId = do
$(widgetFile "upstock")
Nothing -> do
setMessageI MsgItemUnknown
redirect HomeR
redirect RestockR
postUpstockR :: BeverageId -> Handler Html
postUpstockR bId = do
@ -51,7 +51,7 @@ postUpstockR bId = do
then do
runDB $ update bId [BeverageAmount +=. c]
setMessageI MsgStockedUp
redirect HomeR
redirect RestockR
else do
setMessageI MsgNotStockedUp
redirect $ UpstockR bId
@ -61,7 +61,7 @@ postUpstockR bId = do
redirect $ UpstockR bId
Nothing -> do
setMessageI MsgItemUnknown
redirect HomeR
redirect RestockR
upstockForm :: AForm Handler Int
upstockForm = areq amountField (bfs MsgAmountAdded) (Just 1)
@ -82,10 +82,10 @@ postNewArticleR = do
FormSuccess bev -> do
runDB $ insert_ bev
setMessageI MsgItemAdded
redirect HomeR
redirect RestockR
_ -> do
setMessageI MsgItemNotAdded
redirect HomeR
redirect RestockR
newArticleForm :: AForm Handler Beverage
newArticleForm = (\a b c d e f g h i j k l -> Beverage a b c d e i j k f g l h)

View File

@ -31,7 +31,8 @@ Description: Popis
StockedUp: Nabral jsem zásoby
NotStockedUp: Nemohl jsem nabrat zásoby
StockupError: Chyba při nabírání zásob
AmountAdded: Množství přidáno
AmountAdded: Množství jednotlivích přidáno
CrateAmountAdded: Množství přepravek přidáno
ItemAdded: Nový zboží přidáno
ItemNotAdded: Chyba při přidávání
AmountWarning: Výstraha počtu

View File

@ -31,7 +31,8 @@ Description: Beschreibung
StockedUp: Bestand aufgefüllt
NotStockedUp: Bestand kann nicht negativ aufgefüllt werden
StockupError: Fehler beim Auffüllen
AmountAdded: Anzahl hinzugefügt
AmountAdded: Anzahl Einzelteile hinzugefügt
CrateAmountAdded: Anzahl Kästen hinzugefügt
ItemAdded: Neuer Artikel hinzugefügt
ItemNotAdded: Fehler beim Hinzufügen
AmountWarning: Warnung bei Anzahl

View File

@ -31,7 +31,8 @@ Description: Description
StockedUp: Stocked up
NotStockedUp: Could not stock up
StockupError: Error stocking up
AmountAdded: Amount added
AmountAdded: Amount of single items added
CrateAmountAdded: Amount of crates added
ItemAdded: New item added
ItemNotAdded: Error when adding
AmountWarning: Amount warning