chore(apc): add packages textpos for pin letter

This commit is contained in:
Steffen Jost 2022-07-01 17:42:22 +02:00
parent 7a6ea92063
commit f166cf4a5a
5 changed files with 41 additions and 32 deletions

View File

@ -27,7 +27,7 @@ let
#texlive.combined.scheme-medium # too large for container in LMU build environment. #texlive.combined.scheme-medium # too large for container in LMU build environment.
(texlive.combine { (texlive.combine {
inherit (texlive) scheme-basic inherit (texlive) scheme-basic
babel-german babel-english booktabs babel-german babel-english booktabs textpos
enumitem eurosym koma-script parskip xcolor enumitem eurosym koma-script parskip xcolor
# required fro LuaTeX # required fro LuaTeX
luatexbase lualatex-math unicode-math selnolig luatexbase lualatex-math unicode-math selnolig

View File

@ -79,7 +79,7 @@ in pkgs.mkShell {
# texlive.combined.scheme-small # texlive.combined.scheme-small
(texlive.combine { (texlive.combine {
inherit (texlive) scheme-basic inherit (texlive) scheme-basic
babel-german babel-english booktabs babel-german babel-english booktabs textpos
enumitem eurosym koma-script parskip xcolor enumitem eurosym koma-script parskip xcolor
# required fro LuaTeX # required fro LuaTeX
luatexbase lualatex-math unicode-math selnolig luatexbase lualatex-math unicode-math selnolig

View File

@ -10,35 +10,34 @@ import Import
-- import qualified Data.Set as Set -- import qualified Data.Set as Set
-- import Handler.Utils -- import Handler.Utils
{- {-
data MetaPinRenewal = MetaPinRenewal data MetaPinRenewal = MetaPinRenewal
{ mppOpening { mppOpening :: Maybe Text
, mppClosing , mppClosing :: Maybe Text
, mppDate , mppDate :: Maybe Text
, mppURL , mppURL :: Maybe Text
, mppLogin , mppLogin :: Text
, mppPin , mppPin :: Text
, mppRecipient :: Text , mppRecipient :: Text
, mppAdress :: [Text] , mppAdress :: [Text]
, mppLang :: Text , mppLang :: Text
, mppIsDe :: Bool , mppIsDe :: Bool
} }
deriving (Eq, Ord, Read, Show, Generic, Typeable)
-}
{-
makePrintForm :: Maybe AvsQueryPerson -> Form AvsQueryPerson
makeAvsPersonForm tmpl = identifyForm FIDAvsQueryPerson . validateForm validateAvsQueryPerson $ \html ->
flip (renderAForm FormStandard) html $ AvsQueryPerson
<$> aopt textField (fslI MsgAvsCardNo) (avsPersonQueryCardNo <$> tmpl)
<*> aopt textField (fslI MsgAvsFirstName) (avsPersonQueryFirstName <$> tmpl)
<*> aopt textField (fslI MsgAvsLastName) (avsPersonQueryLastName <$> tmpl)
<*> aopt textField (fslI MsgAvsInternalPersonalNo) (avsPersonQueryInternalPersonalNo <$> tmpl)
<*> aopt textField (fslI MsgAvsVersionNo) (avsPersonQueryVersionNo <$> tmpl)
validateAvsQueryPerson :: FormValidator AvsQueryPerson Handler () makePrintForm :: Maybe MetaPinRenewal -> Form MetaPinRenewal
validateAvsQueryPerson = do makePrintForm tmpl = identifyForm FIDLmsLetter . validateForm validateMetaPinRenewal $ \html ->
AvsQueryPerson{..} <- State.get flip (renderAForm FormStandard) html $ MetaPinRenewal
<$> aopt textField (fslI MsgMppOpening) (mppOpening <$> tmpl)
<*> aopt textField (fslI MsgMppClosing) (mppClosing <$> tmpl)
<*> aopt textField (fslI MsgMppDate) (mppDate <$> tmpl)
<*> aopt textField (fslI MsgMppURL) (mppURL <$> tmpl)
<*> aopt textField (fslI MsgMppnNo) (mppRecipient <$> tmpl)
validateMetaPinReneqal :: FormValidator MetaPinRenewal Handler ()
validateMetaPinReneqal = do
AvsQueryPeMetaPinRenewalate.get
guardValidation MsgAvsQueryEmpty $ guardValidation MsgAvsQueryEmpty $
is _Just avsPersonQueryCardNo || is _Just avsPersonQueryCardNo ||
is _Just avsPersonQueryFirstName || is _Just avsPersonQueryFirstName ||

View File

@ -297,6 +297,7 @@ data FormIdentifier
| FIDAllocationNotification | FIDAllocationNotification
| FIDAvsQueryPerson | FIDAvsQueryPerson
| FIDAvsQueryStatus | FIDAvsQueryStatus
| FIDLmsLetter
deriving (Eq, Ord, Read, Show) deriving (Eq, Ord, Read, Show)
instance PathPiece FormIdentifier where instance PathPiece FormIdentifier where

View File

@ -90,6 +90,10 @@ $endif$
\addtolength{\oddsidemargin}{-1in} \addtolength{\oddsidemargin}{-1in}
\setlength{\textwidth}{\useplength{firstheadwidth}} \setlength{\textwidth}{\useplength{firstheadwidth}}
\usepackage[absolute,showboxes,quiet]{textpos}
\setlength{\TPHorizModule}{5mm}
\setlength{\TPVertModule}{\TPHorizModule}
\providecommand{\tightlist}{% \providecommand{\tightlist}{%
\setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}} \setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}}
@ -118,8 +122,13 @@ $endif$
\opening{$opening$} \opening{$opening$}
\begin{textblock}{13}(15,45)
$pin$
\end{textblock}
$body$ $body$
\vspace{1.2cm}
\closing{$closing$} \closing{$closing$}
\ps $postskriptum$ \ps $postskriptum$