| 1 | <?xml version="1.0" encoding="UTF-8"?> |
| 2 | <templates xml:space="preserve"> |
| 3 | |
| 4 | <t t-name="hr_attendance.companyHeader"> |
| 5 | <img t-att-src="companyImageUrl" alt="Company Logo" class="o_hr_attendance_kiosk_company_image align-self-center"/> |
| 6 | </t> |
| 7 | |
| 8 | <t t-name="hr_attendance.BarcodeScanner" t-inherit="barcodes.BarcodeScanner" t-inherit-mode="primary"> |
| 9 | <xpath expr="//div[hasclass('o_barcode_mobile_container')]" position="replace"> |
| 10 | <div class="o_hr_attendance_kiosk d-flex justify-content-around" t-att-class="{'position-relative' : !isDisplayStandalone}"> |
| 11 | <button t-if="isBarcodeScannerSupported" t-on-click="openMobileScanner" class="o_mobile_barcode btn btn-light btn-lg p-5 rounded-3" t-att-class="{'position-absolute' : !isDisplayStandalone}"> |
| 12 | <i class="fa fa-3x fa-barcode mb-3"/> |
| 13 | <span class="d-block">Scan your badge</span> |
| 14 | </button> |
| 15 | <a t-if="!isDisplayStandalone" class="o_hr_attendance_install_btn btn btn-secondary d-flex align-items-center justify-content-center fw-bolder position-relative" |
| 16 | t-att-style="props.fromTrialMode ? 'left: 25%;' : 'left: 115%;'" |
| 17 | t-att-href="installURL" target="_blank">Install</a> |
| 18 | </div> |
| 19 | </xpath> |
| 20 | </t> |
| 21 | |
| 22 | <t t-name="hr_attendance.PublicKiosksSettingScreen"> |
| 23 | <div class="align-self-center" t-att-class="{'h2 mt-5': !env.isSmall, 'my-3 text-center h5': env.isSmall}"> |
| 24 | Choose how to record attendances |
| 25 | </div> |
| 26 | <div class="o_hr_kiosk_mode_main d-flex m-auto" t-att-class="{'gap-5': !env.isSmall, 'gap-3 flex-column': env.isSmall}"> |
| 27 | <div class="d-flex flex-column align-items-center text-center gap-2" t-att-style="!env.isSmall ? 'max-width: min-content;' : ''"> |
| 28 | <button |
| 29 | t-on-click="() => this.setSetting('manual')" |
| 30 | class="btn btn-light" |
| 31 | t-att-class="{ |
| 32 | 'd-flex flex-row rounded-2 ps-2 align-items-center gap-2' : env.isSmall, |
| 33 | 'btn-lg rounded-3': !env.isSmall |
| 34 | }"> |
| 35 | <t t-if="env.isSmall"> |
| 36 | <img src="/hr_attendance/static/img/tablet-pin.svg" alt="Manual Attendance" width="40%"/> |
| 37 | <h6 class="m-0">Manually (optional PIN)</h6> |
| 38 | </t> |
| 39 | <t t-else=""> |
| 40 | <img src="/hr_attendance/static/img/tablet-pin.svg" height="170px" alt="Manual Attendance"/> |
| 41 | </t> |
| 42 | </button> |
| 43 | <t t-if="!env.isSmall"> |
| 44 | <h5 class="m-0">Select on Tablet</h5> |
| 45 | <em>with optional PIN code</em> |
| 46 | </t> |
| 47 | </div> |
| 48 | <div class="d-flex flex-column align-items-center text-center gap-2" t-att-style="!env.isSmall ? 'max-width: min-content;' : ''"> |
| 49 | <button |
| 50 | t-on-click="() => this.setSetting('barcode')" |
| 51 | class="btn btn-light" |
| 52 | t-att-class="{ |
| 53 | 'flex-row d-flex rounded-2 ps-2 align-items-center gap-2' : env.isSmall, |
| 54 | 'btn-lg rounded-3': !env.isSmall |
| 55 | }"> |
| 56 | <t t-if="env.isSmall"> |
| 57 | <img src="/hr_attendance/static/img/tablet-cam.svg" alt="Attendance with barcode" width="40%"/> |
| 58 | <h6 class="m-0">Badge with Barcode</h6> |
| 59 | </t> |
| 60 | <t t-else=""> |
| 61 | <img src="/hr_attendance/static/img/tablet-cam.svg" height="170px" alt="Attendance with barcode"/> |
| 62 | </t> |
| 63 | </button> |
| 64 | <t t-if="!env.isSmall"> |
| 65 | <h5 class="m-0 w-75">Badge with Barcode on Tablet</h5> |
| 66 | </t> |
| 67 | </div> |
| 68 | <div class="d-flex flex-column align-items-center text-center gap-2" t-att-style="!env.isSmall ? 'max-width: min-content;' : ''"> |
| 69 | <button |
| 70 | t-on-click="() => this.setSetting('barcode_manual')" |
| 71 | class="btn btn-light" |
| 72 | t-att-class="{ |
| 73 | 'flex-row d-flex rounded-2 ps-2 align-items-center gap-2' : env.isSmall, |
| 74 | 'btn-lg rounded-3': !env.isSmall |
| 75 | }"> |
| 76 | <t t-if="env.isSmall"> |
| 77 | <img src="/hr_attendance/static/img/tablet-rfid.svg" alt="Manual Attendance or with barcode" width="40%"/> |
| 78 | <h6 class="m-0">RFID Token with reader</h6> |
| 79 | </t> |
| 80 | <t t-else=""> |
| 81 | <img src="/hr_attendance/static/img/tablet-rfid.svg" height="170px" |
| 82 | alt="Manual Attendance or with barcode"/> |
| 83 | </t> |
| 84 | </button> |
| 85 | <t t-if="!env.isSmall"> |
| 86 | <h5 class="m-0 w-75">RFID Token with reader on tablet</h5> |
| 87 | </t> |
| 88 | </div> |
| 89 | </div> |
| 90 | </t> |
| 91 | |
| 92 | <t t-name="hr_attendance.public_kiosk_app"> |
| 93 | <MainComponentsContainer/> |
| 94 | <CardLayout fromTrialMode="this.props.fromTrialMode" companyImageUrl="this.companyImageUrl" kioskReturn.bind="kioskReturn" activeDisplay = "this.state.active_display"> |
| 95 | <t t-if="this.state.active_display === 'settings'"> |
| 96 | <t t-call="hr_attendance.PublicKiosksSettingScreen"/> |
| 97 | </t> |
| 98 | <t t-if="this.state.active_display === 'main'"> |
| 99 | <t t-if="state.displayDemoMessage"> |
| 100 | <div |
| 101 | class="alert alert-info flex-row justify-content-between d-flex" |
| 102 | t-att-class="{'align-self-center col-6': !env.isSmall}" |
| 103 | t-att-style="!env.isSmall? 'min-width: fit-content;' : ''"> |
| 104 | <div> |
| 105 | Connect an RFID reader, and scan a token. |
| 106 | <DocumentationLink path="'/applications/hr/attendances/hardware.html'" label.translate="'Read the Documentation'" alertLink="true"/>/ |
| 107 | <DocumentationLink path="'https://duckduckgo.com/?q=rfid+reader'" label.translate="'Buy an RFID Device'" alertLink="true"/> |
| 108 | </div> |
| 109 | <button t-on-click="removeDemoMessage" type="button" class="btn-close float-end ms-2" title="Close"/> |
| 110 | </div> |
| 111 | </t> |
| 112 | <div class="o_hr_kiosk_mode_main d-flex flex-column gap-3 m-auto"> |
| 113 | <t t-if="this.props.kioskMode !== 'manual'"> |
| 114 | <KioskBarcodeScanner |
| 115 | kioskMode="this.props.kioskMode" |
| 116 | fromTrialMode="this.props.fromTrialMode" |
| 117 | token="this.props.token" |
| 118 | barcodeSource="this.props.barcodeSource" |
| 119 | onBarcodeScanned="(ev) => this.onBarcodeScanned(ev)"/> |
| 120 | <div class="o_hr_kiosk_mode_main mt-5" t-if="this.props.fromTrialMode"> |
| 121 | <button t-on-click="() => this.newSetUp()" class="btn btn-light btn-lg rounded-3 mt-5"> |
| 122 | <span >New Set-up (Employee/Badge)</span> |
| 123 | </button> |
| 124 | </div> |
| 125 | </t> |
| 126 | </div> |
| 127 | <div class="o_hr_kiosk_mode_bottom d-flex flex-column flex-md-row gap-2 align-items-center justify-content-between my-5"> |
| 128 | <t t-if="this.props.kioskMode !== 'barcode'"> |
| 129 | <button t-on-click="() => this.switchDisplay('manual')" class="btn btn-light btn-lg rounded-3"> |
| 130 | <i class="fa fa-user-o me-2"/> |
| 131 | <span >Identify Manually</span> |
| 132 | </button> |
| 133 | <span> |
| 134 | Powered by <img height="32" src="/web/static/img/logo.png" alt="Odoo Logo"/> |
| 135 | </span> |
| 136 | </t> |
| 137 | <t t-else=""> |
| 138 | <div class="o_hr_kiosk_mode_bottom mx-auto"> |
| 139 | Powered by <img height="32" src="/web/static/img/logo.png" alt="Odoo Logo"/> |
| 140 | </div> |
| 141 | </t> |
| 142 | </div> |
| 143 | </t> |
| 144 | <t t-if="this.state.active_display === 'manual'"> |
| 145 | <KioskManualSelection |
| 146 | displayBackButton="!this.manualKioskMode || this.props.fromTrialMode" |
| 147 | departments="this.props.departments" |
| 148 | onSelectEmployee="(e) => this.kioskConfirm(e)" |
| 149 | onClickBack="() => this.kioskReturn()" |
| 150 | token="this.props.token"/> |
| 151 | </t> |
| 152 | <t t-if="this.state.active_display === 'greet'"> |
| 153 | <KioskGreetings employeeData="this.employeeData" kioskReturn="() => this.kioskReturn(true)"/> |
| 154 | </t> |
| 155 | <t t-if="this.state.active_display === 'pin'"> |
| 156 | <KioskPinCode |
| 157 | employeeData="this.employeeData" |
| 158 | onPinConfirm="(id, pin) => this.onManualSelection(id, pin)" |
| 159 | onClickBack="() => this.kioskReturn()"/> |
| 160 | </t> |
| 161 | </CardLayout> |
| 162 | </t> |
| 163 | </templates> |