text: angular.module("pbApp.employees").run(["$templateCache", function($templateCache) {$templateCache.put("directives/employee-detail.directive.html","<md-content layout=\"column\">\n    <div layout=\"row\" layout-align=\"center center\" class=\"employee-detail_name\" layout-padding>\n        <div layout=\"column\" layout-align=\"start start\" layout-padding>\n            <h3 class=\"md-headline\">\n                {{ employee.surname }}\n                <span class=\"md-title\">{{ employee.firstname }} {{ employee.patronymic }}</span>\n            </h3>\n            <p class=\"md-body-1\" ng-hide=\"employee.is_retired\">{{ employee.position }}</p>\n            <p class=\"md-body-1\" ng-show=\"employee.is_retired\">\n                Уволился (На момент увольнения: {{ employee.position }})\n            </p>\n            <div>\n                <p class=\"md-caption\">\n                    {{ employee.company.name }}\n                    <md-icon ng-show=\"employee.center.name\" class=\"pb-text-pale-white\">chevron_right</md-icon>\n\n                    {{ employee.center.number }}\n                    <span ng-show=\"employee.center.number && employee.center.name\">&nbsp-&nbsp</span>\n                    {{ employee.center.name }}\n\n                    <md-icon ng-show=\"employee.division.name\" class=\"pb-text-pale-white\">chevron_right</md-icon>\n\n                    {{ employee.division.number }}\n                    <span ng-show=\"employee.division.number && employee.division.name\">&nbsp-&nbsp</span>\n                    {{ employee.division.name }}\n                    &nbsp\n                </p>\n                <md-divider ng-if=\"employee.place\"></md-divier>\n                <p>{{ employee.place }}</p>\n            </div>\n        </div>\n    </div>\n\n    <div layout-padding class=\"md-whiteframe-z2\">\n        <md-list ng-if=\"employee.phones.length || employee.emails.length\">\n            <md-list-item class=\"md-2-line\" ng-repeat=\"phone in employee.phones\">\n                <md-icon ng-if=\"$first\">phone</md-icon>\n                <div class=\"md-list-item-text\" ng-class=\"{\'md-offset\': !$first}\">\n                    <h4 >{{ phone.number | formatPhone }}</h4>\n                    <p>\n                        {{ phone.category }}\n                        <span ng-show=\"phone.comment\"> ({{ phone.comment }})</span>\n                    </p>\n                </div>\n            </md-list-item>\n            <md-list-item class=\"md-2-line\" ng-repeat=\"email in employee.emails\">\n                <md-icon ng-if=\"$first\">email</md-icon>\n                <div class=\"md-list-item-text\" ng-class=\"{\'md-offset\': !$first}\">\n                    <h4 >{{ email.email }}</h4>\n                    <p>\n                        {{ email.category }}\n                        <span ng-show=\"email.comment\"> ({{ email.comment }})</span>\n                    </p>\n                </div>\n            </md-list-item>\n        </md-list>\n\n        <md-divider ng-show=\"employee.birthday || employee.secretary.length || employee.comment\"></md-divider>\n\n        <md-list>\n            <md-list-item class=\"md-1-line\" ng-show=\"employee.birthday\">\n                <md-icon class=\"pb-avatar-icon\">cake</md-icon>\n                <p>\n                    {{ employee.birthday | date:\'dd.MM.yyyy\' }}\n                    ({{ employee.birthday | age | agePlural }})\n                </p>\n            </md-list-item>\n\n            <md-list-item class=\"md-1-line\"\n                          ng-repeat=\"secretary in employee.secretary\"\n                          ng-show=\"employee.secretary.length\">\n                <md-icon>assistant</md-icon>\n                <p>\n                    {{ secretary.surname }}\n                    {{ secretary.firstname }}\n                    {{ secretary.patronymic }}\n                </p>\n            </md-list-item>\n\n            <md-list-item class=\"md-1-line\" ng-show=\"employee.comment\">\n                <md-icon>info</md-icon>\n                <p>{{ employee.comment }}</p>\n            </md-list-item>\n        </md-list>\n\n    </div>\n</md-content>\n");
  $templateCache.put("directives/employee-list-item.directive.html","<div layout=\"row\" layout-padding layout-align=\"start center\" class=\"employee-list-item\">\n    <div flex=\"33\" flex-xs=\"40\" flex-sm=\"25\">\n        <h4 class=\"md-subhead\">{{ employee.surname }} {{ employee.firstname }} {{ employee.patronymic }}</h4>\n        <p class=\"md-caption pb-text-muted\" ng-hide=\"employee.is_retired\">{{ employee.position }}</p>\n        <p class=\"md-caption pb-text-muted\" ng-show=\"employee.is_retired\">\n            Уволился (На момент увольнения: {{ employee.position }})\n        </p>\n    </div>\n\n    <div layout=\"row\" layout-xs=\"column\" class=\"employee-list-item_contacts\" flex=\"35\" flex-xs=\"55\" flex-sm=\"50\">\n        <md-list flex>\n            <md-list-item ng-repeat=\"phone in employee.phones\" ng-show=\"$even\">\n                <md-tooltip md-direction=\"left\">{{ phone.category }}</md-tooltip>\n                <p>{{ phone.number | formatPhone }}</p>\n            </md-list-item>\n        </md-list>\n        <md-list flex>\n            <md-list-item ng-repeat=\"phone in employee.phones\" ng-show=\"$odd\">\n                <md-tooltip md-direction=\"left\">{{ phone.category }}</md-tooltip>\n                <p>{{ phone.number | formatPhone }}</p>\n            </md-list-item>\n        </md-list>\n        <md-list hide-gt-xs>\n            <md-list-item ng-repeat=\"email in employee.emails\">\n                <md-tooltip md-direction=\"left\">{{ email.category }}</md-tooltip>\n                <p>{{ email.email }}</p>\n            </md-list-item>\n        </md-list>\n    </div>\n\n    <div class=\"employee-list-item_contacts\" hide-xs>\n        <md-list>\n            <md-list-item ng-repeat=\"email in employee.emails\">\n                <md-tooltip md-direction=\"left\">{{ email.category }}</md-tooltip>\n                <p>{{ email.email }}</p>\n            </md-list-item>\n        </md-list>\n    </div>\n    <span flex></span>\n\n    <div class=\"employee-list-item_company\" ng-show=\"employee.company\">\n        <md-tooltip>\n            {{ employee.company.name }}\n        </md-tooltip>\n        <img ng-src=\"{{ employee.company.logo }}\" alt=\"{{ employee.company.name }}\" />\n        <p class=\"pb-text-muted\" hide-xs hide-sm>\n            {{ employee.center.number }}\n            <md-icon ng-show=\"employee.division\">chevron_right</md-icon>\n            {{ employee.division.number }}\n        </p>\n    </div>\n</div>\n");
  $templateCache.put("directives/employee-print.directive.html","<div>\n\n<md-button class=\"md-button md-icon-button\">\n    <md-icon ng-click=\"printCtrl.showPrintDialog($event)\">print</md-icon>\n</md-button>\n\n<script type=\"text/ng-template\" id=\"print-employee-dialog.tmpl.html\">\n\n    <md-dialog aria-label=\"Print Employees\" layout=\"column\" class=\"pb-dialog\">\n        <md-dialog-content flex layout-padding>\n            <div layout=\"row\">\n                <h1 class=\"md-title\">Печать сотрудников</h1>\n                <span flex></span>\n                <md-button class=\"md-icon-button\" ng-click=\"printDialogCtrl.hide()\">\n                    <md-icon>close</md-icon>\n                </md-button>\n            </div>\n\n            <h2 class=\"md-subhead\">Каких сотрудников вывести на печать?</h2>\n            <div class=\"pb-print-dialog_type\">\n                <md-radio-group ng-model=\"printDialogCtrl.type\">\n                      <md-radio-button value=\"all\">Всех</md-radio-button>\n                      <md-radio-button value=\"custom\">Выбрать вручную</md-radio-button>\n                      <md-radio-button value=\"by_company\">По предриятию</md-radio-button>\n                </md-radio-group>\n            </div>\n\n\n            <div>\n                <h2 class=\"md-subhead\">Выберите порядок сортировки</h2>\n                <md-select ng-model=\"printDialogCtrl.sortBy\" placeholder=\"Порядок сортировки\"\n                           class=\"pb-print-dialog_search\" aria-label=\"Select Order\">\n                    <md-option ng-repeat=\"sortOption in printDialogCtrl.sortOptions\"\n                               value=\"{{ sortOption.value }}\" selected=\"sortOption.selected\">\n                        {{ sortOption.name }}\n                    </md-option>\n                </md-select>\n            </div>\n\n            <div ng-show=\"printDialogCtrl.type === \'custom\'\">\n                <h2 class=\"md-subhead\">Выберите сотрудников</h2>\n                <md-chips ng-model=\"printDialogCtrl.selectedEmployees\" md-autocomplete-snap\n                          md-require-match=\"true\" class=\"pb-print-dialog_search\">\n                  <md-autocomplete\n                      md-autofocus\n                      md-selected-item=\"printDialogCtrl.selectedItem\"\n                      md-search-text=\"printDialogCtrl.searchText\"\n                      md-items=\"item in printDialogCtrl.employeeSearch(printDialogCtrl.searchText)\"\n                      placeholder=\"Имя сотрудника\"\n                      secondary-placeholder=\"+Сотрудник\"\n                      md-menu-class=\"autocomplete-custom-template\">\n                      <md-item-template >\n                          <span class=\"pb-float-left\" style=\"width: 400px;\">\n                              <span class=\"item-title\">\n                                  <span>{{ item | toFullname }}</span>\n                              </span>\n                              <span class=\"item-metadata\">\n                                  <span class=\"item-metastat pb-text-muted\">\n                                      {{ item.position }}\n                                  </span>\n                              </span>\n                          </span>\n                      </md-item-template>\n                      <md-not-found>\n                          Сотрудник \"{{ printDialogCtrl.searchText }}\" не найден.\n                      </md-not-found>\n                  </md-autocomplete>\n                  <md-chip-template>\n                    <span>\n                      <strong>{{ $chip.surname }}</strong>\n                    </span>\n                  </md-chip-template>\n                </md-chips>\n            </div>\n\n            <div ng-show=\"printDialogCtrl.type === \'by_company\'\">\n                <h2 class=\"md-subhead\">Предприятия</h2>\n                <md-select ng-model=\"printDialogCtrl.selectedCompany\" placeholder=\"Предприятия\"\n                           class=\"pb-print-dialog_search\" aria-label=\"Select Company\">\n                    <md-option ng-repeat=\"company in printDialogCtrl.companies.results\" value=\"{{ company.id }}\">\n                        {{ company.name }}\n                    </md-option>\n                </md-select>\n            </div>\n        </md-dialog-content>\n\n        <md-dialog-actions layout-padding>\n            <md-progress-circular md-mode=\"indeterminate\"\n                                  md-diameter=\"40\"\n                                  ng-show=\"printDialogCtrl.busy\">\n            </md-progress-circular>\n            <md-button ng-click=\"printDialogCtrl.hide()\"\n                       ng-disabled=\"printDialogCtrl.busy\"\n                       class=\"md-raised\"\n                       aria-label=\"Cancel\">\n                Отмена\n            </md-button>\n            <md-button class=\"md-raised md-primary\"\n                       aria-label=\"Print\"\n                       ng-click=\"printDialogCtrl.print()\"\n                       ng-disabled=\"printDialogCtrl.type === \'custom\' && !printDialogCtrl.selectedEmployees.length\n                                    || printDialogCtrl.type === \'by_company\' && !printDialogCtrl.selectedCompany\n                                    || printDialogCtrl.busy\">\n                Печать\n            </md-button>\n        </md-dialog-action>\n\n    </md-dialog>\n\n</script>\n\n</div>\n");}]);