import Permissions from '/imports/api/util/Permissions.js';

Template['project.details'].helpers({
    data() {
        return {
            getMethod: 'project.get',
            backLink: 'dashboard',
            sections: [{
                header: 'project',
                contents: [{
                    key: 'name',
                    readonly: true
                }, {
                    key: 'news_text',
                    type: 'textbox',
                    readonly: true
                }]
            }, {
                header: 'modules',
                contents: [{
                    key: 'calendar',
                    link: 'calendar',
                    canSee: Permissions.member
                }, {
                    key: 'shifts',
                    link: 'shifts',
                    canSee: Permissions.member
                }, {
                    key: 'knowledgeBase',
                    link: 'wiki',
                    canSee: Permissions.member
                }, {
                    key: 'vessels',
                    link: 'vessel.search',
                    canSee: Permissions.member,
                    custom: (project) => {
                        return project.vesselModule == true;
                    }
                }]
            }, {
                header: 'administration',
                contents: [{
                    key: 'settings',
                    link: 'settings',
                    canSee: Permissions.shiftAdmin
                }, {
                    key: 'publishers',
                    link: 'publisher.search',
                    canSee: Permissions.admin
                }, {
                    key: 'reports',
                    link: 'reports',
                    canSee: Permissions.shiftAndStoreAdmin
                }, {
                    key: 'store',
                    link: 'store',
                    canSee: Permissions.storeAdmin
                }, {
                    key: 'notes',
                    link: 'note.details',
                    canSee: Permissions.shiftAndStoreAdmin
                }]
            }]
        }
    }
});

@@ -195,16 +195,79 @@
 board',%0A
+            navbarStyle: 'flat',%0A            showTitle: false,%0A
         
@@ -303,24 +303,27 @@
     
-header: 'project
+background: 'indigo
 ',%0A 
@@ -399,38 +399,37 @@
             
-readonly: true
+type: 'title'
 %0A           
@@ -507,52 +507,20 @@
 e: '
-textbox',%0A                    readonly: true
+description'
 %0A   

use new title and description field types