-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #31 from schrer/develop
Implement backend support (deactivated), version updates
- Loading branch information
Showing
18 changed files
with
1,888 additions
and
1,677 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import CIcon from "@coreui/icons-react"; | ||
import { CButton, CPopover, CTableDataCell, CTableHeaderCell, CTableRow } from "@coreui/react"; | ||
import * as icon from '@coreui/icons'; | ||
|
||
const buttonStyle = { | ||
'--cui-btn-padding-x': 0, | ||
'--cui-btn-padding-y': 0, | ||
} | ||
|
||
const BillTableRowPopup = (props) => { | ||
return ( | ||
<CTableRow onClick={() => {navigator.clipboard.writeText(props.text)}}> | ||
<CTableHeaderCell scope="row">{props.title}</CTableHeaderCell> | ||
<CTableDataCell className="d-flex"> | ||
<CPopover | ||
title={props.popupTitle} | ||
content={props.popupText} | ||
placement="bottom" | ||
trigger="focus" | ||
> | ||
<CButton style={buttonStyle} color="link" className=".text-nowrap">{props.text}</CButton> | ||
</CPopover> | ||
<CIcon className="ms-auto" icon={icon.cilClipboard}/> | ||
</CTableDataCell> | ||
</CTableRow> | ||
) | ||
}; | ||
|
||
export default BillTableRowPopup; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,9 @@ | ||
import React from 'react'; | ||
import ReactDOM from 'react-dom'; | ||
import './index.css'; | ||
import App from './App'; | ||
import './util/i18n' | ||
import { createRoot } from 'react-dom/client'; | ||
|
||
ReactDOM.render( | ||
<React.StrictMode> | ||
<App /> | ||
</React.StrictMode>, | ||
document.getElementById('root') | ||
); | ||
|
||
const container = document.getElementById('root'); | ||
const root = createRoot(container); | ||
root.render(<App />); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
@import "@coreui/coreui/scss/coreui"; | ||
@import "@coreui/coreui/scss/coreui"; | ||
|
||
$enable-shadows: true; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,5 @@ | ||
import { createStore } from 'redux'; | ||
import { configureStore } from '@reduxjs/toolkit' | ||
|
||
const initialState = {}; | ||
|
||
const changeState = (state = initialState, { type, ...rest }) => { | ||
switch (type) { | ||
case 'set': | ||
return { ...state, ...rest }; | ||
default: | ||
return state; | ||
} | ||
}; | ||
|
||
const store = createStore(changeState); | ||
export default store; | ||
export default configureStore({ | ||
reducer: {}, | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,6 @@ | ||
import companyMappings from './data/companyMapping.json'; | ||
import ApiClient from './qrBackendClient'; | ||
|
||
const uidMapping = companyMappings.uidMap; | ||
const serialMapping = companyMappings.serialMap | ||
|
||
export function matchCompanyByCertSerial(certSerial /*: string*/){ | ||
|
||
const uidRegExp = new RegExp("^U:ATU\\d{8}-\\d+$","i"); | ||
|
||
if (uidRegExp.test(certSerial)) { | ||
const uid = certSerial.slice(2,13); | ||
return uidMapping[uid]; | ||
} | ||
|
||
return serialMapping[certSerial]; | ||
export async function matchCompanyByCertSerial(certSerial /*: string*/){ | ||
return ApiClient.matchCompanyByQrCertSerial(certSerial).then(data => {return data.companyName}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
const config = { | ||
"api": { | ||
"url": "http://localhost:8080/api", | ||
"active": false | ||
} | ||
} | ||
|
||
export default config; |
Oops, something went wrong.