diff --git a/src/app/_layout/settings/menu-settings.config.ts b/src/app/_layout/settings/menu-settings.config.ts index 4ab9161..ee68a39 100644 --- a/src/app/_layout/settings/menu-settings.config.ts +++ b/src/app/_layout/settings/menu-settings.config.ts @@ -58,6 +58,11 @@ export const MenuSettingsConfig: MenuConfig = { icon: 'feather ft-user-check', page: '/user-access' }, + { + title: 'Monitoring List', + icon: 'icon-notebook', + page: '/list-monitoring' + }, { title: 'Master', icon: 'feather ft-server', @@ -970,6 +975,11 @@ export const MenuSettingsConfig: MenuConfig = { icon: 'feather ft-user-check', page: '/user-access' }, + { + title: 'Monitoring List', + icon: 'icon-notebook', + page: '/list-monitoring' + }, { title: 'Master', icon: 'feather ft-server', @@ -981,751 +991,775 @@ export const MenuSettingsConfig: MenuConfig = { page: '/master/master-category' }, { - title: 'Master Location', - page: '/master/master-location' + title: 'Master Voltage', + page: '/master/master-voltage' }, { - title: 'Master Location Room', - page: '/master/master-location-room' + title: 'Master Floor', + page: '/master/master-floor' }, { title: 'Master Type', page: '/master/master-type' - } - ] - } - }, - - { section: 'APPS', icon: 'la-ellipsis-h' }, - { - title: 'Dashboard', - icon: 'la-home', - page: 'null', - badge: { type: 'badge-info', value: '3' }, - submenu: { - items: [ - { - title: 'Sales', - page: '/dashboard/sales' }, { - title: 'Ecommerce', - page: '/dashboard/ecommerce' + title: 'Master Status', + page: '/master/master-status' }, { - title: 'Hospital', - page: '/dashboard/hospital' - } - ] - } - }, - { - title: 'Templates', - icon: 'la-television', - page: 'null', - submenu: { - items: [ - { - title: 'Horizontal', - page: 'null' + title: 'Master Duration Use', + page: '/master/master-duration-use' }, { - title: 'Vertical', - page: 'null' - }, - ] - } - }, - { - title: 'To Do', - icon: 'la-edit', - page: '/todo-app' - }, - { - title: 'Contacts', - icon: 'la-users', - page: '/contacts' - }, - { - title: 'Email Application', - icon: 'la-envelope', - page: '/email' - }, - { - title: 'Chat Application', - icon: 'la-comments', - page: '/chats' - }, - { - title: 'Calenders', - icon: 'la-calendar', - page: 'null', - submenu: { - items: [ - { - title: 'Basic', - page: '/calender/basic' + title: 'Master User', + page: '/master/master-user' }, { - title: 'Events', - page: '/calender/events' - }, - - { - title: 'Addevent', - page: '/calender/addevent' - }, - ] - } - }, - { - title: 'KanBan', - icon: 'la-comments', - page: '/kanban' - }, - { section: 'PAGES', icon: 'la-ellipsis-h' }, - { - title: 'News Feed', - icon: 'la-newspaper-o', - page: '/news-feed/news-feed' - }, - { - title: 'Social Feed', - icon: 'la-share-alt', - page: '/social-feed/social-feed' - }, - { - title: 'Invoice', - icon: 'la-clipboard', - page: 'null', - submenu: { - items: [ - { - title: 'Invoice Summary', - page: '/invoice/invoice-summary', + title: 'Master Role', + page: '/master/master-role' }, { - title: 'Invoice Template', - page: '/invoice/invoice-template', + title: 'Master Room', + page: '/master/master-room' }, { - title: 'Invoice List', - page: '/invoice/invoice-list', - }, - ] - } - }, - { - title: 'Timelines', - icon: 'la-film', - page: 'null', - submenu: { - items: [ - { - title: 'Timelines Center', - page: '/timelines/timelines-center', - }, - { - title: 'Timelines Left ', - page: '/timelines/timelines-left', - }, - { - title: 'Timelines Right ', - page: '/timelines/timelines-right', - }, - { - title: 'Timelines Horizontal', - page: '/timelines/timelines-horizontal', + title: 'Master Building', + page: '/master/master-building' } ] } }, - { - title: 'User', - icon: 'la-user', - page: 'null', - submenu: { - items: [ - { - title: 'User Profile', - page: '/user/user-profile', - }, - { - title: 'User Cards', - page: '/user/user-cards', - }, - ] - } - }, - { - title: 'Gallery', - icon: 'la-image', - page: 'null', - submenu: { - items: [ - { - title: 'Gallery Grid', - page: '/gallery/gallery-grid', - }, - { - title: 'Gallery Grid with Desc', - page: '/gallery/gallery-grid-desc', - }, - { - title: 'Masonry Gallery', - page: '/gallery/masonry-gallery', - }, - { - title: 'Hover Effect', - page: '/gallery/hover-effect', - }, - ] - } - }, - { - title: 'File Uploader', - icon: 'la la-cloud-upload', - page: 'null', - submenu: { - items: [ - { - title: 'Dropzone', - page: '/dropzone/dropzone', - } - ] - } - }, - { - title: 'Search', - icon: 'la-search', - page: 'null', - submenu: { - items: [ - { - title: 'Search Page', - page: '/others/searchPage', - }, - { - title: 'Search Website', - page: '/search/searchWebsite', - }, - { - title: 'Search Images', - page: '/search/searchImages', - }, - { - title: 'Search Videos', - page: '/search/searchVideos', - }, - ] - } - }, - { - title: 'Authentication', - icon: 'la-unlock', - page: 'null', - submenu: { - items: [ - { - title: 'Login Simple', - page: '/authentication/loginSimple', - }, - { - title: 'Login With Bg', - page: '/authentication/loginWithBg', - }, - { - title: 'Login With Bg Image', - page: '/authentication/loginWithBgImage', - }, - { - title: 'Login With Navbar', - page: '/authentication/loginWithNavbar', - }, - { - title: 'Login Advanced', - page: '/authentication/loginAdvanced', - }, - { - title: 'Register Simple', - page: '/authentication/registerSimple', - }, - { - title: 'Register With Bg', - page: '/authentication/registerWithBg', - }, - { - title: 'Register With Bg Image', - page: '/authentication/registerWithBgImage', - }, - { - title: 'Register With Navbar', - page: '/authentication/registerWithNavbar', - }, - { - title: 'Register Advanced', - page: '/authentication/registerAdvanced', - }, - { - title: 'Unlock User', - page: '/authentication/unlockUser', - }, - { - title: 'recover-password', - page: '/authentication/recoverPassword', - }, - ] - } - }, - { - title: 'Error', - icon: 'la-warning', - page: 'null', - submenu: { - items: [ - { - title: 'Error 400', - page: '/error/error400', - }, - { - title: 'Error 400 with Navbar', - page: '/error/error400WithNavbar', - }, - { - title: 'Error 401', - page: '/error/error401', - }, - { - title: 'Error 401 with Navbar', - page: '/error/error401WithNavbar', - }, - { - title: 'Error 403', - page: '/error/error403', - }, - { - title: 'Error 403 with Navbar', - page: '/error/error403WithNavbar', - }, - { - title: 'Error 404', - page: '/error/error404', - }, - { - title: 'Error 404 with Navbar', - page: '/error/error404WithNavbar', - }, - { - title: 'Error 500', - page: '/error/error500', - }, - { - title: 'Error 500 with Navbar', - page: '/error/error500WithNavbar', - }, - ] - } - }, - { - title: 'Others', - icon: 'la-file-text', - page: 'null', - submenu: { - items: [ - { - title: 'Coming Soon', - page: 'null', - submenu: { - items: [ - { - title: 'Flat', - page: '/others/flat' - }, - { - title: 'Bg image', - page: '/others/bgImage' - }, - // { - // title: 'Bg video', - // page: '/others/bgVideo' - // }, - ] - } - }, - { - title: 'Maintenance', - page: '/others/maintenance' - }, - ] - } - }, - { section: 'USER INTERFACE', icon: 'la-ellipsis-h' }, - { - title: 'Cards', - page: '/cards/bootstrap', - icon: 'la-tablet' - }, - { - title: 'Advance Cards', - icon: 'la-fire', - page: 'null', - submenu: { - items: [ - { - title: 'Statistics', - page: '/advanceCards/statistics' - }, - { - title: 'Social', - page: '/advanceCards/social' - }, - { - title: 'Charts', - page: '/advanceCards/charts' - }, - ] - } - }, - { - title: 'Components', - icon: 'la-server', - page: 'null', - submenu: { - items: [ - { - title: 'Alerts', - page: '/components/alerts' - }, - { - title: 'Callout', - page: '/components/callout' - }, - { - title: 'Buttons', - page: 'null', - submenu: { - items: [ - { - title: 'Basic Buttons', - page: '/components/basic-buttons' - }, - { - title: 'Extended Buttons', - page: '/components/extended-buttons' - } - ] - } - }, - { - title: 'Carousel', - page: '/components/carousel' - }, - { - title: 'Collapse', - page: '/components/collapse' - }, - { - title: 'Dropdowns', - page: '/components/dropdowns' - }, - { - title: 'List Group', - page: '/components/list-group' - }, - { - title: 'Modals', - page: '/components/modals' - }, - { - title: 'Pagination', - page: '/components/pagination' - }, - { - title: 'Navs Component', - page: '/components/navs' - }, - { - title: 'Pills Component', - page: '/components/pills' - }, - { - title: 'Tooltips', - page: '/components/tooltips' - }, - { - title: 'Popovers', - page: '/components/popovers' - }, - { - title: 'Badges', - page: '/components/badges' - }, - { - title: 'Pill Badges', - page: '/components/pill-badges' - }, - { - title: 'Progress', - page: '/components/progress' - }, - { - title: 'Media Objects', - page: '/components/mediaobjects' - }, - { - title: 'Scrollable', - page: '/components/scrollable' - }, - { - title: 'Spinners', - page: '/components/spinners' - }, - ] - } - }, - { - title: 'Extra Components', - icon: 'la-diamond', - page: 'null', - submenu: { - items: [ - { - title: 'Date Time Picker', - page: '/extraComponents/dateTimePicker' - }, - { - title: 'TypeAhead', - page: '/extraComponents/typeAhead' - }, - { - title: 'Text Editer', - page: '/extraComponents/text-editor' - } - ] - } - }, - { - title: 'Icons', - icon: 'la-eye', - page: 'null', - submenu: { - items: [ - { - title: 'Feather', - page: '/icons/feather' - }, - { - title: 'Line Awesome', - page: '/icons/line-awesome' - }, - { - title: 'Meteocons', - page: '/icons/meteocons' - }, - { - title: 'Simple Line Icons', - page: '/icons/simple-line-icons' - } - ] - } - }, - { section: 'FORMS', icon: 'la-ellipsis-h' }, - { - title: 'Form Elements', + // { section: 'APPS', icon: 'la-ellipsis-h' }, + // { + // title: 'Dashboard', + // icon: 'la-home', + // page: 'null', + // badge: { type: 'badge-info', value: '3' }, + // submenu: { + // items: [ + // { + // title: 'Sales', + // page: '/dashboard/sales' + // }, + // { + // title: 'Ecommerce', + // page: '/dashboard/ecommerce' + // }, + // { + // title: 'Hospital', + // page: '/dashboard/hospital' + // } + // ] + // } + // }, + // { + // title: 'Templates', + // icon: 'la-television', + // page: 'null', + // submenu: { + // items: [ + // { + // title: 'Horizontal', + // page: 'null' + // }, + // { + // title: 'Vertical', + // page: 'null' + // }, + // ] + // } + // }, + // { + // title: 'To Do', + // icon: 'la-edit', + // page: '/todo-app' + // }, + // { + // title: 'Contacts', + // icon: 'la-users', + // page: '/contacts' + // }, + // { + // title: 'Email Application', + // icon: 'la-envelope', + // page: '/email' + // }, + // { + // title: 'Chat Application', + // icon: 'la-comments', + // page: '/chats' + // }, + // { + // title: 'Calenders', + // icon: 'la-calendar', + // page: 'null', + // submenu: { + // items: [ + // { + // title: 'Basic', + // page: '/calender/basic' + // }, + // { + // title: 'Events', + // page: '/calender/events' + // }, - icon: 'la-terminal', - page: 'null', - submenu: { - items: [ - { - title: 'Form Inputs', - page: '/form-elements/form-inputs' - }, - { - title: 'Input Groups', - page: '/form-elements/input-groups' - }, - { - title: 'Input Grid', - page: '/form-elements/input-grid' - }, - { - title: 'Checkboxes & Radios', - page: '/form-elements/checkboxes-radios' - }, - { - title: 'Switch', - page: '/form-elements/switch' - }, - { - title: 'Select', - page: '/form-elements/select' - }, - { - title: 'Extended Inputs', - page: '/form-elements/extendedinputs' - }, - ] - } - }, - { - title: 'Form Layouts', + // { + // title: 'Addevent', + // page: '/calender/addevent' + // }, + // ] + // } + // }, + // { + // title: 'KanBan', + // icon: 'la-comments', + // page: '/kanban' + // }, + // { section: 'PAGES', icon: 'la-ellipsis-h' }, + // { + // title: 'News Feed', + // icon: 'la-newspaper-o', + // page: '/news-feed/news-feed' + // }, + // { + // title: 'Social Feed', + // icon: 'la-share-alt', + // page: '/social-feed/social-feed' + // }, + // { + // title: 'Invoice', + // icon: 'la-clipboard', + // page: 'null', + // submenu: { + // items: [ + // { + // title: 'Invoice Summary', + // page: '/invoice/invoice-summary', + // }, + // { + // title: 'Invoice Template', + // page: '/invoice/invoice-template', + // }, + // { + // title: 'Invoice List', + // page: '/invoice/invoice-list', + // }, + // ] + // } + // }, + // { + // title: 'Timelines', + // icon: 'la-film', + // page: 'null', + // submenu: { + // items: [ + // { + // title: 'Timelines Center', + // page: '/timelines/timelines-center', + // }, + // { + // title: 'Timelines Left ', + // page: '/timelines/timelines-left', + // }, + // { + // title: 'Timelines Right ', + // page: '/timelines/timelines-right', + // }, + // { + // title: 'Timelines Horizontal', + // page: '/timelines/timelines-horizontal', + // } + // ] + // } + // }, + // { + // title: 'User', + // icon: 'la-user', + // page: 'null', + // submenu: { + // items: [ + // { + // title: 'User Profile', + // page: '/user/user-profile', + // }, + // { + // title: 'User Cards', + // page: '/user/user-cards', + // }, + // ] + // } + // }, + // { + // title: 'Gallery', + // icon: 'la-image', + // page: 'null', + // submenu: { + // items: [ + // { + // title: 'Gallery Grid', + // page: '/gallery/gallery-grid', + // }, + // { + // title: 'Gallery Grid with Desc', + // page: '/gallery/gallery-grid-desc', + // }, + // { + // title: 'Masonry Gallery', + // page: '/gallery/masonry-gallery', + // }, + // { + // title: 'Hover Effect', + // page: '/gallery/hover-effect', + // }, + // ] + // } + // }, + // { + // title: 'File Uploader', + // icon: 'la la-cloud-upload', + // page: 'null', + // submenu: { + // items: [ + // { + // title: 'Dropzone', + // page: '/dropzone/dropzone', + // } + // ] + // } + // }, + // { + // title: 'Search', + // icon: 'la-search', + // page: 'null', + // submenu: { + // items: [ + // { + // title: 'Search Page', + // page: '/others/searchPage', + // }, + // { + // title: 'Search Website', + // page: '/search/searchWebsite', + // }, + // { + // title: 'Search Images', + // page: '/search/searchImages', + // }, + // { + // title: 'Search Videos', + // page: '/search/searchVideos', + // }, + // ] + // } + // }, + // { + // title: 'Authentication', + // icon: 'la-unlock', + // page: 'null', + // submenu: { + // items: [ + // { + // title: 'Login Simple', + // page: '/authentication/loginSimple', + // }, + // { + // title: 'Login With Bg', + // page: '/authentication/loginWithBg', + // }, + // { + // title: 'Login With Bg Image', + // page: '/authentication/loginWithBgImage', + // }, + // { + // title: 'Login With Navbar', + // page: '/authentication/loginWithNavbar', + // }, + // { + // title: 'Login Advanced', + // page: '/authentication/loginAdvanced', + // }, + // { + // title: 'Register Simple', + // page: '/authentication/registerSimple', + // }, + // { + // title: 'Register With Bg', + // page: '/authentication/registerWithBg', + // }, + // { + // title: 'Register With Bg Image', + // page: '/authentication/registerWithBgImage', + // }, + // { + // title: 'Register With Navbar', + // page: '/authentication/registerWithNavbar', + // }, + // { + // title: 'Register Advanced', + // page: '/authentication/registerAdvanced', + // }, + // { + // title: 'Unlock User', + // page: '/authentication/unlockUser', + // }, + // { + // title: 'recover-password', + // page: '/authentication/recoverPassword', + // }, + // ] + // } + // }, + // { + // title: 'Error', + // icon: 'la-warning', + // page: 'null', + // submenu: { + // items: [ + // { + // title: 'Error 400', + // page: '/error/error400', + // }, + // { + // title: 'Error 400 with Navbar', + // page: '/error/error400WithNavbar', + // }, + // { + // title: 'Error 401', + // page: '/error/error401', + // }, + // { + // title: 'Error 401 with Navbar', + // page: '/error/error401WithNavbar', + // }, + // { + // title: 'Error 403', + // page: '/error/error403', + // }, + // { + // title: 'Error 403 with Navbar', + // page: '/error/error403WithNavbar', + // }, + // { + // title: 'Error 404', + // page: '/error/error404', + // }, + // { + // title: 'Error 404 with Navbar', + // page: '/error/error404WithNavbar', + // }, + // { + // title: 'Error 500', + // page: '/error/error500', + // }, + // { + // title: 'Error 500 with Navbar', + // page: '/error/error500WithNavbar', + // }, + // ] + // } + // }, + // { + // title: 'Others', + // icon: 'la-file-text', + // page: 'null', + // submenu: { + // items: [ + // { + // title: 'Coming Soon', + // page: 'null', + // submenu: { + // items: [ + // { + // title: 'Flat', + // page: '/others/flat' + // }, + // { + // title: 'Bg image', + // page: '/others/bgImage' + // }, + // // { + // // title: 'Bg video', + // // page: '/others/bgVideo' + // // }, + // ] + // } + // }, + // { + // title: 'Maintenance', + // page: '/others/maintenance' + // }, + // ] + // } + // }, + // { section: 'USER INTERFACE', icon: 'la-ellipsis-h' }, + // { + // title: 'Cards', + // page: '/cards/bootstrap', + // icon: 'la-tablet' + // }, + // { + // title: 'Advance Cards', + // icon: 'la-fire', + // page: 'null', + // submenu: { + // items: [ + // { + // title: 'Statistics', + // page: '/advanceCards/statistics' + // }, + // { + // title: 'Social', + // page: '/advanceCards/social' + // }, + // { + // title: 'Charts', + // page: '/advanceCards/charts' + // }, + // ] + // } + // }, + // { + // title: 'Components', + // icon: 'la-server', + // page: 'null', + // submenu: { + // items: [ + // { + // title: 'Alerts', + // page: '/components/alerts' + // }, + // { + // title: 'Callout', + // page: '/components/callout' + // }, + // { + // title: 'Buttons', + // page: 'null', + // submenu: { + // items: [ + // { + // title: 'Basic Buttons', + // page: '/components/basic-buttons' + // }, + // { + // title: 'Extended Buttons', + // page: '/components/extended-buttons' + // } + // ] + // } + // }, + // { + // title: 'Carousel', + // page: '/components/carousel' + // }, + // { + // title: 'Collapse', + // page: '/components/collapse' + // }, + // { + // title: 'Dropdowns', + // page: '/components/dropdowns' + // }, + // { + // title: 'List Group', + // page: '/components/list-group' + // }, + // { + // title: 'Modals', + // page: '/components/modals' + // }, + // { + // title: 'Pagination', + // page: '/components/pagination' + // }, + // { + // title: 'Navs Component', + // page: '/components/navs' + // }, + // { + // title: 'Pills Component', + // page: '/components/pills' + // }, + // { + // title: 'Tooltips', + // page: '/components/tooltips' + // }, + // { + // title: 'Popovers', + // page: '/components/popovers' + // }, + // { + // title: 'Badges', + // page: '/components/badges' + // }, + // { + // title: 'Pill Badges', + // page: '/components/pill-badges' + // }, + // { + // title: 'Progress', + // page: '/components/progress' + // }, + // { + // title: 'Media Objects', + // page: '/components/mediaobjects' + // }, + // { + // title: 'Scrollable', + // page: '/components/scrollable' + // }, + // { + // title: 'Spinners', + // page: '/components/spinners' + // }, + // ] + // } + // }, + // { + // title: 'Extra Components', + // icon: 'la-diamond', + // page: 'null', + // submenu: { + // items: [ + // { + // title: 'Date Time Picker', + // page: '/extraComponents/dateTimePicker' + // }, + // { + // title: 'TypeAhead', + // page: '/extraComponents/typeAhead' + // }, + // { + // title: 'Text Editer', + // page: '/extraComponents/text-editor' + // } + // ] + // } + // }, + // { + // title: 'Icons', - icon: 'la-file-text', - page: 'null', - submenu: { - items: [ - { - title: 'Basic Forms', - page: '/form-layouts/basic-forms' - }, - { - title: 'Horizontal Forms', - page: '/form-layouts/horizontal-forms' - }, - { - title: 'Hidden Labels', - page: '/form-layouts/hidden-labels' - }, - { - title: 'Form Actions', - page: '/form-layouts/form-actions' - }, - { - title: 'Row Separator', - page: '/form-layouts/row-separator' - }, - { - title: 'Bordered', - page: '/form-layouts/bordered' - }, - { - title: 'Striped Rows', - page: '/form-layouts/striped-rows' - }, - { - title: 'Striped Labels', - page: '/form-layouts/striped-labels' - }, - ] - } - }, - { - title: 'Form Wizard', + // icon: 'la-eye', + // page: 'null', + // submenu: { + // items: [ + // { + // title: 'Feather', + // page: '/icons/feather' + // }, + // { + // title: 'Line Awesome', + // page: '/icons/line-awesome' + // }, + // { + // title: 'Meteocons', + // page: '/icons/meteocons' + // }, + // { + // title: 'Simple Line Icons', + // page: '/icons/simple-line-icons' + // } + // ] + // } + // }, + // { section: 'FORMS', icon: 'la-ellipsis-h' }, + // { + // title: 'Form Elements', - icon: 'la-paste', - page: '/form-wizard', - // submenu: { - // items: [ - // { - // title: 'Circle Style', - // page: '/form-wizard/circle-style' - // }, - // ] - // } - }, - { - title: 'Form Repeater', + // icon: 'la-terminal', + // page: 'null', + // submenu: { + // items: [ + // { + // title: 'Form Inputs', + // page: '/form-elements/form-inputs' + // }, + // { + // title: 'Input Groups', + // page: '/form-elements/input-groups' + // }, + // { + // title: 'Input Grid', + // page: '/form-elements/input-grid' + // }, + // { + // title: 'Checkboxes & Radios', + // page: '/form-elements/checkboxes-radios' + // }, + // { + // title: 'Switch', + // page: '/form-elements/switch' + // }, + // { + // title: 'Select', + // page: '/form-elements/select' + // }, + // { + // title: 'Extended Inputs', + // page: '/form-elements/extendedinputs' + // }, + // ] + // } + // }, + // { + // title: 'Form Layouts', - icon: 'la-repeat', - page: '/form-repeater' - }, - { section: 'TABLE', icon: 'la-ellipsis-h' }, - { - title: 'Boostrap Tables', + // icon: 'la-file-text', + // page: 'null', + // submenu: { + // items: [ + // { + // title: 'Basic Forms', + // page: '/form-layouts/basic-forms' + // }, + // { + // title: 'Horizontal Forms', + // page: '/form-layouts/horizontal-forms' + // }, + // { + // title: 'Hidden Labels', + // page: '/form-layouts/hidden-labels' + // }, + // { + // title: 'Form Actions', + // page: '/form-layouts/form-actions' + // }, + // { + // title: 'Row Separator', + // page: '/form-layouts/row-separator' + // }, + // { + // title: 'Bordered', + // page: '/form-layouts/bordered' + // }, + // { + // title: 'Striped Rows', + // page: '/form-layouts/striped-rows' + // }, + // { + // title: 'Striped Labels', + // page: '/form-layouts/striped-labels' + // }, + // ] + // } + // }, + // { + // title: 'Form Wizard', - icon: 'la-table', - page: 'null', - submenu: { - items: [ - { - title: 'Basic Table', - page: '/boostraptables/basictable' - }, - { - title: 'Table Border', - page: '/boostraptables/tableborder' - }, - { - title: 'Table Sizing', - page: '/boostraptables/tablesizing' - }, - { - title: 'Table Styling', - page: '/boostraptables/tablestyling' - }, - { - title: 'Table Components', - page: '/boostraptables/tablecomponents' - }, - { - title: 'Ngx BoostrapTables', - page: '/boostraptables/ngxboostraptables' - }, - ] - } - }, - { - title: 'Data Tables', + // icon: 'la-paste', + // page: '/form-wizard', + // // submenu: { + // // items: [ + // // { + // // title: 'Circle Style', + // // page: '/form-wizard/circle-style' + // // }, + // // ] + // // } + // }, + // { + // title: 'Form Repeater', - icon: 'la-th', - page: 'null', - submenu: { - items: [ - { - title: 'Basic Installation', - page: '/datatables/basicinitialisation' + // icon: 'la-repeat', + // page: '/form-repeater' + // }, + // { section: 'TABLE', icon: 'la-ellipsis-h' }, + // { + // title: 'Boostrap Tables', - }, - { - title: 'Styling', - page: '/datatables/styling' - }, - { - title: 'API', - page: '/datatables/api' + // icon: 'la-table', + // page: 'null', + // submenu: { + // items: [ + // { + // title: 'Basic Table', + // page: '/boostraptables/basictable' + // }, + // { + // title: 'Table Border', + // page: '/boostraptables/tableborder' + // }, + // { + // title: 'Table Sizing', + // page: '/boostraptables/tablesizing' + // }, + // { + // title: 'Table Styling', + // page: '/boostraptables/tablestyling' + // }, + // { + // title: 'Table Components', + // page: '/boostraptables/tablecomponents' + // }, + // { + // title: 'Ngx BoostrapTables', + // page: '/boostraptables/ngxboostraptables' + // }, + // ] + // } + // }, + // { + // title: 'Data Tables', - }, - ] - } - }, - { - title: 'DataTables Ext', + // icon: 'la-th', + // page: 'null', + // submenu: { + // items: [ + // { + // title: 'Basic Installation', + // page: '/datatables/basicinitialisation' - icon: 'la-th-large', - page: 'null', - submenu: { - items: [ - { - title: 'Buttons', - page: '/datatablesext/buttons' + // }, + // { + // title: 'Styling', + // page: '/datatables/styling' + // }, + // { + // title: 'API', + // page: '/datatables/api' - }, - { - title: 'HTML5 Data Export', - page: '/datatablesext/html5dataexport' + // }, + // ] + // } + // }, + // { + // title: 'DataTables Ext', - }, - { - title: 'Hidden On load', - page: '/datatablesext/hiddentable' + // icon: 'la-th-large', + // page: 'null', + // submenu: { + // items: [ + // { + // title: 'Buttons', + // page: '/datatablesext/buttons' - }, - ] - } - }, - { section: 'CHARTS', icon: 'la-ellipsis-h' }, - { - title: 'Chartjs', - icon: 'la-bar-chart', - page: '/chartjs/charts', - }, - { - title: 'Chartist', - icon: 'la-pie-chart', - page: '/ngchartist/linecharts' - }, + // }, + // { + // title: 'HTML5 Data Export', + // page: '/datatablesext/html5dataexport' + + // }, + // { + // title: 'Hidden On load', + // page: '/datatablesext/hiddentable' + + // }, + // ] + // } + // }, + // { section: 'CHARTS', icon: 'la-ellipsis-h' }, + // { + // title: 'Chartjs', + // icon: 'la-bar-chart', + // page: '/chartjs/charts', + // }, + // { + // title: 'Chartist', + // icon: 'la-pie-chart', + // page: '/ngchartist/linecharts' + // }, // { // title: 'Starter Kit', // icon: 'la-puzzle-piece', diff --git a/src/app/_layout/settings/theme-settings.config.ts b/src/app/_layout/settings/theme-settings.config.ts index 459b4ee..03c010c 100644 --- a/src/app/_layout/settings/theme-settings.config.ts +++ b/src/app/_layout/settings/theme-settings.config.ts @@ -3,7 +3,7 @@ export const ThemeSettingsConfig = { colorTheme: 'semi-dark', // light, semi-light, semi-dark, dark layout: { - style: 'horizontal', // style: 'vertical', horizontal, + style: 'vertical', // style: 'vertical', horizontal, pattern: 'fixed' // fixed, boxed, static }, menuColor: 'menu-dark', // Vertical: [menu-dark, menu-light] , Horizontal: [navbar-dark, navbar-light] diff --git a/src/app/app.routing.ts b/src/app/app.routing.ts index f702c58..824adf6 100644 --- a/src/app/app.routing.ts +++ b/src/app/app.routing.ts @@ -52,6 +52,10 @@ const appRoutes: Routes = [ path: 'monitoring', loadChildren: () => import('../app/content/hemat-app/monitoring/monitoring.module').then(m => m.MonitoringModule) , canActivate: [AuthGuard] }, + { + path: 'list-monitoring', loadChildren: () => import('../app/content/hemat-app/list-monitoring/list-monitoring.module').then(m => m.ListMonitoringModule) + , canActivate: [AuthGuard] + }, { path: 'device', loadChildren: () => import('../app/content/hemat-app/device/device.module').then(m => m.DeviceModule) , canActivate: [AuthGuard] diff --git a/src/app/content/hemat-app/device/add-edit-device/add-edit-device.component.html b/src/app/content/hemat-app/device/add-edit-device/add-edit-device.component.html index 99ea94a..fe6bd51 100644 --- a/src/app/content/hemat-app/device/add-edit-device/add-edit-device.component.html +++ b/src/app/content/hemat-app/device/add-edit-device/add-edit-device.component.html @@ -55,24 +55,24 @@
- +
-
+
- + -
- Interest is required +
+ Type is required
@@ -168,58 +168,58 @@
- + -
- Interest is required +
+ Duration is required
- + -
- Interest is required +
+ Status is required
@@ -228,65 +228,60 @@
- + -
- Interest is required +
+ location room is required
- - - - + /> -
- Interest is required +
+ watt is required
-

+

-
diff --git a/src/app/content/hemat-app/device/add-edit-device/add-edit-device.component.ts b/src/app/content/hemat-app/device/add-edit-device/add-edit-device.component.ts index fe8d480..c44893e 100644 --- a/src/app/content/hemat-app/device/add-edit-device/add-edit-device.component.ts +++ b/src/app/content/hemat-app/device/add-edit-device/add-edit-device.component.ts @@ -11,47 +11,26 @@ import { BuildingService } from "../../service/monitoring-api.service"; }) export class AddEditDeviceComponent implements OnInit{ @ViewChild("f", { read: true }) userProfileForm: NgForm; + dataMasterCategori: any; + dataMasterVoltage: any; + dataMasterType: any; + dataMasterDuration: any; + dataMasterStatus: any; + dataBuildingRoomList: any; + deviceId: any; model: any = {}; dataDevice: any; mode: string; @BlockUI("projectInfo") blockUIProjectInfo: NgBlockUI; - @BlockUI("userProfile") blockUIUserProfile: NgBlockUI; - options = { - minimize: true, - reload: true, - expand: true, - close: true, - }; public breadcrumb: any; projectInfo: FormGroup; submitted = false; - interestedIn = [ - "design", - "development", - "illustration", - "branding", - "video", - "design", - "development", - "illustration", - "branding", - "video", - ]; - budget = [ - "less than 5000$", - "5000$ - 10000$", - "10000$ - 20000$", - "more than 20000$", - ]; - priority = ["Low", "Medium", "High"]; - status = ["Not Started", "Started", "Fixed"]; - constructor( private formBuilder: FormBuilder, private router: Router, @@ -60,28 +39,29 @@ export class AddEditDeviceComponent implements OnInit{ ) {} ngOnInit() { - this.route.data.subscribe((data) => { - this.mode = data.mode; - }); this.route.params.subscribe(params => { - const deviceId = params['id']; - - if (deviceId) { - this.loadDevice(deviceId); + const id = params['id']; + this.deviceId = id; + if (id) { + this.loadDevice(id); + this.dataListMaster(); + this.dataListRoomBuilding(); } }); this.setBreadcrumb() + this.route.data.subscribe((data) => { + this.mode = data.mode; + }); this.projectInfo = this.formBuilder.group({ name: ["", Validators.required], - lastName: ["", Validators.required], - email: ["", [Validators.required, Validators.email]], - phone: ["", Validators.required], - company: ["", Validators.required], - interestedIn: ["", Validators.required], - budget: ["", Validators.required], - selectFile: [, Validators.required], - aboutProject: ["", Validators.required], + categoryId: ["", Validators.required], + voltageId: ["", Validators.required], + typeId: ["", Validators.required], + durationId: ["", Validators.required], + statusId: ["", Validators.required], + roomBuildingId: ["", Validators.required], + watt: ["", Validators.required], }); } @@ -92,11 +72,70 @@ export class AddEditDeviceComponent implements OnInit{ }); } + dataListMaster() { + this.monitoringApiService.getMasterListData().subscribe(data => { + const dataCategory = data.data.find( + (item) => item.name === "master_category" + ).headerDetailParam; + this.dataMasterCategori = dataCategory.filter(item => item.status === "2") + + const dataVoltage = data.data.find( + (item) => item.name === "master_voltage" + ).headerDetailParam; + this.dataMasterVoltage = dataVoltage.filter(item => item.status === "2") + + const dataType = data.data.find( + (item) => item.name === "master_type" + ).headerDetailParam; + this.dataMasterType = dataType.filter(item => item.status === "2") + + const dataDuration = data.data.find( + (item) => item.name === "master_duration" + ).headerDetailParam; + this.dataMasterDuration = dataDuration.filter(item => item.status === "2") + + const dataStatus = data.data.find( + (item) => item.name === "master_status" + ).headerDetailParam; + this.dataMasterStatus = dataStatus.filter(item => item.status === "2") + }); + } + + dataListRoomBuilding() { + this.monitoringApiService.getBuildingRoomList().subscribe(data => { + const newArray = data.results.data.map(item => ({ + id: item.id, + name: `${item.buildingEntity.name} (${item.roomEntity.name})` + })); + this.dataBuildingRoomList = newArray + }); + } + formGetDevice(data){ - console.log(data); this.projectInfo.patchValue({ name: data.data.name, + categoryId: data.data.categoryId, + voltageId: data.data.voltageId, + typeId: data.data.typeId, + durationId: data.data.durationId, + statusId: data.data.statusId, + roomBuildingId: data.data.roomBuildingId, + watt: data.data.watt }); + if (this.mode === 'view') { + this.formDisable(); + } + } + + formDisable(){ + this.projectInfo.get('name').disable() + this.projectInfo.get('categoryId').disable() + this.projectInfo.get('voltageId').disable() + this.projectInfo.get('typeId').disable() + this.projectInfo.get('durationId').disable() + this.projectInfo.get('statusId').disable() + this.projectInfo.get('roomBuildingId').disable() + this.projectInfo.get('watt').disable() } setBreadcrumb() { @@ -189,7 +228,9 @@ export class AddEditDeviceComponent implements OnInit{ } saveEdit() { - + this.monitoringApiService.putDevice(this.projectInfo.value, this.deviceId).subscribe(data => { + this.router.navigate(["/device"]); + }); } cancel() { diff --git a/src/app/content/hemat-app/device/device-routing.module.ts b/src/app/content/hemat-app/device/device-routing.module.ts deleted file mode 100644 index e69de29..0000000 diff --git a/src/app/content/hemat-app/list-monitoring/list-monitoring.component.css b/src/app/content/hemat-app/list-monitoring/list-monitoring.component.css new file mode 100644 index 0000000..bd893c0 --- /dev/null +++ b/src/app/content/hemat-app/list-monitoring/list-monitoring.component.css @@ -0,0 +1,190 @@ +:host ::ng-deep .ngx-datatable.bootstrap .datatable-header .datatable-header-cell .datatable-header-cell-label { + font-family: inherit; + font-size: medium; + font-weight: bold; + color: #6B6F82; +} +:host ::ng-deep .ngx-datatable .datatable-row-center, .ngx-datatable .datatable-row-group, .ngx-datatable .datatable-row-right { + position: relative; + height: 50px !important; +} + +:host ::ng-deep .datatable-icon-right:before { + font-family: 'icofont'; + font-style: normal; +} + +:host ::ng-deep .datatable-icon-skip:before { + font-family: 'icofont'; + font-style: normal; +} + +:host ::ng-deep .datatable-icon-left:before { + font-family: 'icofont'; + font-style: normal; +} + +:host ::ng-deep .datatable-icon-left:before { + content: "\2039"; + font-size: x-large; +} + +:host ::ng-deep .datatable-icon-prev:before { + content: "\00AB"; + font-size: x-large; +} + +:host ::ng-deep .datatable-icon-right:before { + content: "\203A"; + font-size: x-large; +} + +:host ::ng-deep .datatable-icon-skip:before { + content: "\00BB"; + font-size: x-large; +} + +:host ::ng-deep .ngx-datatable.bootstrap .datatable-footer .datatable-pager .datatable-icon-left, +.ngx-datatable.bootstrap .datatable-footer .datatable-pager .datatable-icon-right, +.ngx-datatable.bootstrap .datatable-footer .datatable-pager .datatable-icon-prev { + font-size: 16px; + line-height: 22px; + padding: 0px 09px; + background-color: #d4d2e7; +} + +:host ::ng-deep .ngx-datatable.bootstrap .datatable-footer .datatable-pager .datatable-icon-right, +.ngx-datatable.bootstrap .datatable-footer .datatable-pager .datatable-icon-right { + font-size: 16px; + line-height: 22px; + padding: 0px 09px; + background-color: #d4d2e7; +} + +:host ::ng-deep .ngx-datatable.bootstrap .datatable-footer .datatable-pager .datatable-icon-skip { + font-size: 16px; + line-height: 22px; + padding: 0px 09px; + background-color: #d4d2e7; +} + +:host ::ng-deep .ngx-datatable.bootstrap .datatable-footer .datatable-pager .datatable-icon-prev { + font-size: 16px; + line-height: 22px; + padding: 0px 09px; + background-color: #d4d2e7; +} + +:host ::ng-deep .datatable-footer .datatable-pager ul li:not(.disabled).active a, +.ngx-datatable.bootstrap[_ngcontent-c11] .datatable-footer[_ngcontent-c11] .datatable-pager[_ngcontent-c11] ul[_ngcontent-c11] li[_ngcontent-c11]:not(.disabled):hover a[_ngcontent-c11] { + background-color: #d4d2e7; + font-weight: bold; + font-size: larger; +} + +:host ::ng-deep .ngx-datatable.bootstrap .datatable-footer .datatable-pager a { + height: 32px; + min-width: 34px; + line-height: 22px; + padding: 0; + border-radius: 3px; + margin: 0 3px; + text-align: center; + vertical-align: top; + padding-top: 3px; + text-decoration: none; + vertical-align: bottom; + color: #7c8091; +} + +:host ::ng-deep .ngx-datatable.bootstrap .datatable-footer .datatable-pager .datatable-icon-left, +.ngx-datatable.bootstrap[_ngcontent-c11] .datatable-footer[_ngcontent-c11] .datatable-pager[_ngcontent-c11] .datatable-icon-right[_ngcontent-c11], +.ngx-datatable.bootstrap[_ngcontent-c11] .datatable-footer[_ngcontent-c11] .datatable-pager[_ngcontent-c11] .datatable-icon-prev[_ngcontent-c11] { + font-size: 14px; + line-height: 9px; + padding: 0px 08px; + background-color: #ffffff; +} + +:host ::ng-deep .ngx-datatable.bootstrap .datatable-footer .datatable-pager .datatable-icon-left, +.ngx-datatable.bootstrap[_ngcontent-c11] .datatable-footer[_ngcontent-c11] .datatable-pager[_ngcontent-c11] .datatable-icon-right[_ngcontent-c11], +.ngx-datatable.bootstrap[_ngcontent-c11] .datatable-footer[_ngcontent-c11] .datatable-pager[_ngcontent-c11] .datatable-icon-prev[_ngcontent-c11] { + font-size: 0px; + line-height: 22px; + padding: 0px 09px; + background-color: #ffffff; +} + +:host ::ng-deep .ngx-datatable.bootstrap .datatable-footer .datatable-pager .datatable-icon-right, +.ngx-datatable.bootstrap[_ngcontent-c11] .datatable-footer[_ngcontent-c11] .datatable-pager[_ngcontent-c11] .datatable-icon-right[_ngcontent-c11], +.ngx-datatable.bootstrap[_ngcontent-c11] .datatable-footer[_ngcontent-c11] .datatable-pager[_ngcontent-c11] .datatable-icon-prev[_ngcontent-c11] { + font-size: 0px; + line-height: 22px; + padding: 0px 09px; + background-color: #ffffff; +} + +:host ::ng-deep .ngx-datatable.bootstrap .datatable-footer .datatable-pager .datatable-icon-skip, +.ngx-datatable.bootstrap[_ngcontent-c11] .datatable-footer[_ngcontent-c11] .datatable-pager[_ngcontent-c11] .datatable-icon-right[_ngcontent-c11], +.ngx-datatable.bootstrap[_ngcontent-c11] .datatable-footer[_ngcontent-c11] .datatable-pager[_ngcontent-c11] .datatable-icon-prev[_ngcontent-c11] { + font-size: 0px; + line-height: 22px; + padding: 0px 09px; + background-color: #ffffff; +} + +:host ::ng-deep .ngx-datatable.bootstrap .datatable-footer .datatable-pager .datatable-icon-prev, +.ngx-datatable.bootstrap[_ngcontent-c11] .datatable-footer[_ngcontent-c11] .datatable-pager[_ngcontent-c11] .datatable-icon-right[_ngcontent-c11], +.ngx-datatable.bootstrap[_ngcontent-c11] .datatable-footer[_ngcontent-c11] .datatable-pager[_ngcontent-c11] .datatable-icon-prev[_ngcontent-c11] { + font-size: 0px; + line-height: 22px; + padding: 0px 09px; + background-color: #ffffff; +} + +:host ::ng-deep .ngx-datatable.bootstrap .datatable-footer .datatable-pager ul li:not(.disabled):hover a { + background-color: #545454; + font-weight: bold; + color: white; + +} + +:host ::ng-deep .ngx-datatable.bootstrap .datatable-footer .datatable-pager ul li:not(.disabled).active a, +.ngx-datatable.bootstrap .datatable-footer .datatable-pager ul li:not(.disabled):hover a { + background-color: #545454; + font-weight: bold; + color: white; +} + +:host ::ng-deep .ngx-datatable.bootstrap .datatable-footer { + background: #727e8e; + color: #ededed; + margin-top: -1px; + overflow: inherit; +} + +:host ::ng-deep .ngx-datatable.bootstrap .datatable-header { + font-weight: bold; + height: unset !important; + overflow: inherit +} + +:host ::ng-deep .ngx-datatable .datatable-footer .datatable-pager { + flex: 0 0 0%; +} + +:host ::ng-deep .ngx-datatable .datatable-footer .datatable-pager .pager { + display: flex; +} + +:host ::ng-deep .block-ui-wrapper { + background: rgba(255, 249, 249, 0.5) !important; +} +:host ::ng-deep .ngx-datatable .datatable-footer .selected-count .datatable-pager { + flex: 0 0 0%; +} + +:host ::ng-deep .ngx-datatable { + display: -webkit-box; +} + diff --git a/src/app/content/hemat-app/list-monitoring/list-monitoring.component.html b/src/app/content/hemat-app/list-monitoring/list-monitoring.component.html new file mode 100644 index 0000000..d3e6ad3 --- /dev/null +++ b/src/app/content/hemat-app/list-monitoring/list-monitoring.component.html @@ -0,0 +1,192 @@ +
+
+
+ +
+
+
+
+
+ + + Cost Management Table + + +
+
+ +
+
+ +
+
+
+ + + + {{ rowIndex + 1 }} + + + + + Estimasi Cost Name + + + {{ value }} + + + + + Category + + + {{ value }} + + + + + Location + + + {{ value }} + + + + + Location Room + + + {{ value }} + + + + + Duration Use + + + {{ value }} + + + + + Status + + + {{ value }} + + + + + + + + + + +
+
+
+
+
+
+
+
+
+ \ No newline at end of file diff --git a/src/app/content/hemat-app/list-monitoring/list-monitoring.component.spec.ts b/src/app/content/hemat-app/list-monitoring/list-monitoring.component.spec.ts new file mode 100644 index 0000000..fee68f2 --- /dev/null +++ b/src/app/content/hemat-app/list-monitoring/list-monitoring.component.spec.ts @@ -0,0 +1,23 @@ +import { ComponentFixture, TestBed } from '@angular/core/testing'; + +import { ListMonitoringComponent } from './list-monitoring.component'; + +describe('ListMonitoringComponent', () => { + let component: ListMonitoringComponent; + let fixture: ComponentFixture; + + beforeEach(async () => { + await TestBed.configureTestingModule({ + declarations: [ ListMonitoringComponent ] + }) + .compileComponents(); + + fixture = TestBed.createComponent(ListMonitoringComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/content/hemat-app/list-monitoring/list-monitoring.component.ts b/src/app/content/hemat-app/list-monitoring/list-monitoring.component.ts new file mode 100644 index 0000000..5280576 --- /dev/null +++ b/src/app/content/hemat-app/list-monitoring/list-monitoring.component.ts @@ -0,0 +1,82 @@ +import { Component } from '@angular/core'; +import { Router } from '@angular/router'; +import { TableApiService } from 'src/app/_services/table-api.service'; + +@Component({ + selector: 'app-list-monitoring', + templateUrl: './list-monitoring.component.html', + styleUrls: ['./list-monitoring.component.css'] +}) +export class ListMonitoringComponent { + public breadcrumb: any; + data: any; + filteredRows: any[]; + searchTerm: string = ""; + rows: any = []; + + constructor( + private tableApiservice: TableApiService, + private router: Router + ) {} + + ngOnInit() { + this.breadcrumb = { + mainlabel: "Cost Management", + links: [ + { + name: "Home", + isLink: false, + }, + { + name: "Cost Management", + isLink: false, + }, + ], + }; + this.fetchData(); + } + + fetchData() { + this.tableApiservice.getTableInitialisationData().subscribe((response) => { + this.data = response; + this.filteredRows = this.data.rows; + }); + } + + filterRows() { + if (!this.searchTerm) { + this.filteredRows = [...this.data.rows]; + } else { + this.filteredRows = this.data.rows.filter((row) => + this.rowContainsSearchTerm(row) + ); + } + } + + rowContainsSearchTerm(row: any): boolean { + const searchTermLC = this.searchTerm.toLowerCase(); + return Object.values(row).some( + (value) => + value !== null && + value.toString().toLowerCase().includes(searchTermLC) + ); + } + + viewRow(row) { + console.log("View row:", row); + this.router.navigate(["/cost-management/view", row.name]); + } + + editRow(row) { + console.log("Edit row:", row); + this.router.navigate(["/cost-management/edit", row.name]); + } + + deleteRow(row) { + console.log("Delete row:", row); + } + + onTouchStart(event: Event) { + event.preventDefault(); // Add this if necessary + } +} diff --git a/src/app/content/hemat-app/list-monitoring/list-monitoring.module.ts b/src/app/content/hemat-app/list-monitoring/list-monitoring.module.ts new file mode 100644 index 0000000..ce4523f --- /dev/null +++ b/src/app/content/hemat-app/list-monitoring/list-monitoring.module.ts @@ -0,0 +1,44 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { RouterModule } from '@angular/router'; +import { NgxDatatableModule } from '@swimlane/ngx-datatable'; + +import { NgSelectModule } from '@ng-select/ng-select'; +import { FormsModule, ReactiveFormsModule } from '@angular/forms'; +import { ClipboardModule } from 'ngx-clipboard'; +import { CardModule } from '../../partials/general/card/card.module'; +import { BreadcrumbModule } from 'src/app/_layout/breadcrumb/breadcrumb.module'; +import { BlockUIModule } from 'ng-block-ui'; +import { BlockTemplateComponent } from '../../../_layout/blockui/block-template.component'; +import { PerfectScrollbarModule } from 'ngx-perfect-scrollbar'; +import { ListMonitoringComponent } from './list-monitoring.component'; + + + +@NgModule({ + declarations: [ + ListMonitoringComponent + ], + imports: [ + CommonModule, + CardModule, + BreadcrumbModule, + NgSelectModule, + FormsModule, + ReactiveFormsModule, + ClipboardModule, + PerfectScrollbarModule, + NgxDatatableModule, + BlockUIModule.forRoot({ + template: BlockTemplateComponent + }), + RouterModule.forChild([ + { + path: '', + component: ListMonitoringComponent + }, + + ]) + ] +}) +export class ListMonitoringModule { } diff --git a/src/app/content/hemat-app/master/add-edit-master/add-edit-master.component.html b/src/app/content/hemat-app/master/add-edit-master/add-edit-master.component.html index 511590b..ea1c758 100644 --- a/src/app/content/hemat-app/master/add-edit-master/add-edit-master.component.html +++ b/src/app/content/hemat-app/master/add-edit-master/add-edit-master.component.html @@ -23,8 +23,9 @@ class="form-control" formControlName="status" > - - +
diff --git a/src/app/content/hemat-app/master/add-edit-master/add-edit-master.component.ts b/src/app/content/hemat-app/master/add-edit-master/add-edit-master.component.ts index 2546889..183ea6b 100644 --- a/src/app/content/hemat-app/master/add-edit-master/add-edit-master.component.ts +++ b/src/app/content/hemat-app/master/add-edit-master/add-edit-master.component.ts @@ -1,25 +1,29 @@ -import { Component, Input, OnInit } from '@angular/core'; -import { FormBuilder, FormGroup, Validators } from '@angular/forms'; -import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'; +import { Component, Input, OnInit } from "@angular/core"; +import { FormBuilder, FormGroup, Validators } from "@angular/forms"; +import { NgbActiveModal } from "@ng-bootstrap/ng-bootstrap"; +import { BuildingService } from "../../service/monitoring-api.service"; @Component({ - selector: 'app-add-edit-master', - templateUrl: './add-edit-master.component.html', - styleUrls: ['./add-edit-master.component.css'] + selector: "app-add-edit-master", + templateUrl: "./add-edit-master.component.html", + styleUrls: ["./add-edit-master.component.css"], }) -export class AddEditMasterComponent implements OnInit{ +export class AddEditMasterComponent implements OnInit { @Input() headerId: number; @Input() dataRow: any; @Input() mode: any; myForm: FormGroup; + dataMasterStatus: any; - constructor(public activeModal: NgbActiveModal, private fb: FormBuilder) {} + constructor( + public activeModal: NgbActiveModal, + private fb: FormBuilder, + private monitoringApiService: BuildingService + ) {} ngOnInit() { this.createForm(); - console.log(this.dataRow); - console.log(this.headerId); - console.log(this.mode); + this.dataListMaster(); if (this.dataRow) { this.editForm(); } @@ -27,18 +31,27 @@ export class AddEditMasterComponent implements OnInit{ createForm() { this.myForm = this.fb.group({ - name: ['', Validators.required], - status: ['', Validators.required], - headerId: this.headerId + name: ["", Validators.required], + status: [2, Validators.required], + headerId: this.headerId, }); } - editForm(){ + editForm() { this.myForm = this.fb.group({ id: this.dataRow.id, name: this.dataRow.name, status: this.dataRow.status, - headerId: this.dataRow.headerId + headerId: this.dataRow.headerId, + }); + } + + dataListMaster() { + this.monitoringApiService.getMasterListData().subscribe((data) => { + const dataCategory = data.data.find( + (item) => item.name === "master_status" + ).headerDetailParam; + this.dataMasterStatus = dataCategory.filter(item => item.status === "2"); }); } diff --git a/src/app/content/hemat-app/master/master-category/master-category.component.html b/src/app/content/hemat-app/master/master-category/master-category.component.html index b25954e..0199338 100644 --- a/src/app/content/hemat-app/master/master-category/master-category.component.html +++ b/src/app/content/hemat-app/master/master-category/master-category.component.html @@ -86,7 +86,7 @@ ngx-datatable-cell-template let-value="value" > - {{ value === '1' ? 'Aktif' : 'Tidak Aktif'}} + {{ value === '2' ? 'Aktif' : 'Tidak Aktif'}} - {{ value === '1' ? 'Aktif' : 'Tidak Aktif'}} + {{ value === '2' ? 'Aktif' : 'Tidak Aktif'}} - {{ value === '1' ? 'Aktif' : 'Tidak Aktif'}} + {{ value === '2' ? 'Aktif' : 'Tidak Aktif'}} - {{ value === '1' ? 'Aktif' : 'Tidak Aktif'}} + {{ value === '2' ? 'Aktif' : 'Tidak Aktif'}} - {{ value === '1' ? 'Aktif' : 'Tidak Aktif'}} + {{ value === '2' ? 'Aktif' : 'Tidak Aktif'}} - {{ value === '1' ? 'Aktif' : 'Tidak Aktif'}} + {{ value === '2' ? 'Aktif' : 'Tidak Aktif'}} - {{ value === '1' ? 'Aktif' : 'Tidak Aktif'}} + {{ value === '2' ? 'Aktif' : 'Tidak Aktif'}}
- + -->
diff --git a/src/app/content/hemat-app/service/monitoring-api.service.ts b/src/app/content/hemat-app/service/monitoring-api.service.ts index cd0c050..de03f2b 100644 --- a/src/app/content/hemat-app/service/monitoring-api.service.ts +++ b/src/app/content/hemat-app/service/monitoring-api.service.ts @@ -81,6 +81,15 @@ export class BuildingService { return this.http.get(url, { headers }); } + getMasterListData(): Observable { + const url = `https://kapi.absys.ninja/hemat/header-param/list`; + const headers = new HttpHeaders({ + 'Content-Type': 'application/json', + 'x-api-key': 'j2yaYvPSQcsEEmHh3NEobfiXyyXmmnHT' + }); + return this.http.get(url, { headers }); + } + getMasterData(page: number = 1, limit: number = 100): Observable { const url = `https://kapi.absys.ninja/hemat/header-param?page=${page}&limit=${limit}`; const headers = new HttpHeaders({ @@ -194,4 +203,22 @@ export class BuildingService { }); return this.http.post(url, data, { headers }); } + + getBuildingRoomList(page: number = 1, limit: number = 100): Observable { + const url = `https://kapi.absys.ninja/hemat/room-building?page=${page}&limit=${limit}`; + const headers = new HttpHeaders({ + 'Content-Type': 'application/json', + 'x-api-key': 'j2yaYvPSQcsEEmHh3NEobfiXyyXmmnHT' + }); + return this.http.get(url, { headers }); + } + + putDevice(data: any, id: any): Observable { + const url = `https://kapi.absys.ninja/hemat/devices/${id}`; + const headers = new HttpHeaders({ + 'Content-Type': 'application/json', + 'x-api-key': 'j2yaYvPSQcsEEmHh3NEobfiXyyXmmnHT' + }); + return this.http.put(url, data, { headers }); + } } diff --git a/src/assets/sass/scss/core/layouts/_content.scss b/src/assets/sass/scss/core/layouts/_content.scss index 0a951e0..28e9bed 100644 --- a/src/assets/sass/scss/core/layouts/_content.scss +++ b/src/assets/sass/scss/core/layouts/_content.scss @@ -16,7 +16,7 @@ html { width: 100%; body { - height: 900px; + height: 100%; &.fixed-navbar { padding-top: $navbar-height;