Skip to content

Instantly share code, notes, and snippets.

@franka107ic
Last active April 17, 2021 03:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save franka107ic/04bcaf55e3d373339424f9e2308db3f2 to your computer and use it in GitHub Desktop.
Save franka107ic/04bcaf55e3d373339424f9e2308db3f2 to your computer and use it in GitHub Desktop.
{
"title": "Dashboard Todos",
"favicon": "",
"stylingSetup": {
"layout": {
"topBar": {
"logoUrl": "",
"logoHeight": "60%",
"backgroundGradient": [
"#10B981",
"#047857"
],
"fontColor": "#FFFFFF"
},
"leftPanel": {
"backgroundColor": "#FFF",
"fontColor": "#555",
"focusedFontColor": "#005aa8"
},
"contentContainer": {
"backgroundColor": "#eff2f4",
"fontColor": "#333"
}
},
"elements": {
"table": {
"headerOptions": {
"backgroundColor": "#FFFFFF",
"fontColor": "#555555"
},
"header": {
"backgroundColor": "#10B981",
"fontColor": "#FFF"
},
"items": {
"backgroundColor": "#FFF",
"fontColor": "#777"
},
"itemOptions": {
"fontColor": "#005aa8"
}
},
"form": {
"headerOptions": {
"backgroundColor": "#FFFFFF",
"fontColor": "#555555"
},
"container": {
"backgroundColor": "#FFFFFF",
"fontColor": "#555555"
},
"inputs": {
"backgroundColor": "#f1f6f9",
"fontColor": "#555555"
},
"actions": {
"backgroundColor": "#10B981",
"fontColor": "#FFFFFF"
}
},
"cards": {
"headerOptions": {
"backgroundColor": "#FFFFFF",
"fontColor": "#555555"
},
"card": {
"backgroundColor": "#FFFFFF",
"fontColor": "#555555"
}
},
"dashboard": {
"highlightedItems": {
"backgroundColor": "#FFFFFF",
"fontColor": "#555555"
},
"chartItems": {
"backgroundColor": "#FFFFFF",
"fontColor": "#555555",
"chartColor": {
"type": "hsl",
"setup": {
"h": {
"value": 200
},
"s": {
"value": 100
},
"l": {
"min": 15,
"max": 70
}
}
}
},
"maps": {
"styling": [
{
"elementType": "geometry",
"stylers": [
{
"color": "#f5f5f5"
}
]
},
{
"elementType": "labels.icon",
"stylers": [
{
"visibility": "off"
}
]
},
{
"elementType": "labels.text.fill",
"stylers": [
{
"color": "#616161"
}
]
},
{
"elementType": "labels.text.stroke",
"stylers": [
{
"color": "#f5f5f5"
}
]
},
{
"featureType": "administrative.land_parcel",
"elementType": "labels.text.fill",
"stylers": [
{
"color": "#bdbdbd"
}
]
},
{
"featureType": "poi",
"elementType": "geometry",
"stylers": [
{
"color": "#eeeeee"
}
]
},
{
"featureType": "poi",
"elementType": "labels.text.fill",
"stylers": [
{
"color": "#757575"
}
]
},
{
"featureType": "poi.park",
"elementType": "geometry",
"stylers": [
{
"color": "#e5e5e5"
}
]
},
{
"featureType": "poi.park",
"elementType": "labels.text.fill",
"stylers": [
{
"color": "#9e9e9e"
}
]
},
{
"featureType": "road",
"elementType": "geometry",
"stylers": [
{
"color": "#ffffff"
}
]
},
{
"featureType": "road.arterial",
"elementType": "labels.text.fill",
"stylers": [
{
"color": "#757575"
}
]
},
{
"featureType": "road.highway",
"elementType": "geometry",
"stylers": [
{
"color": "#dadada"
}
]
},
{
"featureType": "road.highway",
"elementType": "labels.text.fill",
"stylers": [
{
"color": "#616161"
}
]
},
{
"featureType": "road.local",
"elementType": "labels.text.fill",
"stylers": [
{
"color": "#9e9e88"
}
]
},
{
"featureType": "transit.line",
"elementType": "geometry",
"stylers": [
{
"color": "#e5e5e5"
}
]
},
{
"featureType": "transit.station",
"elementType": "geometry",
"stylers": [
{
"color": "#eeeeee"
}
]
},
{
"featureType": "water",
"stylers": [
{
"color": "#015aa8"
}
]
},
{
"featureType": "water",
"elementType": "geometry",
"stylers": [
{
"color": "#c9c9c9"
}
]
},
{
"featureType": "water",
"elementType": "geometry.fill",
"stylers": [
{
"color": "#22b0f6"
}
]
},
{
"featureType": "water",
"elementType": "labels.text.fill",
"stylers": [
{
"color": "#9e9e9e"
}
]
}
]
},
"headerOptions": {
"backgroundColor": "#FFFFFF",
"fontColor": "#555555"
},
"tableHeader": {
"backgroundColor": "#005aa8",
"fontColor": "#FFF"
},
"tableItems": {
"backgroundColor": "#FFF",
"fontColor": "#777"
},
"tableItemOptions": {
"fontColor": "#005aa8"
}
}
}
},
"leftItems": [
{
"label": "TODOS",
"childs": [
{
"label": "Todos List",
"icon": "fas fa-list",
"hideIcon": false,
"action": {
"fnKey": "goToState",
"params": {
"stateName": "todos-list"
}
}
}
]
}
],
"layoutSetup": {
"title": "Todos Dashboard",
"leftPanelImage": {
"url": "https://5ffb76a091e821000827671c.projects.ideascloud.io/file-uploads/60796c04e73ff0000986edf3",
"height": "150px"
},
"_headerLeftPanelText": "Todos setup basic",
"user": {
"photo": "",
"name": "User",
"alias": "email@domain.com",
"options": [
{
"label": "Log in console",
"icon": "zmdi zmdi-account",
"|#|action": {
"fnKey": "consoleLog",
"params": {
"asd": 123
}
}
}
]
}
},
" ": [],
"states": [
{
"key": "todos-list",
"params": {
"serviceDataStores": [],
"blockType": "data-table",
"blockParams": {
"title": "Todos Lista",
"tableServiceDataStores": [
{
"key": "todos",
"serviceName": "tutorialGetTodos",
"serviceParams": {}
}
],
"headerOptions": [
{
"type": "action",
"label": "Registrar Todo",
"action": {
"fnKey": "goToState",
"params": {
"stateName": "register-todo",
"stateParams": {}
}
}
}
],
"listSetup": {
"|&|source": "&.tableServiceDataStores.todos",
"options": [
{
"label": "Editar",
"action": {
"fnKey": "goToState",
"params": {
"stateName": "update-todo",
"stateParams": {
"|&|todoId": "&.item._id"
}
}
}
},
{
"label": "Borrar",
"action": {
"fnKey": "callService",
"params": {
"serviceName": "tutorialDeleteTodo",
"serviceParams": {
"|&|id": "&.item._id"
},
"onSuccess": {
"fnKey": "reloadTable"
}
}
}
}
],
"mapping": [
{
"label": "Description",
"content": {
"|&|data": "&.item.description"
}
}
]
}
}
}
},
{
"key": "register-todo",
"params": {
"serviceDataStores": [],
"blockType": "form",
"blockParams": {
"title": "Registrar todo",
"headerOptions": [
{
"type": "action",
"label": "Volver a lista de todos",
"action": {
"fnKey": "goToState",
"params": {
"stateName": "todos-list",
"stateParams": {}
}
}
}
],
"dynamicRender": true,
"formItems": [
{
"type": "input",
"setup": {
"label": "Description",
"outputAlias": "description",
"type": "text"
}
},
{
"type": "action",
"setup": {
"label": "Enviar Datos",
"action": {
"fnKey": "callService",
"params": {
"serviceName": "tutorialCreateTodo",
"serviceParams": {
"|&|description": "&.formOutputsMap.description"
},
"onSuccess": {
"fnKey": "goToState",
"params": {
"stateName": "todos-list",
"stateParams": {}
}
},
"onError": {
"fnKey": "showAlert",
"params": {
"message": "Error registrando"
}
}
}
}
}
}
]
}
}
},
{
"key": "update-todo",
"params": {
"serviceDataStores": [
{
"key": "todoData",
"serviceName": "tutorialGetTodoById",
"serviceParams": {
"|&|id": "&.currentStateParams.todoId"
}
}
],
"blockType": "form",
"blockParams": {
"title": "Editar Todo",
"headerOptions": [
{
"type": "action",
"label": "Volver a lista de todos",
"action": {
"fnKey": "goToState",
"params": {
"stateName": "todos-list",
"stateParams": {}
}
}
}
],
"dynamicRender": true,
"formItems": [
{
"type": "input",
"setup": {
"label": "Nombre",
"outputAlias": "description",
"|&|initValue": "&.serviceDataStores.todoData.description",
"type": "text"
}
},
{
"type": "action",
"setup": {
"label": "Enviar Datos",
"action": {
"fnKey": "callService",
"params": {
"serviceName": "tutorialUpdateTodo",
"serviceParams": {
"|&|description": "&.formOutputsMap.description",
"|&|id": "&.currentStateParams.todoId"
}
}
}
}
}
]
}
}
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment