Commit 587b076b authored by Mart Lubbers's avatar Mart Lubbers

Fix the examples

parent 6e8e3325
Pipeline #27080 failed with stage
in 2 minutes and 27 seconds
......@@ -25,6 +25,8 @@ import Incidone.Extensions.CrewLists
derive class iTask CommunicationAttempt
derive class iTask ActionPlan
derive gDefault ActionStatus, ItemMeta, ActionProgress
actionStatuses :: SDSLens () [(InstanceNo,InstanceNo,ActionStatus)] ()
actionStatuses = mapRead (map toActionStatus) detachedTaskInstances
......
......@@ -7,6 +7,8 @@ import Text, Text.HTML, Data.List, iTasks.Internal.HtmlUtil
derive class iTask WallContent
derive gDefault ContactMap, ContactMapLayer, ContactMapLayerDefinition, ContactMapMarker, ContactMapRegion, ContactTrack, ContactMapMarkerType, DateTime
wallContent :: SimpleSDSLens WallContent
wallContent = sharedStore "WallContent" (WallOverview defaultValue)
......
......@@ -7,6 +7,8 @@ import Incidone.Util.TaskPatterns
import qualified Data.Map as DM
import Data.Functor
derive gDefault AISContact, DateTime, ContactTrack, Degrees, AIVDM5, AIVDMCNB
syncAISStream :: Task ()
syncAISStream = withShared ([],False,[],False) (\channel -> (sync channel -&&- consume channel) @! ())
where
......
......@@ -21,5 +21,5 @@ derive JSONEncode Temperature, Meters, Feet, Miles, Knots, Degrees, Contac
derive JSONDecode Temperature, Meters, Feet, Miles, Knots, Degrees, ContactShort, IncidentShort
derive gText Temperature, Meters, Feet, Miles, Knots, Degrees, ContactShort, IncidentShort
derive gEditor Temperature, Meters, Feet, Miles, Knots, Degrees, ContactShort, IncidentShort
derive gDefault Temperature, Meters, Feet, Miles, Knots, Degrees, ContactShort, IncidentShort
//derive gDefault Temperature, Meters, Feet, Miles, Knots, Degrees, IncidentShort
derive gEq Temperature, Meters, Feet, Miles, Knots, Degrees, ContactShort, IncidentShort
......@@ -29,6 +29,15 @@ gText{|IncidentShort|} _ i = [maybe "" incidentTitle i]
derive JSONEncode Temperature, Meters, Feet, Miles, Knots, Degrees, ContactShort, IncidentShort
derive JSONDecode Temperature, Meters, Feet, Miles, Knots, Degrees, ContactShort, IncidentShort
derive gEditor Temperature, Meters, Feet, Miles, Knots, Degrees, ContactShort, IncidentShort
derive gDefault Temperature, Meters, Feet, Miles, Knots, Degrees, ContactShort, IncidentShort
//derive gDefault Temperature, Meters, Feet, Miles, Knots, Degrees, IncidentShort
derive gEq Temperature, Meters, Feet, Miles, Knots, Degrees, ContactShort, IncidentShort
////derive gDefault Contact, ContactGeo, CommunicationMean, NewCommunicationMean, ContactType, Contact
//
//derive gDefault DSCMessage, DSCCategory, INMARSATCMessage, PhoneCall, RadioCall, EmailMessage, P2000Message
//derive gDefault Communication, CommunicationDetails, CommunicationType, CommunicationDirection, CommunicationStatus
//derive gDefault EmergencyPhase, Incident, IncidentType, Contact, ContactType, ContactAccessLevel, ContactStatus, ContactPhoto, ContactAvatar, VesselType
//derive gDefault PersonDetails, VesselDetails, SurferDetails, DiverDetails, AirplaneDetails, HelicopterDetails
//derive gDefault WeatherData, WeatherType,LogEntry, Gender
//derive gDefault AISContact, AIVDMCNB, AIVDM5
//derive gDefault CommunicationMean, CommunicationMeanType, TelephoneDetails, VHFRadioDetails, EmailAccountDetails, P2000ReceiverDetails, XCommunicationMean
......@@ -13,6 +13,8 @@ import Data.Map.GenJSON
import Text, Text.HTML, Data.Either, Data.Functor
import iTasks.UI.Editor.Controls
derive gDefault Contact, ContactMap, ContactStatus, ContactAccessLevel, Credentials, ContactPhoto, ContactTrack, ContactType, Degrees, Document, ContactMapLayer, DateTime, ContactMapLayerDefinition, ContactMapMarker, ContactMapRegion, ContactMapMarkerType
CONVERT_BIN :== "/opt/local/bin/convert"
//CONVERT_BIN :== "/usr/bin/convert"
......
......@@ -4,6 +4,9 @@ import Incidone.OP.Concepts
import Text, Text.HTML
import iTasks.Extensions.DateTime
derive gDefault ContactGeo, CommunicationMean, NewCommunicationMean, ContactStatus, ContactAccessLevel, Credentials, ContactPhoto, ContactTrack, ContactType
derive gDefault DateTime, Contact, Degrees, CommunicationMeanType, Document
class contactTitle a :: a -> String
instance contactTitle Contact
where
......
......@@ -5,6 +5,8 @@ import Incidone.OP.IncidentManagementTasks
import Incidone.OP.ContactManagementTasks
import Incidone.OP.CommunicationManagementTasks
derive gDefault NewContact, IncidentShort, ContactType
generateTestIncident :: Bool -> Task IncidentNo
generateTestIncident closed
= randomChoice [YachtEngineProblems,YachtAground,Medevac]
......
......@@ -9,6 +9,9 @@ import Incidone.Util.SQLSDS
import Data.Functor, Data.Either, Data.Tuple, Data.Func
derive class iTask ContactFilter
derive gDefault PhoneCall, RadioCall, EmailMessage, P2000Message, WeatherData, PersonDetails, VesselDetails, SurferDetails, DiverDetails, AirplaneDetails, HelicopterDetails, CommunicationMean, WeatherType, Gender, VesselType, CommunicationMeanType, Feet, Knots, Meters, Temperature, Degrees, Miles
//CloudBase, SeaTemperature, AirTemperature, WaveHeight, SwellDirection, Visibility, WindSpeed, VesselRange
dbReadSDS :: String -> SDSSequence QueryDef [r] () | mbFromSQL r & TC r
dbReadSDS notifyId = databaseDef >++> sqlReadSDS notifyId
......
......@@ -22,6 +22,7 @@ import Text.HTML
| IncorrectDatabaseTables
derive class iTask DatabaseProblem
derive gDefault ContactMap, ContactMapLayer, ContactMapLayerDefinition, ContactMapMarker, ContactMapRegion, ContactTrack, ContactMapMarkerType, DateTime
configureIncidone :: [Workspace -> Task ()]
configureIncidone = map const [configureDatabase <<@ (Title "Database")
......
......@@ -9,6 +9,8 @@ import System.Directory, System.FilePath
import Cadastre.SDS, ChamberOfCommerce.SDS, Compensation.SDS, CivilAffairs.SDS
import StdArray, StdFile
derive gDefault Date
batchProcessing :: Task ()
batchProcessing
= pay
......@@ -25,6 +27,7 @@ pay
>>| viewInformation "Payments performed on:" [] today
>>| pay
viewSelectedCitizen :: Task ()
viewSelectedCitizen
= (enterChoiceWithShared () [ChooseFromGrid (\{Citizen|name,ssn} -> "" <+++ name <+++ " (" <+++ ssn <+++ ")") ] citizens
......
......@@ -12,8 +12,9 @@ playWithMaps = withShared ({defaultValue & icons = shipIcons, tilesUrls = ["/til
manipulateMap m
) <<@ ArrangeWithSideBar 0 LeftSide True @! ()
derive gDefault LeafletSimpleState, LeafletObjectID
manipulateMap :: (Shared sds (LeafletMap,LeafletSimpleState)) -> Task () | RWShared sds
manipulateMap m = updateSharedInformation () [UpdateUsing id (flip const) (customLeafletEditor eventHandlers)] m
manipulateMap m = updateSharedInformation () [UpdateUsing id (flip const) (customLeafletEditor eventHandlers defaultValue)] m
<<@ ApplyLayout (layoutSubUIs (SelectByPath [1]) (setUIAttributes (sizeAttr FlexSize FlexSize))) @! ()
where
eventHandlers = {simpleStateEventHandlers & onHtmlEvent = onHtmlEvent}
......
......@@ -18,7 +18,6 @@ derive gEditor TraxTile
derive gText TraxTile
derive JSONEncode TraxTile
derive JSONDecode TraxTile
derive gDefault TraxTile
derive gEq TraxTile
derive gFDomain TraxTile
instance fromTuple TileEdge TileEdge TraxTile
......@@ -79,7 +78,6 @@ derive gEditor Trax
derive gText Trax
derive JSONEncode Trax
derive JSONDecode Trax
derive gDefault Trax
derive gEq Trax
instance == Trax
instance zero Trax
......
......@@ -20,7 +20,6 @@ derive gEditor TraxTile
derive gText TraxTile
derive JSONEncode TraxTile
derive JSONDecode TraxTile
derive gDefault TraxTile
gFDomain{|TraxTile|} = map fromTuple [(West,East),(North,South),(North,West),(North,East),(South,East),(South,West)]
instance fromTuple TileEdge TileEdge TraxTile where fromTuple (e1,e2) = {end1 = e1, end2 = e2}
instance toTuple TileEdge TileEdge TraxTile where toTuple tile = (tile.end1, tile.end2)
......@@ -121,7 +120,6 @@ derive gEditor Trax
derive gText Trax
derive JSONEncode Trax
derive JSONDecode Trax
derive gDefault Trax
instance == Trax where == t1 t2 = sortBy fst_smaller t1.tiles == sortBy fst_smaller t2.tiles
gEq{|Trax|} t1 t2 = t1 == t2
instance zero Trax where zero = { tiles = [] }
......
definition module iTasks.Extensions.Device.Features
from iTasks.WF.Definition import class iTask
from iTasks.WF.Definition import :: Task, generic gEq, generic gDefault, generic JSONDecode, generic JSONEncode, generic gText, generic gEditor, :: Editor
from iTasks.WF.Definition import :: Task, generic gEq, generic JSONDecode, generic JSONEncode, generic gText, generic gEditor, :: Editor
from iTasks.SDS.Definition import :: SDSLens, :: SimpleSDSLens
from Text.GenJSON import :: JSONNode, generic JSONEncode, generic JSONDecode
from iTasks.Internal.Generic.Visualization import :: TextFormat(..)
......
......@@ -5,7 +5,7 @@ import iTasks.SDS.Sources.Store
import iTasks.Internal.SDS
from iTasks.WF.Tasks.SDS import get, set
from iTasks.WF.Definition import class iTask
from iTasks.WF.Definition import :: Task, generic gEq, generic gDefault, generic JSONDecode, generic JSONEncode, generic gText, generic gEditor, :: Editor, :: TaskId
from iTasks.WF.Definition import :: Task, generic gEq, generic JSONDecode, generic JSONEncode, generic gText, generic gEditor, :: Editor, :: TaskId
from iTasks.Internal.Generic.Visualization import :: TextFormat(..)
from Text.GenJSON import :: JSONNode, generic JSONEncode, generic JSONDecode
from Data.Maybe import :: Maybe
......
definition module iTasks.Extensions.Device.Location
from iTasks.WF.Definition import class iTask
from iTasks.WF.Definition import :: Task, generic gEq, generic gDefault, generic JSONDecode, generic JSONEncode, generic gText, generic gEditor, :: Editor
from iTasks.WF.Definition import :: Task, generic gEq, generic JSONDecode, generic JSONEncode, generic gText, generic gEditor, :: Editor
from iTasks.Internal.Generic.Visualization import :: TextFormat(..)
from Data.Maybe import :: Maybe
from Text.GenJSON import :: JSONNode, generic JSONEncode, generic JSONDecode
......
definition module iTasks.Extensions.Distributed.Authentication
from iTasks.WF.Definition import class iTask
from iTasks.WF.Definition import :: Task, generic gEq, generic gDefault, generic JSONDecode, generic JSONEncode, generic gText, generic gEditor, :: Editor
from iTasks.WF.Definition import :: Task, generic gEq, generic JSONDecode, generic JSONEncode, generic gText, generic gEditor, :: Editor
from Data.Maybe import :: Maybe
from iTasks.Extensions.User import class toUserConstraint(..), :: UserConstraint
from Text.GenJSON import :: JSONNode, generic JSONEncode, generic JSONDecode
......
......@@ -2,7 +2,7 @@ definition module iTasks.Extensions.Distributed.InteractionTasks
from iTasks.WF.Definition import class iTask
import iTasks.Internal.SDS
from iTasks.WF.Definition import :: Task, generic gEq, generic gDefault, generic JSONDecode, generic JSONEncode, generic gText, generic gEditor, :: Editor
from iTasks.WF.Definition import :: Task, generic gEq, generic JSONDecode, generic JSONEncode, generic gText, generic gEditor, :: Editor
from Data.Maybe import :: Maybe
from Text.GenJSON import :: JSONNode, generic JSONEncode, generic JSONDecode
from iTasks.Internal.Generic.Visualization import :: TextFormat(..)
......
definition module iTasks.Extensions.Distributed.Task
from iTasks.WF.Definition import class iTask
from iTasks.WF.Definition import :: Task, generic gEq, generic gDefault, generic JSONDecode, generic JSONEncode, generic gText, generic gEditor, :: Editor
from iTasks.WF.Definition import :: Task, generic gEq, generic JSONDecode, generic JSONEncode, generic gText, generic gEditor, :: Editor
from Data.Maybe import :: Maybe
from iTasks.Extensions.User import class toUserConstraint(..), :: UserConstraint
from Text.GenJSON import :: JSONNode, generic JSONEncode, generic JSONDecode
......
......@@ -4,7 +4,7 @@ import StdString
import StdInt
from iTasks.WF.Definition import class iTask
from iTasks.WF.Definition import :: Task, generic gEq, generic gDefault, generic JSONDecode, generic JSONEncode, generic gText, generic gEditor, :: Editor, :: TaskAttributes
from iTasks.WF.Definition import :: Task, generic gEq, generic JSONDecode, generic JSONEncode, generic gText, generic gEditor, :: Editor, :: TaskAttributes
from Data.Maybe import :: Maybe, maybe
from iTasks.Extensions.User import class toUserConstraint(..), :: UserConstraint, instance toString UserConstraint, instance toUserConstraint User, instance toString UserConstraint
from Text.GenJSON import :: JSONNode, generic JSONEncode, generic JSONDecode
......
......@@ -17,7 +17,6 @@ from iTasks.SDS.Combinators.Common import sdsFocus
from iTasks.UI.Editor import :: Editor
from iTasks.UI.Editor.Generic import generic gEditor
from iTasks.Internal.Generic.Visualization import generic gText, :: TextFormat
from iTasks.Internal.Generic.Defaults import generic gDefault
from Text.GenJSON import generic JSONEncode, generic JSONDecode, :: JSONNode
from Data.GenEq import generic gEq
......
......@@ -11,7 +11,7 @@ from StdFunc import const, o
import System.OS
from iTasks.WF.Definition import class iTask
from iTasks.Internal.Task import :: Task, generic gEq, generic gDefault, generic JSONDecode, generic JSONEncode, generic gText, generic gEditor, :: Editor, :: TaskAttributes
from iTasks.Internal.Task import :: Task, generic gEq, generic JSONDecode, generic JSONEncode, generic gText, generic gEditor, :: Editor, :: TaskAttributes
from Data.Maybe import :: Maybe
from iTasks.Extensions.User import class toUserConstraint(..), :: UserConstraint, instance toString UserConstraint, instance toUserConstraint User, instance toString UserConstraint, instance toString User
from Text.GenJSON import :: JSONNode, generic JSONEncode, generic JSONDecode
......
definition module iTasks.Extensions.Picture.JPEG
from iTasks.WF.Definition import :: Task, generic gEq, generic gDefault, generic JSONDecode, generic JSONEncode, generic gText, generic gEditor, :: Editor
from iTasks.WF.Definition import :: Task, generic gEq, generic JSONDecode, generic JSONEncode, generic gText, generic gEditor, :: Editor
from Text.GenJSON import :: JSONNode, generic JSONEncode, generic JSONDecode
from iTasks.Internal.Generic.Visualization import :: TextFormat(..)
from Data.Maybe import :: Maybe
......@@ -11,7 +11,6 @@ from Data.Map import :: Map
derive gText JPEGPicture
derive JSONEncode JPEGPicture
derive JSONDecode JPEGPicture
derive gDefault JPEGPicture
derive gEq JPEGPicture
derive gEditor JPEGPicture
......@@ -4,7 +4,7 @@ import StdString
from iTasks.Internal.IWorld import :: IWorld
from Data.Maybe import :: Maybe(..)
from iTasks.WF.Definition import :: Task, generic gEq, generic gDefault, generic JSONDecode, generic JSONEncode, generic gText, generic gEditor, :: Editor, :: TaskId
from iTasks.WF.Definition import :: Task, generic gEq, generic JSONDecode, generic JSONEncode, generic gText, generic gEditor, :: Editor, :: TaskId
from Text.GenJSON import :: JSONNode, generic JSONEncode, generic JSONDecode
from iTasks.Internal.Generic.Visualization import :: TextFormat(..)
from Data.Maybe import :: Maybe
......@@ -19,7 +19,6 @@ from iTasks.WF.Combinators.Tune import <<@, class tune
derive gText JPEGPicture
derive JSONEncode JPEGPicture
derive JSONDecode JPEGPicture
derive gDefault JPEGPicture
derive gEq JPEGPicture
gEditor{|JPEGPicture|} = comapEditorValue (\(JPEGPicture val) -> ImgTag [SrcAttr val, AltAttr "no photo", StyleAttr ("max-width: 200px; max-height: 200px;")])
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment