image: img/spreadsheet-templates-employee-directory.jpg folder: human-resources-and-legal category: template
const config = {
tabs: true,
toolbar: true,
plugins: { orgchart },
worksheets: [{
data: [
{
"id":1,
"name":"Jorge",
"role":"1",
"parent":0,
"img":"img/nophoto.jpg",
"department":1,
"extension":"3120",
},
{
"id":2,
"name":"Antonio",
"role":"2",
"parent":1,
"img":"img/nophoto.jpg",
"department":2,
"extension":"3121",
},
{
"id":3,
"name":"Manoel",
"role":"3",
"parent":1,
"img":"img/nophoto.jpg",
"department":2,
"extension":"3123",
},
{
"id":4,
"name":"Pedro",
"role":"4",
"parent":3,
"img":"img/nophoto.jpg",
"department":2,
"extension":"3124",
},
{
"id":5,
"name":"Carlos",
"role":"4",
"parent":3,
"img":"img/nophoto.jpg",
"department":3,
"extension":"3125",
},
{
"id":6,
"name":"Marcos",
"role":"5",
"parent":2,
"img":"img/nophoto.jpg",
"department":3,
"extension":"3126",
},
{
"id":7,
"name":"Ana",
"role":"6",
"parent":2,
"img":"img/nophoto.jpg",
"department":3,
"extension":"3127",
},
{
"id":8,
"name":"Nicolly",
"role":"7",
"parent":2,
"img":"img/nophoto.jpg",
"department":4,
"extension":"3128",
},
{
"id":9,
"name":"Paulo",
"role":"5",
"parent":7,
"img":"img/nophoto.jpg",
"department":4,
"extension":"3129",
},
{
"id":10,
"name":"Iris",
"role":"5",
"parent":7,
"img":"img/nophoto.jpg",
"department":4,
"extension":"3130",
}
],
columnDrag: false,
minDimensions: [7, 5],
worksheetName: 'Employees',
worksheetId: 'employees',
role: 'organogram',
columnDrag: false,
columns: [
{
title: 'Id',
type: 'autonumber',
name: 'id',
readOnly: true,
primaryKey: true,
},
{
title: 'Name',
type: 'text',
name: 'name',
width: '140px',
},
{
title: 'Photo',
type: 'image',
name: 'img',
width: '80px',
render: 'round',
},
{
title: 'Role',
type: 'record',
name: 'role',
width: '180px',
worksheetId: 'roles',
worksheetColumn: 1,
},
{
title: 'Department',
type: 'record',
name: 'department',
width: '180px',
worksheetId: 'departments',
},
{
title: 'Manager',
type: 'record',
name: 'parent',
width: '100px',
worksheetId: 'employees',
worksheetColumn: 1,
},
{
title: 'Extension',
name: 'extension',
width: '80px'
},
],
},
{
data: [
{ id: 1, data: [ 'Board', '1233', '1' ] },
{ id: 2, data: [ 'Accounts', '1231', '2' ] },
{ id: 3, data: [ 'Marketing', '1230', '3' ] },
{ id: 4, data: [ 'Sales', '1232', '4' ] },
],
columnDrag: false,
minDimensions: [3, 10],
worksheetName: 'Departments',
worksheetId: 'departments',
columns: [
{
type: 'text',
title: 'Department',
width: '300px'
},
{
type: 'text',
align: 'center',
title: 'General extension',
width: '140px'
},
{
type: 'record',
title: 'Director',
width: '200px',
worksheetId: 'employees',
worksheetColumn: 1,
},
],
},
{
data: [
{ id: 1, name: 'CEO', color: '#b71c1c' },
{ id: 2, name: 'Vice president', color: '#880e4f' },
{ id: 3, name: 'Production manager', color: '#4a148c' },
{ id: 4, name: 'Intern', color: '#1a237e' },
{ id: 5, name: 'Marketing manager', color: '#0d47a1' },
{ id: 6, name: 'Sales manager', color: '#006064' },
{ id: 7, name: 'Sales assistant', color: '#004d40' },
{ id: 8, name: 'Operations manager', color: '#1b5e20' },
],
minDimensions: [4, 10],
columnDrag: false,
worksheetName: 'Roles',
worksheetId: 'roles',
role: 'roles',
columns: [
{
type: 'autonumber',
title: 'Id',
width: '60px',
readOnly: true,
primaryKey: true,
name: 'id',
},
{
type: 'text',
title: 'Role',
width: '200px',
name: 'name',
},
{
title: 'Status',
type: 'color',
render: 'square',
width: '100px',
name: 'color',
},
{
type: 'Notes',
title: 'Activities',
width: '400px',
name: 'activities',
},
],
},
]
}