{"version":3,"sources":["inMemoryJWT.js","dataProvider/rest.ts","dataProvider/dataProvider.js","authProvider.js","theme.js","CardWithIcon.tsx","cartoucheDark.png","cartouche.png","MonthlyRevenue.tsx","NbNewOrders.tsx","OrderChart.tsx","PendingOrders.tsx","NotPayedInvoice.tsx","Dashboard.tsx","NotFound.js","AppBar.tsx","images/prenos.png","MyMenu.tsx","themes.ts","layout/Layout.tsx","layout/login.tsx","buildings/buildings.tsx","buildings/maps.tsx","buildings/buildingEdit.tsx","buildings/index.ts","orders/MobileGrid.tsx","orders/OrderList.tsx","orders/Items.tsx","orders/Totals.tsx","orders/OrderEdit.tsx","orders/index.ts","move/MoveList.tsx","move/MoveItems.tsx","move/MoveTotal.tsx","move/MoveEdit.tsx","move/index.ts","Invoices/InvoiceItems.tsx","Invoices/InvoiceTaxes.tsx","Invoices/InvoiceTotal.tsx","Invoices/InvoiceEdit.tsx","Invoices/Invoices.tsx","Invoices/index.ts","Register.tsx","VerifyEmail.tsx","profile/AccountProfile.js","profile/AccountProfileDetails.js","profile/Account.js","customRoutes.js","App.tsx","index.tsx"],"names":["inMemoryJWTManager","window","addEventListener","event","key","ereaseToken","localStorage","setItem","Date","now","removeItem","getToken","getItem","setToken","token","decodeToken","jwt","sub","restProvider","apiUrl","httpClient","url","options","headers","Headers","Accept","inMemoryJWT","set","fetchUtils","fetchJson","getList","resource","params","pagination","page","perPage","sort","field","order","token12","user","query","PageNum","JSON","stringify","PageSize","acSubjectId","acInvoicePayed","filter","acBuildingID","idBuilding","adDateTo","adDateFrom","then","json","data","map","id","total","totalPage","getOne","getMany","getManyReference","target","parseInt","update","updateMany","ids","create","delete","deleteMany","getUser","username","updateUser","request","Request","method","body","console","log","fetch","response","status","Error","statusText","dataProvider","authProvider","login","password","register","firstname","lastname","stevilkaRac","znesekRac","sendVerification","verifyEmail","UpdateUser","UpdatePass","logout","Promise","resolve","checkAuth","reject","checkError","error","getPermissions","myTheme","palette","primary","main","secondary","light","dark","contrastText","background","default","type","shape","borderRadius","sidebar","width","closedWidth","typography","fontFamily","join","fontSize","overrides","RaMenuItemLink","root","borderLeft","color","backgroundColor","orange","a","active","MuiTableCell","MuiPaper","elevation1","boxShadow","border","backgroundClip","MuiButton","contained","MuiButtonBase","content","display","height","position","top","right","opacity","MuiAppBar","colorSecondary","MuiLinearProgress","colorPrimary","barColorPrimary","MuiFilledInput","MuiSnackbarContent","RaList","padding","props","disableRipple","useStyles","makeStyles","theme","card","minHeight","flexDirection","flex","textDecoration","overflow","justifyContent","alignItems","title","CardWithIcon","icon","subtitle","to","children","classes","Card","className","Box","createElement","textAlign","Typography","variant","component","Divider","MonthlyRevenue","value","useTranslate","DollarIcon","NbNewOrders","translate","ShoppingCartIcon","lastDay","lastMonthDays","Array","from","length","_","i","subDays","aMonthAgo","dateFormatter","date","format","getRevenuePerDay","orders","daysWithRevenue","reduce","acc","curr","day","adInvoceDate","anInvoiceForPay","aggregateOrdersByDay","getTime","Skupaj","OrderChart","CardHeader","CardContent","style","ResponsiveContainer","AreaChart","x1","y1","x2","y2","offset","stopColor","stopOpacity","XAxis","dataKey","name","scale","domain","addDays","tickFormatter","left","YAxis","unit","tickMargin","CartesianGrid","strokeDasharray","Tooltip","cursor","formatter","Intl","NumberFormat","undefined","currency","labelFormatter","label","Area","stroke","strokeWidth","fill","cost","marginRight","text","hover1","PendingOrders","List","dense","ListSubheader","record","ListItem","button","Link","ListItemText","acInvoiceKey","toLocaleDateString","ListItemSecondaryAction","boxSizing","marginLeft","boxshadow","margin","backgroundcolor","maxHeight","minWidth","row","column","float","toPay","fontWeight","titleCard","borderColor","bodi","paddingBottom","NotPayedinvoices","invoices","Body","Title","acPeriod","Text","toLocaleString","Button","Spacer","VerticalSpacer","styles","flexColumn","leftCol","marginTop","rightCol","singleCol","marginBottom","block","parent","gridgap","gridtemplatecolumns","marginblock","justifyitems","alignitems","Dashboard","useState","state","setState","version","useVersion","useDataProvider","isXSmall","useMediaQuery","breakpoints","down","isSmall","document","fetchOrders","useCallback","today","toISOString","recentOrders","notPayedOrders","aggregations","stats","revenue","nbNewOrders","pendingOrders","push","aggregations1","minimumFractionDigits","maximumFractionDigits","useEffect","textOverflow","whiteSpace","spacer","logo","maxWidth","ConfigurationMenu","forwardRef","ref","MenuItemLink","primaryText","leftIcon","onClick","sidebarIsOpen","CustomUserMenu","UserMenu","CustomAppBar","AppBar","elevation","userMenu","src","alt","Menu","onMenuClick","menuCatalog","menuSales","menuCustomers","open","useSelector","admin","ui","sidebarOpen","mt","smart_count","darkTheme","lightTheme","CustomSidebar","Sidebar","size","Layout","appBar","menu","MyMenu","backgroundRepeat","backgroundSize","backgroundPosition","avatar","hint","grey","form","input","actions","word","button12","button2","renderInput","meta","touched","inputProps","TextField","helperText","fullWidth","Form","withTypes","Login","loading","setLoading","notify","useNotify","useLogin","location","useLocation","redirect","useRedirect","handleClick2","onSubmit","auth","nextPathname","catch","message","validate","values","errors","render","handleSubmit","noValidate","Avatar","autoFocus","disabled","CardActions","defaultValue","CircularProgress","thickness","Notification","LoginWithTheme","ThemeProvider","createMuiTheme","useDatagridStyles","TabbedDatagrid","useListContext","Datagrid","optimized","rowClick","source","NumberField","ShowButton","buildings","bulkActionButtons","containerStyle","MyComponent","isLoaded","useJsApiLoader","googleMapsApiKey","center","lat","latitude","lng","longitude","React","setMap","info","acAddress","acHouseNo","post","acPost","acPostName","onLoad","bounds","google","maps","LatLngBounds","fitBounds","onUnmount","mapContainerStyle","zoom","memo","OrderTitle","acName","useEditStyles","padding_top","m","CustomToolbar","Toolbar","BuildingForm","classess","FormWithRedirect","formProps","Grid","container","spacing","item","xs","sm","md","gutterBottom","Labeled","acAdress","list","edit","Edit","toolbar","useListStyles","cardTitleContent","cardContent","body1","cardContentRow","MobileGrid","basePath","EditButton","DateField","showTime","BooleanField","defaultProps","OrderFilter","Filter","SelectInput","choices","DateInput","tabs","listContext","filterValues","setFilters","displayedFilters","ordered","setOrdered","delivered","setDelivered","totals","useGetList","acStatus","useGetTotals","handleChange","selectedIds","Tabs","centered","indicatorColor","onChange","choice","Tab","ListContextProvider","OrderList","filterDefaultValues","filters","rightAlignedCell","leftAlignedCell","Items","useQueryWithStore","payload","loaded","Table","TableHead","TableRow","TableCell","TableBody","items","acIdent","acKey","anPrice","anQty","anForPay","boldCell","Totals","anValue","anVAT","anDiscount","classnames","acKeyView","OrderForm","acBuyerName","acBuyerAddress","acBuyerAddressPost","acBuyerAddressCountry","acReceiverName","acReceiverAddress","acReceiverAddressPost","acReceiverAddressCountry","OrderIcon","MoveList","PDF","blob","bytes","atob","out","Uint8Array","charCodeAt","Blob","base64toBlob","docId","URL","createObjectURL","MoveTotal","aside","lines","paddingTop","paddingBlockEnd","hover","acEbaReceivedID","IconButton","href","sx","rel","idInvoiceItem","acSupplierName","acReceivedInvoiceLabel","acSupplierTaxNumber","acServiceName","anVat","acDivisionShare","LinearProgress","Taxes","taxes","tax","acVatCode","zaPlacilo","ddv","vrednost","anInoiceValue","anInvoiceVat","anInvoiceDiscount","IMAGE","qrCode","BLOBI","doc","blob1","url1","alignContent","html","anNetoPovrsina","idInvoice","dangerouslySetInnerHTML","__html","acERPSubject","InvoiceEdit","ReferenceInput","reference","optionText","hide","classes3","aria-label","outerHeight","paddingLeft","transition","assa","link","Register","successful","sendingEmail","initialValues","email","ZnesekRac","validationSchema","handleRegister","role","htmlFor","bind","Yup","required","test","val","toString","formValue","this","AuthService","resMessage","alert","Component","VerifyEmail","EmailStatus","emailStatus","setEmailStatus","loc","search","URLSearchParams","get","setTimeout","getBody","UserProfile","userid","useGetOne","isLoading","Loading","surname","moment","firstName","lastName","Oldpass","Newpass","setValues","checked","setChecked","error1","setError","useUpdate","error2","autoComplete","preventDefault","UpdateData","elements","uporabnik","AuthServuce","NotificationManager","success","oldPassword","subheader","FormControlLabel","control","Checkbox","p","Account","Helmet","py","Container","lg","AccountProfile","exact","path","noLayout","App","Admin","layout","customReducers","dashboard","catchAll","NotFound","loginPage","customRoutes","Resource","moveall","ReactDOM","dataProviderFactory","getElement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,GACdloB,aAAcA,EACbD,aAAcA,EAVf,UAWI,cAACooB,EAAA,EAAD,yBAAU9e,KAAK,mBAAsB1B,IAArC,IACA3L,QAAS,CAAEwO,MAAO,aAElB,cAAC2d,EAAA,EAAD,yBAAU9e,KAAK,gBAAmB+e,IAAlC,IACApsB,QAAS,CAACwO,MAAO,cAChB,cAAC2d,EAAA,EAAD,yBAAU9e,KAAK,oBAAuByD,IAAtC,IACD9Q,QAAS,CAACwO,MAAO,kBAEjB,cAAC2d,EAAA,EAAD,aAAU9e,KAAM,oBAAoBrN,QAAS,CAACwO,MAAO,WAAemM,KAEpE,cAACwR,EAAA,EAAD,CAAU9e,KAAM,gBAAgBrN,QAAS,CAACwO,MAAO,eACjD,cAAC2d,EAAA,EAAD,CAAU9e,KAAM,mBAAmBrN,QAAS,CAACwO,MAAO,iBCtCxD6d,IAASjT,OACL,cAAC,GAAD,CAAKrV,aAAcuoB,IACnBrZ,SAASsZ,eAAe,W","file":"static/js/main.c372b17f.chunk.js","sourcesContent":["import jwt from 'jwt-decode'\r\n\r\nconst inMemoryJWTManager = () => {\r\n let inMemoryJWT = null;\r\n\r\n // This listener allows to disconnect another session of react-admin started in another tab\r\n window.addEventListener('storage', (event) => {\r\n if (event.key === 'ra-logout') {\r\n inMemoryJWT = null;\r\n }\r\n });\r\n\r\n const getToken = () => {\r\n return localStorage.getItem('token');\r\n }\r\n \r\n\r\n const setToken = (token) => {\r\n inMemoryJWT = token;\r\n localStorage.setItem('token',token)\r\n return true;\r\n };\r\n\r\n const ereaseToken = () => {\r\n inMemoryJWT = null;\r\n window.localStorage.setItem('ra-logout', Date.now());\r\n localStorage.removeItem('token');\r\n return true;\r\n }\r\n const decodeToken = () => {\r\n const token = localStorage.getItem('token')\r\n const user = jwt(token)\r\n return user.sub;\r\n\r\n }\r\n\r\n return {\r\n ereaseToken,\r\n getToken,\r\n setToken,\r\n decodeToken\r\n }\r\n};\r\n\r\nexport default inMemoryJWTManager();","import dataProvider from './dataProvider';\r\n\r\nconst restProvider = dataProvider('https://dev.e-nadzornik.com');\r\n\r\n//https://dhwss2.softeh.net/test\r\nexport default restProvider;\r\n","import { fetchUtils } from 'ra-core';\r\nimport inMemoryJWT from '../inMemoryJWT';\r\nimport { stringify } from 'query-string';\r\nimport jwt from 'jwt-decode';\r\n\r\nexport default (apiUrl) => {\r\n const httpClient = (url) => {\r\n const options = {\r\n headers: new Headers({ Accept: 'application/json' }),\r\n };\r\n const token = inMemoryJWT.getToken();\r\n if (token) {\r\n options.headers.set(\"Authorization\", `Bearer ${token}`);\r\n }\r\n\r\n return fetchUtils.fetchJson(url, options);\r\n };\r\n\r\n return {\r\n getList: (resource, params) => {\r\n const { page, perPage } = params.pagination;\r\n const { field, order } = params.sort;\r\n\r\n const token12 = inMemoryJWT.getToken();\r\n var user = inMemoryJWT.decodeToken(token12);\r\n\r\n const query = {\r\n PageNum: JSON.stringify(page),\r\n PageSize: JSON.stringify(perPage),\r\n //acSofUserName: 'u-woousr1',\r\n acSubjectId: user,\r\n acInvoicePayed: params.filter.acInvoicePayed,\r\n acBuildingID: params.filter.idBuilding,\r\n adDateTo: params.filter.adDateTo,\r\n adDateFrom: params.filter.adDateFrom,\r\n sort: field,\r\n order: order\r\n };\r\n const url = `${apiUrl}/${resource}?${stringify(query)}`;\r\n\r\n return httpClient(url).then(({ headers, json }) => ({\r\n \r\n data: json.data.map(resource => ({ ...resource, id: resource.id }) ),\r\n total: json.totalPage,\r\n }));\r\n },\r\n getOne: (resource, params) => \r\n httpClient(`${apiUrl}/${resource}/${params.id}`).then(({ json }) => ({ \r\n data: { ...json, id: json.id },\r\n \r\n })),\r\n getMany: (resource, params) => {\r\n\r\n const { page, perPage } = params.pagination;\r\n\r\n\r\n const query = {\r\n PageNum: JSON.stringify(page),\r\n PageSize: JSON.stringify(perPage),\r\n //filter: JSON.stringify({ id: params.ids }),\r\n };\r\n const url = `${apiUrl}/${resource}?${stringify(query)}`;\r\n return httpClient(url).then(({ json }) => ({ data: json }));\r\n },\r\n \r\n getManyReference: (resource, params) => {\r\n const { page, perPage } = params.pagination;\r\n const { field, order } = params.sort;\r\n const query = {\r\n sort: JSON.stringify([field, order]),\r\n range: JSON.stringify([(page - 1) * perPage, page * perPage - 1]),\r\n filter: JSON.stringify({\r\n ...params.filter,\r\n [params.target]: params.id,\r\n }),\r\n };\r\n const url = `${apiUrl}/${resource}`;\r\n \r\n return httpClient(url).then(({ headers, json }) => ({\r\n data: json.map(resource => ({ ...resource, id: resource.id }) ),\r\n total: parseInt(json.totalPage),\r\n }));\r\n },\r\n \r\n update: (resource, params) =>\r\n httpClient(`${apiUrl}/${resource}/${params.id}`, {\r\n method: 'PUT',\r\n body: JSON.stringify(params.data),\r\n }).then(({ json }) => ({ data: json })),\r\n \r\n updateMany: (resource, params) => {\r\n const query = {\r\n filter: JSON.stringify({ id: params.ids}),\r\n };\r\n return httpClient(`${apiUrl}/${resource}?${stringify(query)}`, {\r\n method: 'PUT',\r\n body: JSON.stringify(params.data),\r\n }).then(({ json }) => ({ data: json }));\r\n },\r\n \r\n create: (resource, params) =>\r\n httpClient(`${apiUrl}/${resource}`, {\r\n method: 'POST',\r\n body: JSON.stringify(params.data),\r\n }).then(({ json }) => ({\r\n data: { ...params.data, id: json.id },\r\n })),\r\n \r\n delete: (resource, params) =>\r\n httpClient(`${apiUrl}/${resource}/${params.id}`, {\r\n method: 'DELETE',\r\n }).then(({ json }) => ({ data: json.data })),\r\n \r\n deleteMany: (resource, params) => {\r\n const query = {\r\n filter: JSON.stringify({ id: params.ids}),\r\n };\r\n return httpClient(`${apiUrl}/${resource}?${stringify(query)}`, {\r\n method: 'DELETE',\r\n }).then(({ json }) => ({ data: json.data }));\r\n },\r\n getUser:(resource) => {\r\n const token12 = inMemoryJWT.getToken();\r\n var user = inMemoryJWT.decodeToken(token12);\r\n const query = {\r\n username: user \r\n }\r\n const url = `${apiUrl}/${resource}?${stringify(query)}`;\r\n return httpClient(url).then(({ json }) => ({ data: json.data }));\r\n\r\n },\r\n updateUser: (params) => {\r\n const request = new Request('https://dev.e-nadzornik.com/login/UpdateUser', {\r\n method: 'PUT',\r\n body: JSON.stringify( params.data),\r\n headers: new Headers({ 'Content-Type': 'application/json' })\r\n })\r\n console.log(params, request);\r\n return fetch(request)\r\n .then((response) => {\r\n if (response.status < 200 || response.status >= 300) {\r\n throw new Error(response.statusText);\r\n }\r\n // console.log(response.json())\r\n return response.json();\r\n })},\r\n }\r\n};","import inMemoryJWT from './inMemoryJWT';\r\n\r\nconst authProvider = {\r\n login: ({ username, password }) => {\r\n const request = new Request('https://dev.e-nadzornik.com/login/login', {\r\n method: 'POST',\r\n body: JSON.stringify({ username, password }),\r\n headers: new Headers({ 'Content-Type': 'application/json' })\r\n });\r\n return fetch(request)\r\n .then((response) => {\r\n if (response.status < 200 || response.status >= 300) {\r\n throw new Error(response.statusText);\r\n }\r\n return response.json();\r\n })\r\n .then(({ token }) => inMemoryJWT.setToken(token));\r\n },\r\n register: ( username, password, firstname, lastname,stevilkaRac, znesekRac ) => {\r\n const request = new Request('https://dev.e-nadzornik.com/login/Register', {\r\n method: 'POST',\r\n body: JSON.stringify({ username, password, firstname, lastname, stevilkaRac, znesekRac}),\r\n headers: new Headers({ 'Content-Type': 'application/json' })\r\n });\r\n return fetch(request)\r\n .then((response) => {\r\n if (response.status < 200 || response.status >= 300) {\r\n throw new Error(response.statusText);\r\n }\r\n // console.log(response.json())\r\n return response.json();\r\n })},\r\n\r\n sendVerification: (username,password,firstname,lastname) => {\r\n const request = new Request('https://dev.e-nadzornik.com/login/Register/SendVerificationEmail', {\r\n method: 'POST',\r\n body: JSON.stringify({username,password,firstname,lastname}),\r\n headers: new Headers({ 'Content-Type': 'application/json' })\r\n });\r\n return fetch(request)\r\n .then((response) => {\r\n if (response.status < 200 || response.status >= 300) {\r\n throw new Error(response.statusText);\r\n }\r\n return response.json();\r\n })\r\n\r\n },\r\n verifyEmail: (token) => {\r\n const request = new Request('https://dev.e-nadzornik.com/login/Register/' + token, {\r\n method: 'GET',\r\n headers: new Headers({ 'Content-Type': 'application/json' })\r\n });\r\n return fetch(request)\r\n .then((response) => {\r\n if (response.status < 200 || response.status >= 300) {\r\n throw new Error(response.statusText);\r\n }\r\n return response.json();\r\n })\r\n\r\n },\r\n\r\n UpdateUser: (params) => {\r\n const request = new Request('https://dev.e-nadzornik.com/login/UpdateUser/' + params.id, {\r\n method: 'PUT',\r\n body: JSON.stringify(params.data),\r\n headers: new Headers({ 'Content-Type': 'application/json' })\r\n });\r\n return fetch(request)\r\n .then((response) => {\r\n if (response.status < 200 || response.status >= 300) {\r\n return(response.statusText);\r\n }\r\n return response.json();\r\n })\r\n\r\n },\r\n\r\n UpdatePass: (params) => {\r\n const request = new Request('https://dev.e-nadzornik.com/login/UpdateUserPass/' + params.id, {\r\n method: 'PUT',\r\n body: JSON.stringify(params.data),\r\n headers: new Headers({ 'Content-Type': 'application/json' })\r\n });\r\n return fetch(request)\r\n .then((response) => {\r\n if (response.status < 200 || response.status >= 300) {\r\n return(response.statusText);\r\n }\r\n return response.json();\r\n })\r\n\r\n },\r\n\r\n\r\n logout: () => {\r\n inMemoryJWT.ereaseToken();\r\n return Promise.resolve();\r\n },\r\n\r\n checkAuth: () => {\r\n return inMemoryJWT.getToken() ? Promise.resolve() : Promise.reject();\r\n },\r\n getToken: () => {\r\n return inMemoryJWT.getToken()\r\n },\r\n decodeToken: () => {\r\n return inMemoryJWT.decodeToken()\r\n },\r\n checkError: (error) => {\r\n const status = error.status;\r\n if (status === 401 || status === 403) {\r\n inMemoryJWT.ereaseToken();\r\n return Promise.reject();\r\n }\r\n return Promise.resolve();\r\n },\r\n\r\n getPermissions: () => {\r\n return inMemoryJWT.getToken() ? Promise.resolve() : Promise.reject();\r\n },\r\n \r\n};\r\n\r\nexport default authProvider;","import { defaultTheme } from 'react-admin';\r\nimport merge from 'lodash/merge';\r\nimport orange from '@material-ui/core/colors/orange';\r\nimport gray from '@material-ui/core/colors/grey';\r\nimport red from '@material-ui/core/colors/red';\r\n\r\n\r\nexport const myTheme = {\r\n palette: {\r\n primary: {\r\n main: '#4f3cc9',\r\n },\r\n secondary: {\r\n light: '#5f5fc4',\r\n main: '#283593',\r\n dark: '#001064',\r\n contrastText: '#fff',\r\n },\r\n background: {\r\n default: '#fcfcfe',\r\n },\r\n type: 'light',\r\n },\r\n shape: {\r\n borderRadius: 10,\r\n },\r\n sidebar:{\r\n width: 300, // The default value is 240\r\n closedWidth: 70,\r\n },\r\n typography: {\r\n fontFamily: ['-apple-system', 'BlinkMacSystemFont', '\"Segoe UI\"', 'Arial', 'sans-serif'].join(','),\r\n fontSize: 16,\r\n },\r\n overrides: {\r\n RaMenuItemLink: {\r\n root: {\r\n\r\n borderLeft: '3px solid #fff',\r\n \"a:hover\" :\r\n {\r\n color: '#cdcdcd',\r\n backgroundColor: orange,\r\n }\r\n },\r\n a:{\r\n color: '#cdcdcd',\r\n backgroundColor: orange,\r\n },\r\n \r\n active: {\r\n borderLeft: '3px solid #4f3cc9',\r\n }\r\n },\r\n MuiTableCell:{\r\n root: {\r\n backgroundColor: orange,\r\n },\r\n },\r\n MuiPaper: {\r\n elevation1: {\r\n boxShadow: 'none',\r\n },\r\n root: {\r\n border: '1px solid #e0e0e3',\r\n backgroundClip: 'padding-box',\r\n },\r\n },\r\n MuiButton: {\r\n contained: {\r\n backgroundColor: '#fff',\r\n color: '#4f3cc9',\r\n boxShadow: 'none',\r\n },\r\n },\r\n MuiButtonBase: {\r\n root: {\r\n '&:hover:active::after': {\r\n // recreate a static ripple color\r\n // use the currentColor to make it work both for outlined and contained buttons\r\n // but to dim the background without dimming the text,\r\n // put another element on top with a limited opacity\r\n content: '\"\"',\r\n display: 'block',\r\n width: '100%',\r\n height: '100%',\r\n position: 'absolute',\r\n top: 0,\r\n right: 0,\r\n backgroundColor: 'currentColor',\r\n opacity: 0.3,\r\n borderRadius: 'inherit',\r\n },\r\n },\r\n },\r\n MuiAppBar: {\r\n colorSecondary: {\r\n color: '#808080',\r\n backgroundColor: '#fff',\r\n },\r\n },\r\n MuiLinearProgress: {\r\n colorPrimary: {\r\n backgroundColor: '#f5f5f5',\r\n },\r\n barColorPrimary: {\r\n backgroundColor: '#d7d7d7',\r\n },\r\n },\r\n MuiFilledInput: {\r\n root: {\r\n backgroundColor: 'rgba(0, 0, 0, 0.04)',\r\n '&$disabled': {\r\n backgroundColor: 'rgba(0, 0, 0, 0.04)',\r\n },\r\n },\r\n },\r\n MuiSnackbarContent: {\r\n root: {\r\n border: 'none',\r\n },\r\n },\r\n \r\n RaList:{\r\n root:{\r\n padding:\"10px\",\r\n }\r\n },\r\n },\r\n props: {\r\n MuiButtonBase: {\r\n // disable ripple for perf reasons\r\n disableRipple: true,\r\n },\r\n },\r\n};","import * as React from 'react';\r\nimport { FC, createElement } from 'react';\r\nimport { Card, Box, Typography, Divider } from '@material-ui/core';\r\nimport { makeStyles } from '@material-ui/core/styles';\r\n\r\nimport cartouche from './cartouche.png';\r\nimport cartoucheDark from './cartoucheDark.png';\r\nimport { Link } from 'react-router-dom';\r\nimport { List } from 'ra-ui-materialui';\r\n\r\ninterface Props {\r\n icon: FC;\r\n to: string;\r\n title?: string;\r\n subtitle?: string | number;\r\n}\r\n\r\nconst useStyles = makeStyles(theme => ({\r\n card: {\r\n minHeight: 52,\r\n display: 'flex',\r\n flexDirection: 'column',\r\n flex: '1',\r\n '& a': {\r\n textDecoration: 'none',\r\n color: '#f37435',\r\n },\r\n },\r\n main: (props: Props) => ({\r\n overflow: 'inherit',\r\n padding: 16,\r\n background: `url(${\r\n theme.palette.type === 'dark' ? cartoucheDark : cartouche\r\n }) no-repeat`,\r\n display: 'flex',\r\n justifyContent: 'space-between',\r\n alignItems: 'center',\r\n '& .icon': {\r\n color: theme.palette.type === 'dark' ? 'inherit' : '##f37435',\r\n },\r\n }),\r\n title: {},\r\n}));\r\n\r\nconst CardWithIcon: FC = props => {\r\n const { icon, title, subtitle, to, children } = props;\r\n const classes = useStyles(props);\r\n return (\r\n \r\n \r\n
\r\n \r\n {createElement(icon, { fontSize: 'large' })}\r\n \r\n \r\n \r\n {title}\r\n \r\n \r\n {subtitle || ' '}\r\n \r\n \r\n
\r\n \r\n {children && }\r\n {children}\r\n
\r\n );\r\n};\r\n\r\nexport default CardWithIcon;\r\n","export default \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAfQAAABZCAMAAAD//SY8AAAAAXNSR0IB2cksfwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAO1QTFRFU1NTU1NTUFBQAAAAUVFRUVFRU1NTT09PU1NTR0dHUlJSTk5OUlJSUVFRUlJSTk5OU1NTT09PS0tLU1NTUVFRUVFRU1NTUVFRUlJSUVFRS0tLUFBQUVFRUVFRUVFRUVFRQEBAUVFRU1NTU1NTU1NTU1NTU1NTU1NTSUlJUFBQU1NTUlJSUVFRTk5OT09PUVFRSkpKUVFRU1NTU1NTTk5OT09PUlJSTU1NUVFRU1NTSEhIU1NTUVFRUVFRUVFROzs7U1NTU1NTUlJSKysrU1NTUlJSRkZGU1NTTU1NU1NTUlJSUVFRUVFRU1NTSUlJap2IRgAAAE90Uk5T/+EzAOw57TfnK9cXvptwO86KPcVl43LiZMk6kuY/hcYIPGmRs+TzJQ6QzIzTSISuLcdNz1xar0nliCepUvtfDdiUTgbRmSFvVqO4ytnwFVkGdGQAAAKuSURBVHic7d3XVhRBGEXhAoExoZjGBKKCcVTMWcxK9P0fxwvvq6u7z79OlezvCeqsvYABOqSkMDd/DO2QNE9pYdE9BOVE0dPSxL0ExVTR0/ET7ikoJYueTp5yb0EhXfR02r0FhYTR07J7DMooo6cz7jUoIo2ezrrnoIQ2+op7Dkpoo6dz7j0oII6ezrsHoZs6+gX3IHRTR08X3YvQSR79knsROsmjp6l7Erroo192T0IXffR0xb0JHQKiX3VvQoeA6OmaexTyIqJfd49CXkT0Vfco5EVET2vuVcgKiX7DvQpZIdHX3auQFRI93XTPQk5M9FvuWciJiX7bPQs5MdE33LOQExN90z0LOTHRuUCyajHR77hnIScm+l33LOT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epUvtfDdiUTgbRmSFvVqO4ytnwFVkGdGQAAAKuSURBVHic7d3XVhRBGEXhAoExoZjGBKKCcVTMWcxK9P0fxwvvq6u7z79OlezvCeqsvYABOqSkMDd/DO2QNE9pYdE9BOVE0dPSxL0ExVTR0/ET7ikoJYueTp5yb0EhXfR02r0FhYTR07J7DMooo6cz7jUoIo2ezrrnoIQ2+op7Dkpoo6dz7j0oII6ezrsHoZs6+gX3IHRTR08X3YvQSR79knsROsmjp6l7Erroo192T0IXffR0xb0JHQKiX3VvQoeA6OmaexTyIqJfd49CXkT0Vfco5EVET2vuVcgKiX7DvQpZIdHX3auQFRI93XTPQk5M9FvuWciJiX7bPQs5MdE33LOQExN90z0LOTHRuUCyajHR77hnIScm+l33LOTERE/uWcgh+hFE9CMopjk/06sWE51P71WLic7v6VWLic5f5KoWE33DPQs5MdH5L1vVYqLz//SqxUTnypmqhTTnGrm6hUTnati6hUTnuve6RTTnDpfKRUTnXrbKRUTnrtXKBTTn/vTaBUTnSRS10zfnmTPV00fn6VLVkzfnOXL1k0fniZH1Uzfn2bANUEfnKdANEDfnee8t0DbngsgmaKPzDpcmSJvztqY2KJvzXrZGCJvzBsZW6JrzrtVmyJrzVuV2qJrz/vSGiJovLLqHoJym+dy8ewd6kDRfueeegT4UzTfvu1egF0HzB+4N6Gl8c66aaM7Y5A/5CNeekc1n7vNjgFHJHz12Hx9DjGn+xH14DDM8+dZT99kx0NDkz567T47BhiV/8dJ9boww6Kv8lfvUGKV/8tdv3GfGSD2Lv3333n1ijNYr+YeP7uNCoTj4p63tz+7DQqOs+Jev3767TwqZ7uA/fm7/cp8SUrncS+vLv9f4nv7/SZOd6Wx3b/9g9fBf6cPVg/293dl0Z/LHfTYE+Qucis5DBf5HsAAAAABJRU5ErkJggg==\"","import * as React from 'react';\r\nimport { FC } from 'react';\r\nimport DollarIcon from '@material-ui/icons/Euro';\r\nimport { useTranslate } from 'react-admin';\r\n\r\nimport CardWithIcon from './CardWithIcon';\r\n\r\ninterface Props {\r\n value?: string;\r\n}\r\n\r\nconst MonthlyRevenue: FC = ({ value }) => {\r\n const translate = useTranslate();\r\n return (\r\n \r\n );\r\n};\r\n\r\nexport default MonthlyRevenue;","import * as React from 'react';\nimport { FC } from 'react';\nimport ShoppingCartIcon from '@material-ui/icons/ShoppingCart';\nimport { useTranslate } from 'react-admin';\n\nimport CardWithIcon from './CardWithIcon';\n\ninterface Props {\n value?: number;\n}\n\nconst NbNewOrders: FC = ({ value }) => {\n const translate = useTranslate();\n return (\n \n );\n};\n\nexport default NbNewOrders;\n","import * as React from 'react';\r\nimport { FC } from 'react';\r\nimport { Card, CardHeader, CardContent } from '@material-ui/core';\r\nimport {\r\n ResponsiveContainer,\r\n AreaChart,\r\n Area,\r\n XAxis,\r\n YAxis,\r\n CartesianGrid,\r\n Tooltip,\r\n} from 'recharts'\r\nimport { useTranslate } from 'react-admin';\r\nimport { format, subDays, addDays } from 'date-fns';\r\n\r\nimport { Invoice } from './types';\r\n\r\nconst lastDay = new Date();\r\nconst lastMonthDays = Array.from({ length: 90 }, (_, i) => subDays(lastDay, i));\r\nconst aMonthAgo = subDays(new Date(), 90);\r\n\r\nconst dateFormatter = (date: number): string =>\r\n format(new Date(date),'DD-MM-YYYY');\r\n\r\nconst aggregateOrdersByDay = (orders: Invoice[]): { [key: string]: number } =>\r\n orders\r\n .reduce((acc, curr) => {\r\n const day = format(curr.adInvoceDate, 'DD-MM-YYYY');\r\n \r\n if (!acc[day]) {\r\n acc[day] = 0;\r\n }\r\n acc[day] += curr.anInvoiceForPay;\r\n return acc;\r\n }, {} as { [key: string]: number });\r\n\r\nconst getRevenuePerDay = (orders: Invoice[]): SkupajByDay[] => {\r\n const daysWithRevenue = aggregateOrdersByDay(orders);\r\n return lastMonthDays.map(date => ({\r\n date: date.getTime(),\r\n Skupaj: daysWithRevenue[format(date, 'DD-MM-YYYY')] || 0,\r\n }));\r\n};\r\n\r\nconst OrderChart: FC<{ orders?: Invoice[] }> = ({ orders }) => {\r\n const translate = useTranslate();\r\n if (!orders) return null;\r\n\r\n return (\r\n \r\n \r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n new Intl.NumberFormat(undefined, {\r\n style: 'currency',\r\n currency: 'EUR',\r\n }).format(value as any)\r\n }\r\n labelFormatter={(label: any) =>\r\n dateFormatter(label)\r\n }\r\n />\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n );\r\n};\r\n\r\ninterface SkupajByDay {\r\n date: number;\r\n Skupaj: number;\r\n}\r\n\r\nexport default OrderChart;\r\n","import * as React from 'react';\nimport { FC } from 'react';\nimport Card from '@material-ui/core/Card';\nimport CardHeader from '@material-ui/core/CardHeader';\nimport List from '@material-ui/core/List';\nimport ListItem from '@material-ui/core/ListItem';\nimport ListSubheader from '@material-ui/core/ListSubheader';\nimport ListItemSecondaryAction from '@material-ui/core/ListItemSecondaryAction';\nimport ListItemAvatar from '@material-ui/core/ListItemAvatar';\nimport ListItemText from '@material-ui/core/ListItemText';\nimport Avatar from '@material-ui/core/Avatar';\nimport { makeStyles } from '@material-ui/core/styles';\nimport { Link } from 'react-router-dom';\nimport { useTranslate } from 'react-admin';\nimport { Order,Invoice } from './types';\n\ninterface Props {\n orders?: Invoice[];\n}\n\nconst useStyles = makeStyles(theme => ({\n root: {\n flex: 1,\n },\n cost: {\n marginRight: '1em',\n color: theme.palette.text.primary,\n },\n hover1: {\"&:hover\":{color: '#020202'}}\n}\n));\n\nconst PendingOrders: FC = ({ orders = []}) => {\n const classes = useStyles();\n const translate = useTranslate();\n return (\n \n \n \n \n {`Identifikator`}\n {orders.map(record => (\n \n\n \n {(record.acInvoiceKey)}\n \n\n \n {new Date(record.adInvoceDate).toLocaleDateString(\n 'en-GB'\n )}\n \n \n \n\n \n {record.anInvoiceForPay}€\n \n \n \n ))}\n \n \n );\n};\nexport default PendingOrders;\n","import * as React from 'react';\r\nimport { FC } from 'react';\r\n\r\nimport Card from 'react-bootstrap/Card';\r\n\r\nimport CardHeader from '@material-ui/core/CardHeader';\r\nimport List from '@material-ui/core/List';\r\nimport ListItem from '@material-ui/core/ListItem';\r\nimport ListSubheader from '@material-ui/core/ListSubheader';\r\nimport ListItemSecondaryAction from '@material-ui/core/ListItemSecondaryAction';\r\nimport ListItemAvatar from '@material-ui/core/ListItemAvatar';\r\nimport ListItemText from '@material-ui/core/ListItemText';\r\nimport Avatar from '@material-ui/core/Avatar';\r\nimport { makeStyles } from '@material-ui/core/styles';\r\nimport { Link } from 'react-router-dom';\r\nimport { useTranslate, TextField} from 'react-admin';\r\nimport { Order,Invoice } from './types';\r\nimport { Button } from '@mui/material';\r\nimport IconButton from '@mui/material/IconButton';\r\nimport FindInPageOutlinedIcon from '@mui/icons-material/FindInPageOutlined';\r\nimport \"./CardGrid.css\"\r\ninterface Props {\r\n invoices?: Invoice[];\r\n}\r\n\r\nconst useStyles = makeStyles(theme => ({\r\n root: {\r\n flex: 1,\r\n boxSizing: 'border-box',\r\n width:'100%',\r\n marginLeft: '0px'\r\n },\r\n card:{\r\n boxshadow: '0px 4px 8px 0 rgba(0, 0, 0, 0.2)',\r\n padding: '0px',\r\n margin: '10px',\r\n textAlign: 'center',\r\n backgroundColor: '#f37435',\r\n backgroundcolor: 'transparent',\r\n maxHeight: 350,\r\n minHeight: 370,\r\n minWidth:250\r\n \r\n },\r\n cost: {\r\n marginRight: '1em',\r\n color: theme.palette.text.primary,\r\n },\r\n row: {\r\n margin:'5px 0px 15px 10px',\r\n padding:' 10px 0px 0px 0px',\r\n justifyContent: 'center',\r\n alignItems: 'center',\r\n position:'relative',\r\n \"&:after\":{ content: \"\",\r\n display: 'flex',\r\n flexDirection: 'column',\r\n //gridtemplatecolumns: 'repeat(auto-fit, minmax(40rem, 1fr))',\r\n }\r\n },\r\n column: {\r\n float: 'left',\r\n width: '18%',\r\n padding:' 4px 4px 4px 4px',\r\n margin:'0px 5px 5px 10px',\r\n //gridtemplatecolumns: 'repeat(auto-fit, minmax(40rem, 1fr))',\r\n minWidth:300\r\n \r\n },\r\n toPay:{\r\n fontWeight:'bold',\r\n fontSize:'30px',\r\n color: '#f37435',\r\n textAlign: 'center'\r\n },\r\n titleCard:{\r\n margin:'0px 0px 10px 0px',\r\n padding: '0px 0px 10px 0px'\r\n },\r\n button: {\r\n backgroundColor:'white',\r\n color: 'black',\r\n \"&:hover\":{backgroundColor:'#808080', borderColor: '#08080', color:'white'},\r\n borderColor: '#f37435',\r\n justifyContent: 'center',\r\n alignItems: 'center',\r\n position:'relative',\r\n width: '60%'\r\n },\r\n bodi:{\r\n paddingBottom:'20px',\r\n textAlign: 'center',\r\n fontSize: '20px' \r\n }\r\n \r\n}));\r\n\r\nconst NotPayedinvoices: FC = ({ invoices = []}) => {\r\n const classes = useStyles();\r\n const translate = useTranslate();\r\n return (\r\n \r\n \r\n
\r\n {invoices.map(record => (\r\n \r\n \r\n \r\n Račun za obdobje {record.acPeriod}\r\n \r\n Za plačilo:

{(\r\n record.anInvoiceForPay\r\n ).toLocaleString(undefined, {\r\n style: 'currency',\r\n currency: 'EUR',\r\n })}\r\n
\r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n ))}\r\n
\r\n
\r\n );\r\n};\r\nexport default NotPayedinvoices;\r\n","import React, {\r\n useState,\r\n useEffect,\r\n useCallback,\r\n FC,\r\n CSSProperties,\r\n} from 'react';\r\n\r\nimport { useMediaQuery, Theme } from '@material-ui/core';\r\nimport { useVersion, useDataProvider } from 'react-admin';\r\nimport { Order,Invoice } from './types';\r\nimport { subDays } from 'date-fns';\r\nimport MonthlyRevenue from './MonthlyRevenue';\r\nimport NbNewOrders from './NbNewOrders'\r\nimport OrderChart from './OrderChart';\r\nimport PendingOrders from './PendingOrders';\r\nimport NotPayedinvoices from './NotPayedInvoice';\r\n\r\nconst Spacer = () => ;\r\nconst VerticalSpacer = () => ;\r\n\r\nconst styles = {\r\n flex: { display: 'flex' },\r\n flexColumn: { display: 'flex', flexDirection: 'column' },\r\n leftCol: { flex: 1, marginRight: '0.5em', marginTop: \"10px\" },\r\n rightCol: { flex: 1, display: \"flex\", marginTop: \"1em\" },\r\n singleCol: { marginTop: '1em', marginBottom: '1em'},\r\n block: { display:'grid'},\r\n parent: { \r\n display: 'grid',\r\n gridgap: '2rem',\r\n gridtemplatecolumns: 'repeat(auto-fit, minmax(40rem, 1fr))',\r\n marginblock: '2rem',\r\n padding:' 0 1rem',\r\n justifyitems: 'center',\r\n alignitems: 'center'}\r\n};\r\n\r\ninterface State {\r\n nbNewOrders?: number;\r\n pendingOrders?: Invoice[];\r\n recentOrders?: Invoice[];\r\n revenue?: string;\r\n notPayedOrders?: Invoice[];\r\n}\r\ninterface OrderStats {\r\n revenue: number;\r\n nbNewOrders: number;\r\n pendingOrders: Invoice[];\r\n notPayedOrders?: Invoice[];\r\n}\r\n\r\nconst Dashboard: FC = () => {\r\n const [state, setState] = useState({});\r\n const version = useVersion();\r\n const dataProvider = useDataProvider();\r\n const isXSmall = useMediaQuery((theme: Theme) =>\r\n theme.breakpoints.down('xs')\r\n );\r\n const isSmall = useMediaQuery((theme: Theme) =>\r\n theme.breakpoints.down('md')\r\n );\r\n document.title = \"eNadzornik - Nadzorna\";\r\n const fetchOrders = useCallback(async () => {\r\n const aMonthAgo = subDays(new Date(), 365);\r\n const today = new Date();\r\n const { data: recentOrders } = await dataProvider.getList('Move/GetInvoices',\r\n {\r\n filter: { adDateFrom: aMonthAgo.toISOString(), adDateTo: today.toISOString() },\r\n sort: { field: 'adInvoceDate', order: 'DESC' },\r\n pagination: { page: 1, perPage: 10 },\r\n }\r\n );\r\n\r\n const { data: notPayedOrders } = await dataProvider.getList('Move/GetInvoices',\r\n {\r\n filter: { adDateFrom: aMonthAgo.toISOString(), adDateTo: today.toISOString(),acInvoicePayed:'N' },\r\n sort: { field: 'adInvoceDate', order: 'DESC' },\r\n pagination: { page: 1, perPage: 100 },\r\n }\r\n );\r\n\r\n const aggregations = recentOrders\r\n .reduce(\r\n (stats: OrderStats, order) => {\r\n { \r\n stats.revenue += order.anInvoiceForPay;\r\n stats.nbNewOrders++;\r\n }\r\n if (order.acInvoicePayed === 'Y' && stats.pendingOrders.length < 10) {\r\n stats.pendingOrders.push(order);\r\n }\r\n return stats;\r\n },\r\n {\r\n revenue: 0,\r\n nbNewOrders: 0,\r\n pendingOrders: [],\r\n }\r\n );\r\n\r\n const aggregations1 = notPayedOrders\r\n .reduce(\r\n (stats: OrderStats, order) => {\r\n { \r\n stats.revenue += order.anInvoiceForPay;\r\n stats.nbNewOrders++;\r\n }\r\n return stats;\r\n },\r\n {\r\n revenue: 0,\r\n nbNewOrders: 0,\r\n pendingOrders: [],\r\n }\r\n );\r\n setState(state => ({\r\n ...state,\r\n recentOrders,\r\n revenue: aggregations1.revenue.toLocaleString(undefined, {\r\n style: 'currency',\r\n currency: 'EUR',\r\n minimumFractionDigits: 0,\r\n maximumFractionDigits: 0,\r\n }),\r\n nbNewOrders: aggregations1.nbNewOrders,\r\n pendingOrders: aggregations.pendingOrders,\r\n notPayedOrders: notPayedOrders,\r\n }));\r\n }, [dataProvider]);\r\n\r\n useEffect(() => {\r\n fetchOrders();\r\n }, [version]);\r\n\r\n const {\r\n revenue,\r\n nbNewOrders,\r\n recentOrders,\r\n pendingOrders,\r\n notPayedOrders\r\n } = state;\r\n\r\n return isXSmall ? (\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n
\r\n
\r\n ) : isSmall ? (\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n ) : (\r\n <>\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n\r\n
\r\n
\r\n \r\n
\r\n
\r\n\r\n \r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n\r\n \r\n );\r\n};\r\n\r\nexport default Dashboard;","import * as React from \"react\";\r\nimport Card from '@material-ui/core/Card';\r\nimport CardContent from '@material-ui/core/CardContent';\r\nimport { Title } from 'react-admin';\r\n\r\nexport default () => (\r\n \r\n \r\n <CardContent>\r\n <h1>404: Strani ni mogoče najti</h1>\r\n </CardContent>\r\n </Card>\r\n);","import * as React from 'react';\nimport { forwardRef } from 'react';\nimport { AppBar, UserMenu, MenuItemLink, useTranslate, Toolbar } from 'react-admin';\nimport Typography from '@material-ui/core/Typography';\nimport SettingsIcon from '@material-ui/icons/Settings';\nimport { makeStyles } from '@material-ui/core/styles';\n\nimport logo from './images/prenos.png';\n\nconst useStyles = makeStyles({\n title: {\n flex: 1,\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap',\n overflow: 'hidden',\n },\n spacer: {\n flex: 1,\n },\n logo: {\n maxWidth: \"400px\",\n marginBottom: 0,\n marginTop: 2,\n height: \"50px\",\n alignItems: 'end',\n marginRight:20\n },\n});\n\nconst ConfigurationMenu = forwardRef<any, any>((props, ref) => {\n const translate = useTranslate();\n return (\n <MenuItemLink\n ref={ref}\n to=\"/configuration\"\n primaryText={translate('Nastavitve')}\n leftIcon={<SettingsIcon />}\n onClick={props.onClick}\n sidebarIsOpen\n />\n );\n});\n\nconst CustomUserMenu = (props: any) => (\n <UserMenu {...props}>\n <ConfigurationMenu />\n </UserMenu>\n);\n\nconst CustomAppBar = (props: any) => {\n const classes = useStyles();\n return (\n <AppBar {...props} elevation={1} userMenu={<CustomUserMenu />}>\n <img src={logo} alt=\"Softeh\" className={classes.logo} />\n <Typography\n variant=\"h6\"\n color=\"inherit\"\n className={classes.title}\n id=\"react-admin-title\"\n />\n <span className={classes.spacer} />\n </AppBar>\n );\n};\n\nexport default CustomAppBar;\n","export default \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAWoAAACLCAMAAAB/aSNCAAAAqFBMVEX////zbyG8vcCotcm5ur3zbRvi4uP5+fnz9PS+v8LLzM7d3t/85t/zahPzaAjAwcT/+vf0g0vt7u72n3v5u6T5xrTQ0dPo6OnzaQvzbBfyYwD0g0z+9fLZ2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weg/qq3OFFI83GysNTfS51TjkLI0AC5OppzKE4QwHF6PGMeZtjo/QqA+F4z8dRkhZZvPR5r2D7uKG70Em+33/i099UknDYTjLE2qPKbHZZvrxSIN1V8swiEjmZXnwuuOWDPvfCc8//x4VeWPxsibc0sGa0D61YkAsRGO4QOQ+eDUjowRqH1SEQl9u0FORqB2/0U1eb0Wa0UaV823oy4grXbFx3Ud1uq7GjRN2N/5kye9VKRp4nxTUZY0UN9Aokt2WT+btPqKGksruc0qFGkJraS2YGGRVl8X5Wkls7GQIi2lleCMrCJ9uWKJrckoar5o+l+oVlgvO96u6UYUN95GUpGW1ehS1m7X273djppvj6pIy6rp9spV0t1vF3lLuoB187Def7mkt8JXpBtLkvXP2ET5xnSQ+ZjGz9mG/aZ08Buzdo+83T6UmHpp+jmen/jJjBtRw+UyS+4ONkpczZuwXm4V6QvU4HOi4EmRvkjCrMFUkb5QgkuTij33lOQlxBrs1GfoWpAAa/ChSLeimiV36UIXRbol1Wwe4quPxLenT+73CL7irst3T+KwVqRbFmsZmOgyOSVxfdPrtf+lFrq0rgcaa/9LLb+4giis/Y1afnEVEcvADEX6WsJYK9JX1BHdMxxs1EKXK+rRgPv8guBd+R5XVfx7GgRuEBhHVaWvr/h0ODyr8SUlJSUlpbvRXzeof/7z3/91XYbm+j8nS+qRZrmoDwAAAABJRU5ErkJggg==\"","import * as React from 'react';\r\nimport { FC, useState } from 'react';\r\nimport { useSelector } from 'react-redux';\r\nimport SettingsIcon from '@material-ui/icons/Settings';\r\nimport LabelIcon from '@material-ui/icons/Label';\r\nimport { useMediaQuery, Theme, Box } from '@material-ui/core';\r\nimport AccountBalanceWalletIcon from '@mui/icons-material/AccountBalanceWallet';\r\nimport DashboardIcon from '@material-ui/icons/Dashboard';\r\nimport AccountBalanceIcon from '@mui/icons-material/AccountBalance';\r\nimport PointOfSaleIcon from '@mui/icons-material/PointOfSale';\r\n\r\nimport {\r\n useTranslate,\r\n DashboardMenuItem,\r\n MenuItemLink,\r\n MenuProps,\r\n} from 'react-admin';\r\nimport \"./MenuStili.css\"\r\n\r\nimport orders from './orders';\r\nimport SubMenu from './SubMenu';\r\nimport { AppState } from './types';\r\n\r\ntype MenuName = 'menuCatalog' | 'menuSales' | 'menuCustomers';\r\n\r\nconst Menu: FC<MenuProps> = ({ onMenuClick, logout, dense = false }) => {\r\n const [state, setState] = useState({\r\n menuCatalog: true,\r\n menuSales: true,\r\n menuCustomers: true,\r\n });\r\n const translate = useTranslate();\r\n const isXSmall = useMediaQuery((theme: Theme) =>\r\n theme.breakpoints.down('xs')\r\n );\r\n const open = useSelector((state: AppState) => state.admin.ui.sidebarOpen);\r\n useSelector((state: AppState) => state.theme); // force rerender on theme change\r\n\r\n const handleToggle = (menu: MenuName) => {\r\n setState(state => ({ ...state, [menu]: !state[menu] }));\r\n };\r\n\r\n return (\r\n <Box mt={3}>\r\n {' '}\r\n <MenuItemLink \r\n onClick={onMenuClick}\r\n sidebarIsOpen={open} \r\n primaryText=\"Domov\"\r\n leftIcon={<DashboardIcon />}\r\n to=\"/\"\r\n />\r\n {/*<SubMenu\r\n handleToggle={() => handleToggle('menuSales')}\r\n isOpen={state.menuSales}\r\n sidebarIsOpen={open}\r\n name=\"Prodaja\"\r\n icon={<PointOfSaleIcon/>}\r\n dense={dense}\r\n >\r\n <MenuItemLink\r\n to={`/Order/GetOrders`}\r\n primaryText={translate(`Naročila`, {\r\n smart_count: 2,\r\n })}\r\n leftIcon={<orders.icon />}\r\n onClick={onMenuClick}\r\n sidebarIsOpen={open}\r\n dense={dense}\r\n />\r\n \r\n {/* <MenuItemLink\r\n to={`/invoices`}\r\n primaryText={translate(`resources.invoices.name`, {\r\n smart_count: 2,\r\n })}\r\n leftIcon={<orders.icon />}\r\n onClick={onMenuClick}\r\n sidebarIsOpen={open}\r\n dense={dense}\r\n />\r\n </SubMenu>\r\n */}\r\n\r\n <MenuItemLink\r\n to={`/Move/GetInvoices`}\r\n primaryText={translate(`Računi`, {\r\n smart_count: 2,\r\n })}\r\n \r\n leftIcon={<AccountBalanceWalletIcon/>}\r\n onClick={onMenuClick}\r\n sidebarIsOpen={open}\r\n dense={dense}\r\n />\r\n <MenuItemLink\r\n to={`/Move/GetBuildings`}\r\n primaryText={translate(`Stavbe`, {\r\n smart_count: 2,\r\n })}\r\n leftIcon={<AccountBalanceIcon/>}\r\n onClick={onMenuClick}\r\n sidebarIsOpen={open}\r\n dense={dense}\r\n />\r\n {/*<SubMenu\r\n handleToggle={() => handleToggle('menuCustomers')}\r\n isOpen={state.menuCustomers}\r\n sidebarIsOpen={open}\r\n name=\"pos.menu.customers\"\r\n icon={<orders.icon />}\r\n dense={dense}\r\n >\r\n <MenuItemLink\r\n to={`/customers`}\r\n primaryText={translate(`resources.customers.name`, {\r\n smart_count: 2,\r\n })}\r\n leftIcon={<orders.icon />}\r\n onClick={onMenuClick}\r\n sidebarIsOpen={open}\r\n dense={dense}\r\n />\r\n <MenuItemLink\r\n to={`/segments`}\r\n primaryText={translate(`resources.segments.name`, {\r\n smart_count: 2,\r\n })}\r\n leftIcon={<LabelIcon />}\r\n onClick={onMenuClick}\r\n sidebarIsOpen={open}\r\n dense={dense}\r\n />\r\n </SubMenu>\r\n <MenuItemLink\r\n to={`/reviews`}\r\n primaryText={translate(`resources.reviews.name`, {\r\n smart_count: 2,\r\n })}\r\n leftIcon={<orders.icon />}\r\n onClick={onMenuClick}\r\n sidebarIsOpen={open}\r\n dense={dense}\r\n /> \r\n </SubMenu>*/}\r\n {isXSmall && (\r\n <MenuItemLink\r\n to=\"/configuration\"\r\n primaryText={translate('Nastavitve')}\r\n leftIcon={<SettingsIcon />}\r\n onClick={onMenuClick}\r\n sidebarIsOpen={open}\r\n dense={dense}\r\n />\r\n )}\r\n {isXSmall && logout}\r\n </Box>\r\n );\r\n};\r\n\r\nexport default Menu;\r\n","export const darkTheme = {\n palette: {\n primary: {\n main: '#90caf9',\n },\n secondary: {\n main: '#FBBA72',\n },\n type: 'dark' as 'dark', // Switching the dark mode on is a single property value change.\n },\n overrides: {\n MuiAppBar: {\n colorSecondary: {\n color: '#ffffffb3',\n backgroundColor: '#616161e6',\n },\n },\n a:{\n color:'#FF5F1F'\n },\n MuiButtonBase: {\n root: {\n '&:hover:active::after': {\n // recreate a static ripple color\n // use the currentColor to make it work both for outlined and contained buttons\n // but to dim the background without dimming the text,\n // put another element on top with a limited opacity\n content: '\"\"',\n display: 'block',\n width: '100%',\n height: '100%',\n position: 'absolute',\n top: 0,\n right: 0,\n backgroundColor: 'currentColor',\n opacity: 0.3,\n borderRadius: 'inherit',\n },\n },\n },\n },\n props: {\n MuiButtonBase: {\n // disable ripple for perf reasons\n disableRipple: true,\n },\n },\n};\n\nexport const lightTheme = {\n palette: {\n primary: {\n main: '#f37435',\n },\n secondary: {\n light: '#f37435',\n main: '#283593',\n dark: '#001064',\n contrastText: '#fff',\n },\n background: {\n default: '#fcfcfe',\n },\n type: 'light' as 'light',\n },\n shape: {\n borderRadius: 10,\n },\n a:{\n color:'#FF5F1F'\n },\n overrides: {\n RaMenuItemLink: {\n root: {\n borderLeft: '3px solid #fff',\n a:{\n color:'#FF5F1F'\n },\n fontSize: 18,\n \"&:hover\" :\n {\n color: 'white',\n backgroundColor: '#f37435',\n }\n },\n active: {\n borderLeft: '3px solid #f37435',\n },\n },\n \n \n MuiPaper: {\n elevation1: {\n boxShadow: 'none',\n },\n root: {\n border: '1px solid #e0e0e3',\n backgroundClip: 'padding-box',\n },\n },\n MuiButton: {\n contained: {\n backgroundColor: '#fff',\n color: '#4f3cc9',\n boxShadow: 'none',\n },\n },\n MuiButtonBase: {\n root: {\n '&:hover:active::after': {\n // recreate a static ripple color\n // use the currentColor to make it work both for outlined and contained buttons\n // but to dim the background without dimming the text,\n // put another element on top with a limited opacity\n content: '\"\"',\n display: 'block',\n width: '100%',\n height: '100%',\n position: 'absolute',\n top: 0,\n right: 0,\n backgroundColor: 'currentColor',\n opacity: 0.3,\n borderRadius: 'inherit',\n },\n },\n },\n MuiAppBar: {\n colorSecondary: {\n color: '#808080',\n backgroundColor: '#fff',\n },\n },\n MuiLinearProgress: {\n colorPrimary: {\n backgroundColor: '#f5f5f5',\n },\n barColorPrimary: {\n backgroundColor: '#d7d7d7',\n },\n },\n MuiFilledInput: {\n root: {\n backgroundColor: 'rgba(0, 0, 0, 0.04)',\n '&$disabled': {\n backgroundColor: 'rgba(0, 0, 0, 0.04)',\n },\n },\n },\n MuiSnackbarContent: {\n root: {\n border: 'none',\n },\n },\n },\n props: {\n MuiButtonBase: {\n // disable ripple for perf reasons\n disableRipple: true,\n },\n },\n};\n","import * as React from 'react';\r\nimport { useSelector } from 'react-redux';\r\nimport { Layout, LayoutProps, Sidebar } from 'react-admin';\r\nimport AppBar from '../AppBar';\r\nimport MyMenu from '../MyMenu';\r\nimport { darkTheme, lightTheme } from '../themes';\r\nimport { AppState } from '../types';\r\n\r\nconst CustomSidebar = (props: any) => <Sidebar {...props} size={200} />;\r\n\r\nexport default (props: LayoutProps) => {\r\n const theme = useSelector((state: AppState) =>\r\n state.theme === 'dark' ? darkTheme : lightTheme\r\n );\r\n return (\r\n <Layout\r\n {...props}\r\n appBar={AppBar}\r\n sidebar={CustomSidebar}\r\n menu={MyMenu}\r\n theme={theme}\r\n />\r\n );\r\n};\r\n","import * as React from 'react';\r\nimport { useState } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { Field, withTypes } from 'react-final-form';\r\nimport { useLocation } from 'react-router-dom';\r\nimport {myTheme} from \"../theme\"\r\nimport { useRedirect } from 'react-admin';\r\n\r\nimport {\r\n Avatar,\r\n Button,\r\n Card,\r\n CardActions,\r\n CircularProgress,\r\n TextField,\r\n} from '@material-ui/core';\r\nimport { createMuiTheme, makeStyles } from '@material-ui/core/styles';\r\nimport { ThemeProvider } from '@material-ui/styles';\r\nimport LockIcon from '@material-ui/icons/Lock';\r\nimport { Notification, useTranslate, useLogin, useNotify } from 'react-admin';\r\n\r\nimport {lightTheme} from \"../themes\"\r\nimport { collapseClasses } from '@mui/material';\r\n\r\nconst useStyles = makeStyles(theme => ({\r\n main: {\r\n display: 'flex',\r\n flexDirection: 'column',\r\n minHeight: '98vh',\r\n alignItems: 'center',\r\n justifyContent: 'flex-start',\r\n background: 'url(https://source.unsplash.com/random/1600x900)',\r\n backgroundRepeat: 'no-repeat',\r\n backgroundSize: 'cover',\r\n backgroundPosition: 'center',\r\n margin:0,\r\n padding:0,\r\n },\r\n card: {\r\n minWidth: 300,\r\n marginTop: '6em',\r\n minHeight: 400\r\n },\r\n avatar: {\r\n margin: '1em',\r\n display: 'flex',\r\n justifyContent: 'center',\r\n },\r\n icon: {\r\n backgroundColor: theme.palette.primary.main,\r\n },\r\n hint: {\r\n marginTop: '1em',\r\n display: 'flex',\r\n justifyContent: 'center',\r\n color: theme.palette.grey[500],\r\n },\r\n form: {\r\n padding: '0 1em 1em 1em',\r\n },\r\n input: {\r\n marginTop: '1em',\r\n },\r\n actions: {\r\n padding: '0 1em 1em 1em',\r\n },\r\n word:{\r\n padding: '0 1em 1em 1em',\r\n },\r\n button12: {\r\n color: '#f37435',\r\n height: '40px'\r\n },\r\n button2: {\r\n \r\n height: '40px'\r\n },\r\n}));\r\n\r\nconst renderInput = ({\r\n meta: { touched, error } = { touched: false, error: undefined },\r\n input: { ...inputProps },\r\n ...props\r\n}) => (\r\n <TextField\r\n error={!!(touched && error)}\r\n helperText={touched && error}\r\n {...inputProps}\r\n {...props}\r\n fullWidth\r\n />\r\n);\r\n\r\ninterface FormValues {\r\n username?: string;\r\n password?: string;\r\n}\r\n\r\nconst { Form } = withTypes<FormValues>();\r\n\r\nconst Login = () => {\r\n const [loading, setLoading] = useState(false);\r\n const translate = useTranslate();\r\n const classes = useStyles();\r\n const notify = useNotify();\r\n const login = useLogin();\r\n const location = useLocation<{ nextPathname: string } | null>();\r\n\r\n const handleSubmit = (auth: FormValues) => {\r\n setLoading(true);\r\n login(auth, location.state ? location.state.nextPathname : '/').catch(\r\n (error: Error) => {\r\n setLoading(false);\r\n notify(\r\n typeof error === 'string'\r\n ? error\r\n : typeof error === 'undefined' || !error.message\r\n ? 'Napaka pri prijavi'\r\n : error.message,\r\n 'warning',\r\n {\r\n _:\r\n typeof error === 'string'\r\n ? error\r\n : error && error.message\r\n ? 'Neveljavni prijavni podatki'\r\n : undefined,\r\n }\r\n );\r\n }\r\n );\r\n };\r\n \r\n\r\n const redirect = useRedirect();\r\n const handleClick2 = () => {\r\n redirect('/register');\r\n }\r\n const validate = (values: FormValues) => {\r\n const errors: FormValues = {};\r\n if (!values.username) {\r\n errors.username = translate('Obvezno polje');\r\n }\r\n if (!values.password) {\r\n errors.password = translate('Obvezno polje');\r\n }\r\n return errors;\r\n };\r\n document.title = \"eNadzornik - Prijava\";\r\n\r\n return (\r\n <Form\r\n onSubmit={handleSubmit}\r\n validate={validate}\r\n render={({ handleSubmit }) => (\r\n <form onSubmit={handleSubmit} noValidate>\r\n <div className={classes.main}>\r\n <Card className={classes.card}>\r\n <div className={classes.avatar}>\r\n <Avatar className={classes.icon}>\r\n <LockIcon />\r\n </Avatar>\r\n </div>\r\n <div className={classes.hint}>\r\n </div>\r\n <div className={classes.form}>\r\n <div className={classes.input}>\r\n <Field\r\n autoFocus\r\n name=\"username\"\r\n // @ts-ignore\r\n component={renderInput}\r\n label={translate('Uporabniško ime')}\r\n disabled={loading}\r\n />\r\n </div>\r\n <div className={classes.input}>\r\n <Field\r\n name=\"password\"\r\n // @ts-ignore\r\n component={renderInput}\r\n label={translate('Geslo')}\r\n type=\"password\"\r\n disabled={loading}\r\n />\r\n </div>\r\n </div>\r\n <CardActions className={classes.actions}>\r\n <Button className={classes.button2}\r\n variant=\"contained\"\r\n type=\"submit\"\r\n color=\"primary\"\r\n defaultValue={\"Prijava\"}\r\n disabled={loading}\r\n fullWidth\r\n >\r\n {loading && (\r\n <CircularProgress\r\n size={25}\r\n thickness={2}\r\n />\r\n )}\r\n {translate('Prijava')}\r\n </Button>\r\n \r\n </CardActions>\r\n <div className = {classes.word}>\r\n <p>Še niste registrarani?</p>\r\n </div>\r\n \r\n <CardActions className={classes.actions}>\r\n <Button className={classes.button12}\r\n variant=\"outlined\"\r\n color=\"primary\"\r\n onClick={handleClick2}\r\n defaultValue=\"Registracija\"\r\n fullWidth>\r\n \r\n {translate('Registracija')}\r\n \r\n </Button>\r\n </CardActions>\r\n\r\n </Card>\r\n <Notification />\r\n \r\n </div>\r\n </form>\r\n )}\r\n />\r\n );\r\n};\r\n\r\nLogin.propTypes = {\r\n authProvider: PropTypes.func,\r\n previousRoute: PropTypes.string,\r\n};\r\n\r\nconst LoginWithTheme = (props: any) => (\r\n <ThemeProvider theme={createMuiTheme(lightTheme)}>\r\n <Login {...props} />\r\n </ThemeProvider>\r\n);\r\n\r\nexport default LoginWithTheme;\r\n","import { DatagridProps, useListContext, useGetList, FilterProps, Filter, SelectInput, DateInput,Identifier, \r\n ListContextProvider, Datagrid, DateField, TextField, ReferenceField, NumberField, BooleanField,List,ListProps, ReferenceInput,AutocompleteInput, ShowButton} from \"react-admin\";\r\nimport { FC, Fragment, useCallback, useEffect, useState } from 'react';\r\nimport { makeStyles } from '@material-ui/core/styles';\r\nimport { useMediaQuery, Divider, Tabs, Tab, Theme } from '@material-ui/core';\r\n\r\n\r\nconst useDatagridStyles = makeStyles({\r\n total: { fontWeight: 'bold' },\r\n hover1: {\"&:hover\":{color: '#cdcdcd'}}\r\n});\r\n\r\n\r\nconst TabbedDatagrid: FC<DatagridProps> = props => {\r\n const listContext = useListContext();\r\n //const { ids, filterValues, setFilters, displayedFilters } = listContext;\r\n const classes = useDatagridStyles();\r\n\r\n return (\r\n <Datagrid {...props} optimized rowClick=\"show\">\r\n <TextField source=\"id\" label=\"identifikator\"></TextField>\r\n <TextField source=\"acLable\" label=\"Oznaka stavbe\"/>\r\n <TextField source=\"acAddress\" label={\"Naslov stavbe\"}/> \r\n <NumberField\r\n source=\"acPost\"\r\n label=\"Pošta\"\r\n options={{\r\n style: 'currency',\r\n currency: 'EUR',\r\n }}\r\n className={classes.total}\r\n />\r\n <ShowButton className={classes.hover1} label=\"Prikaži\"></ShowButton>\r\n </Datagrid>\r\n );\r\n};\r\nconst buildings: FC<ListProps> = props => (\r\n <List\r\n {...props}\r\n bulkActionButtons={false}\r\n perPage={25}\r\n >\r\n <TabbedDatagrid/>\r\n </List>\r\n);\r\n\r\nexport default buildings;\r\n","import React from 'react'\r\nimport { GoogleMap, useJsApiLoader } from '@react-google-maps/api';\r\nimport { Marker,InfoWindow } from '@react-google-maps/api';\r\n\r\nconst containerStyle = {\r\n width: '100%',\r\n height: '400px'\r\n};\r\n\r\n\r\n\r\nconst MyComponent = (props:any) => {\r\n const { isLoaded } = useJsApiLoader({\r\n id: 'google-map-script',\r\n googleMapsApiKey: \"AIzaSyB-XofUsaIJkI7rhYHKaaGQYnX4JgWSf8A\"\r\n })\r\nconst center = {\r\n lat: props.props.record.latitude,\r\n lng: props.props.record.longitude\r\n };\r\n const [map, setMap] = React.useState(null)\r\n const info = {\r\n text: props.props.record.acAddress + \" \" + props.props.record.acHouseNo ,\r\n post: props.props.record.acPost + props.props.record.acPostName\r\n }\r\n const onLoad = React.useCallback(function callback(map) {\r\n const bounds = new window.google.maps.LatLngBounds(center);\r\n map.fitBounds(bounds);\r\n setMap(map)\r\n }, [])\r\n\r\n const onUnmount = React.useCallback(function callback(map) {\r\n setMap(null)\r\n }, [])\r\n\r\n return isLoaded ? (\r\n <GoogleMap\r\n mapContainerStyle={containerStyle}\r\n center={center}\r\n zoom={16}\r\n onLoad={onLoad}\r\n onUnmount={onUnmount}\r\n >\r\n <Marker\r\n position={center}\r\n />\r\n <InfoWindow\r\n position={center}\r\n >\r\n <div >\r\n <h6>{info.text} <br>\r\n </br>\r\n {info.post}\r\n </h6>\r\n </div>\r\n </InfoWindow>\r\n </GoogleMap>\r\n ) : <></>\r\n}\r\n\r\nexport default React.memo(MyComponent)","import * as React from 'react';\r\n\r\nimport { FC } from 'react';\r\nimport {\r\n Edit,\r\n EditProps,\r\n FormWithRedirect,\r\n Labeled,\r\n TextField,\r\n Toolbar,\r\n useTranslate,\r\n LinearProgress\r\n} from 'react-admin';\r\nimport {\r\n Card,\r\n CardContent,\r\n Box,\r\n Grid,\r\n Typography\r\n} from '@material-ui/core';\r\n\r\n\r\n\r\nimport { makeStyles } from '@material-ui/core/styles';\r\nimport { Building } from '../types';\r\n\r\nimport MyComponent from './maps';\r\n\r\n\r\n\r\ninterface MoveTitleProps {\r\n record?: Building;\r\n}\r\n\r\nconst OrderTitle: FC<MoveTitleProps> = ({ record }) => {\r\n const translate = useTranslate();\r\n \r\n return record ? (\r\n <span>\r\n Naslov: { record?.acName} \r\n \r\n </span>\r\n ) : null;\r\n};\r\n\r\nconst CustomerAddress = ({ record }: { record?: Building }) => (\r\n \r\n <Box>\r\n <Typography>\r\n {record?.acName} \r\n </Typography>\r\n <Typography>{record?.acAddress}</Typography>\r\n <Typography>\r\n {record?.acHouseNo}\r\n </Typography>\r\n </Box>\r\n \r\n);\r\n\r\nconst useEditStyles = makeStyles({\r\n root: { alignItems: 'flex-end'},\r\n padding_top: {marginTop:2}\r\n});\r\n\r\nconst Spacer = () => <Box m={1}> </Box>;\r\n\r\n\r\nconst CustomToolbar = (props:any) => (\r\n <Toolbar {...props}>\r\n \r\n </Toolbar>\r\n);\r\n\r\n\r\n\r\nconst BuildingForm = (props: any) => {\r\n const translate = useTranslate(); \r\n const classess = useEditStyles();\r\n \r\n\r\n document.title = \"eNadzornik \";\r\n return (\r\n <FormWithRedirect\r\n {...props} \r\n render={(formProps: any) => ( \r\n <React.Fragment> \r\n <Box maxWidth=\"70em\" >\r\n <Card>\r\n <CardContent>\r\n <Grid container spacing={3}>\r\n <Grid item xs={12} sm={12} md={8}>\r\n <Typography variant=\"h6\" gutterBottom>\r\n Podatki o stavbi\r\n \r\n </Typography>\r\n <Grid container>\r\n <Grid item xs={12} sm={12} md={6}>\r\n <Labeled\r\n source=\"Naziv\"\r\n resource=\"commands\"\r\n >\r\n <TextField\r\n source=\"acName\"\r\n resource={`Move/GetBuildings/${formProps.record.id}`}\r\n record={formProps.record}\r\n />\r\n </Labeled>\r\n </Grid>\r\n <Grid container>\r\n <Grid item xs={12} sm={12} md={6}>\r\n <Labeled\r\n source=\"Oznaka\"\r\n resource=\"commands\"\r\n >\r\n <TextField\r\n source=\"acLable\"\r\n resource={`Move/GetBuildings/${formProps.record.id}`}\r\n record={formProps.record}\r\n />\r\n </Labeled>\r\n </Grid>\r\n </Grid>\r\n <Grid container>\r\n <Grid item xs={12} sm={10} md={9}>\r\n <Labeled\r\n source=\"Neto površina\"\r\n resource=\"commands\"\r\n >\r\n <TextField\r\n source=\"anNetoArea\"\r\n resource={`Move/GetBuildings/${formProps.record.id}`}\r\n record={formProps.record}\r\n /> \r\n </Labeled>\r\n \r\n </Grid>\r\n </Grid>\r\n \r\n <Grid container>\r\n <Grid item xs={12} sm={10} md={9}>\r\n <Labeled\r\n source=\"Uporabna površina\"\r\n resource=\"commands\"\r\n >\r\n <TextField\r\n source=\"anUsableArea\"\r\n resource={`Move/GetBuildings/${formProps.record.id}`}\r\n record={formProps.record}\r\n /> \r\n </Labeled>\r\n \r\n </Grid>\r\n </Grid>\r\n\r\n <Grid container>\r\n <Grid item xs={12} sm={10} md={12}>\r\n \r\n </Grid>\r\n </Grid>\r\n\r\n </Grid>\r\n \r\n \r\n </Grid>\r\n <Box></Box>\r\n <Grid item xs={12} sm={12} md={4} className={classess.padding_top}>\r\n <Typography variant=\"h6\" gutterBottom>\r\n Naslov\r\n </Typography>\r\n <Box>\r\n <Typography>\r\n {formProps.record?.acAdress} \r\n </Typography>\r\n <Typography>\r\n {formProps.record?.acAddress} {formProps.record?.acHouseNo} \r\n </Typography>\r\n <Typography>\r\n {formProps.record?.acPost} {formProps.record?.acPostName}\r\n </Typography>\r\n\r\n\r\n </Box>\r\n <Spacer />\r\n </Grid>\r\n </Grid>\r\n <Spacer />\r\n <Box>\r\n <MyComponent props={formProps}></MyComponent>\r\n </Box>\r\n\r\n </CardContent> \r\n </Card>\r\n\r\n </Box>\r\n\r\n \r\n</React.Fragment>\r\n \r\n \r\n )}\r\n /> \r\n );\r\n};\r\nconst BuildingEdit: FC<EditProps> = props => {\r\n const classes = useEditStyles();\r\n console.log(props);\r\n return (\r\n <Edit\r\n title = {<OrderTitle/>}\r\n classes={classes}\r\n {...props}\r\n component=\"div\"\r\n //aside={<MyComponent props={props}></MyComponent>}\r\n >\r\n <BuildingForm toolbar={<CustomToolbar/>}></BuildingForm>\r\n </Edit>\r\n \r\n \r\n );\r\n};\r\n\r\nexport default BuildingEdit;","import { EditGuesser } from \"react-admin\";\r\nimport buildings from \"./buildings\";\r\nimport BuildingEdit from \"./buildingEdit\";\r\n\r\nexport default {\r\n list: buildings,\r\n edit: BuildingEdit\r\n}","// in src/comments.js\r\nimport * as React from 'react';\r\nimport { FC } from 'react';\r\nimport { Card, CardHeader, CardContent } from '@material-ui/core';\r\nimport { makeStyles } from '@material-ui/core/styles';\r\nimport {\r\n DateField,\r\n EditButton,\r\n NumberField,\r\n TextField,\r\n BooleanField,\r\n useTranslate,\r\n RecordMap,\r\n Identifier,\r\n Record,\r\n} from 'react-admin';\r\n\r\nconst useListStyles = makeStyles(theme => ({\r\n card: {\r\n height: '100%',\r\n display: 'flex',\r\n flexDirection: 'column',\r\n margin: '0.5rem 0',\r\n },\r\n cardTitleContent: {\r\n display: 'flex',\r\n flexDirection: 'row',\r\n alignItems: 'center',\r\n justifyContent: 'space-between',\r\n },\r\n cardContent: theme.typography.body1,\r\n cardContentRow: {\r\n display: 'flex',\r\n flexDirection: 'row',\r\n alignItems: 'center',\r\n margin: '0.5rem 0',\r\n },\r\n}));\r\n\r\ninterface MobileGridProps {\r\n ids?: Identifier[];\r\n data?: RecordMap<Record>;\r\n basePath?: string;\r\n}\r\n\r\nconst MobileGrid: FC<MobileGridProps> = ({ ids, data, basePath }) => {\r\n const translate = useTranslate();\r\n const classes = useListStyles();\r\n\r\n if (!ids || !data || !basePath) {\r\n return null;\r\n }\r\n\r\n return (\r\n <div style={{ margin: '1em' }}>\r\n {ids.map(id => (\r\n <Card key={id} className={classes.card}>\r\n <CardHeader\r\n title={\r\n <div className={classes.cardTitleContent}>\r\n <span>\r\n {translate('resources.commands.name', 1)}\r\n : \r\n <TextField\r\n record={data[id]}\r\n source=\"reference\"\r\n />\r\n </span>\r\n <EditButton\r\n resource=\"commands\"\r\n basePath={basePath}\r\n record={data[id]}\r\n />\r\n </div>\r\n }\r\n />\r\n <CardContent className={classes.cardContent}>\r\n <span className={classes.cardContentRow}>\r\n {translate('resources.customers.name', 1)}: \r\n </span>\r\n <span className={classes.cardContentRow}>\r\n {translate('resources.reviews.fields.date')}: \r\n <DateField\r\n record={data[id]}\r\n source=\"date\"\r\n showTime\r\n />\r\n </span>\r\n <span className={classes.cardContentRow}>\r\n {translate(\r\n 'resources.commands.fields.basket.total'\r\n )}\r\n : \r\n <NumberField\r\n record={data[id]}\r\n source=\"total\"\r\n options={{ style: 'currency', currency: 'USD' }}\r\n />\r\n </span>\r\n <span className={classes.cardContentRow}>\r\n {translate('resources.commands.fields.status')}\r\n : \r\n <TextField source=\"status\" record={data[id]} />\r\n </span>\r\n <span className={classes.cardContentRow}>\r\n {translate('resources.commands.fields.returned')}\r\n : \r\n <BooleanField record={data[id]} source=\"returned\" />\r\n </span>\r\n </CardContent>\r\n </Card>\r\n ))}\r\n </div>\r\n );\r\n};\r\n\r\nMobileGrid.defaultProps = {\r\n data: {},\r\n ids: [],\r\n};\r\n\r\nexport default MobileGrid;\r\n","import { DatagridProps, useListContext, useGetList, FilterProps, Filter, SelectInput, DateInput,Identifier, ListContextProvider, Datagrid, DateField, TextField, ReferenceField, NumberField, BooleanField,List,ListProps } from \"react-admin\";\r\nimport { FC, Fragment, useCallback, useEffect, useState } from 'react';\r\nimport { makeStyles } from '@material-ui/core/styles';\r\nimport { useMediaQuery, Divider, Tabs, Tab, Theme } from '@material-ui/core';\r\nimport MobileGrid from './MobileGrid';\r\nimport NbItemsField from './NbItemsField';\r\n\r\nconst OrderFilter: FC<Omit<FilterProps,'children'>> = props => ( \r\n <Filter {...props}>\r\n \r\n <SelectInput label=\"Način prodaje\" source=\"acWayOfSale\" choices={[\r\n { id: 'K', name: 'Kupec' },\r\n { id: 'Z', name: 'Zavezanec' }]}/>\r\n \r\n <DateInput label=\"Datum od\" source=\"adDateFrom\" />\r\n <DateInput label=\"Datum do\" source=\"adDateTo\" />\r\n </Filter>\r\n);\r\n\r\n\r\n\r\nconst useDatagridStyles = makeStyles({\r\n total: { fontWeight: 'bold' },\r\n});\r\n\r\nconst tabs = [\r\n { id: 'N', name: 'naroceno' },\r\n { id: 'P', name: 'potrjeno' }\r\n];\r\n\r\n\r\ninterface TabbedDatagridProps extends DatagridProps {}\r\n\r\n\r\nconst useGetTotals = (filterValues: any) => {\r\n const { total: totalOrdered } = useGetList(\r\n 'Order/GetOrders',\r\n { perPage: 1, page: 1 },\r\n { ...filterValues, acStatus: 'N' }\r\n );\r\n const { total: totalDelivered } = useGetList(\r\n 'Order/GetOrders',\r\n { perPage: 1, page: 1 },\r\n { ...filterValues, acStatus: 'P' }\r\n );\r\n\r\n\r\n return {\r\n ordered: totalOrdered,\r\n delivered: totalDelivered\r\n };\r\n};\r\n\r\nconst TabbedDatagrid: FC<TabbedDatagridProps> = props => {\r\n const listContext = useListContext();\r\n const { ids, filterValues, setFilters, displayedFilters } = listContext;\r\n const classes = useDatagridStyles();\r\n const isXSmall = useMediaQuery<Theme>(theme =>\r\n theme.breakpoints.down('xs')\r\n );\r\n const [ordered, setOrdered] = useState<Identifier[]>([] as Identifier[]);\r\n const [delivered, setDelivered] = useState<Identifier[]>(\r\n [] as Identifier[]\r\n );\r\n const totals = useGetTotals(filterValues) as any;\r\n\r\n useEffect(() => {\r\n if (ids && ids !== filterValues.acStatus) {\r\n switch (filterValues.acStatus) {\r\n case 'N':\r\n setOrdered(ids);\r\n break;\r\n case 'P':\r\n setDelivered(ids);\r\n break;\r\n }\r\n }\r\n }, [ids, filterValues.acStatus]);\r\n\r\n const handleChange = useCallback(\r\n (event: React.ChangeEvent<{}>, value: any) => {\r\n setFilters &&\r\n setFilters(\r\n { ...filterValues, acStatus: value },\r\n displayedFilters\r\n );\r\n },\r\n [displayedFilters, filterValues, setFilters]\r\n );\r\n\r\n const selectedIds =\r\n filterValues.acStatus === 'N'\r\n ? ordered\r\n : filterValues.acStatus === 'P'\r\n ? delivered : delivered;\r\n\r\n return (\r\n <Fragment>\r\n <Tabs\r\n variant=\"fullWidth\"\r\n centered\r\n value={filterValues.acStatus}\r\n indicatorColor=\"primary\"\r\n onChange={handleChange}\r\n >\r\n {tabs.map(choice => (\r\n <Tab\r\n key={choice.id}\r\n label={\r\n totals[choice.name]\r\n ? `${choice.name} (${totals[choice.name]})`\r\n : choice.name\r\n }\r\n value={choice.id}\r\n />\r\n ))}\r\n </Tabs>\r\n <Divider />\r\n {isXSmall ? (\r\n <ListContextProvider\r\n value={{ ...listContext, ids: selectedIds }}\r\n >\r\n <MobileGrid {...props} ids={selectedIds} />\r\n </ListContextProvider>\r\n ) : (\r\n <div>\r\n {filterValues.acStatus === 'N' && (\r\n <ListContextProvider\r\n value={{ ...listContext, ids: ordered }}\r\n >\r\n <Datagrid {...props} optimized rowClick=\"edit\">\r\n <TextField source=\"id\" label={\"Naročilo\"}></TextField>\r\n <DateField source=\"adDateValid\" label={\"Datum veljavnosti\"}/>\r\n <TextField source=\"acBuyerName\" label=\"Kupec\"/>\r\n \r\n <NumberField\r\n source=\"anForPay\"\r\n label={\"Za plačilo\"}\r\n options={{\r\n style: 'currency',\r\n currency: 'EUR',\r\n }}\r\n className={classes.total}\r\n />\r\n </Datagrid>\r\n </ListContextProvider>\r\n )}\r\n {filterValues.acStatus === 'P' && (\r\n <ListContextProvider\r\n value={{ ...listContext, ids: delivered }}\r\n >\r\n <Datagrid {...props} rowClick=\"edit\">\r\n <DateField source=\"adDateValid\" showTime />\r\n <TextField source=\"acBuyerName\" />\r\n\r\n <TextField source=\"id\"></TextField>\r\n \r\n <NumberField\r\n source=\"anForPay\"\r\n options={{\r\n style: 'currency',\r\n currency: 'EUR',\r\n }}\r\n className={classes.total}\r\n />\r\n </Datagrid>\r\n </ListContextProvider>\r\n )}\r\n </div>\r\n )}\r\n </Fragment>\r\n );\r\n};\r\nconst OrderList: FC<ListProps> = props => (\r\n <List\r\n {...props}\r\n filterDefaultValues={{ acStatus: 'N' }}\r\n bulkActionButtons={false}\r\n sort={{ field: 'adDate', order: 'DESC' }}\r\n perPage={25}\r\n filters={<OrderFilter />}\r\n >\r\n <TabbedDatagrid />\r\n </List>\r\n);\r\n\r\nexport default OrderList;\r\n","import * as React from 'react';\r\nimport { FC } from 'react';\r\nimport {\r\n Table,\r\n TableBody,\r\n TableCell,\r\n TableHead,\r\n TableRow,\r\n} from '@material-ui/core';\r\nimport { makeStyles } from '@material-ui/core/styles';\r\nimport { Link, FieldProps, useTranslate, useQueryWithStore, useQuery } from 'react-admin';\r\n\r\nimport { AppState, Order,OrderItems, Item, OrderItem } from '../types';\r\n\r\nconst useStyles = makeStyles({\r\n rightAlignedCell: { textAlign: 'right' },\r\n leftAlignedCell:{textAlign:'left'}\r\n});\r\n\r\nconst Items: FC<FieldProps<OrderItem>> = ({ record }) => {\r\n const classes = useStyles();\r\n const translate = useTranslate();\r\n\r\n const { loaded, data: items } = useQueryWithStore<AppState>(\r\n {\r\n type: 'getOne',\r\n resource: 'Order/GetOrders',\r\n payload: {\r\n id: record?.id,\r\n },\r\n }\r\n );\r\n if (!loaded || !record) return null;\r\n\r\n return (\r\n <Table>\r\n <TableHead>\r\n <TableRow>\r\n <TableCell>\r\n Ident\r\n </TableCell>\r\n <TableCell className={classes.rightAlignedCell}> \r\n Cena\r\n \r\n </TableCell>\r\n <TableCell className={classes.rightAlignedCell}>\r\n Količina\r\n </TableCell>\r\n <TableCell className={classes.rightAlignedCell}>\r\n Skupaj\r\n </TableCell>\r\n </TableRow>\r\n </TableHead>\r\n //we need sifrant items da nas tja preusmeri\r\n <TableBody>\r\n {record.items.map(\r\n (item: Item) =>\r\n item.acIdent && (\r\n <TableRow key={item.acIdent}>\r\n \r\n <TableCell className={classes.leftAlignedCell}>\r\n <Link to={`Order/GetOrders/${item.acKey}`}>\r\n \r\n {item.acName}\r\n </Link>\r\n </TableCell>\r\n <TableCell className={classes.rightAlignedCell}>\r\n {item.anPrice.toLocaleString(undefined, {\r\n style: 'currency',\r\n currency: 'EUR',\r\n })}\r\n </TableCell>\r\n <TableCell className={classes.rightAlignedCell}>\r\n {item.anQty}\r\n </TableCell>\r\n <TableCell className={classes.rightAlignedCell}>\r\n {(\r\n item.anForPay\r\n ).toLocaleString(undefined, {\r\n style: 'currency',\r\n currency: 'EUR',\r\n })}\r\n </TableCell>\r\n </TableRow>\r\n )\r\n )}\r\n </TableBody>\r\n </Table>\r\n );\r\n};\r\n\r\nexport default Items;\r\n","import * as React from 'react';\r\nimport { FC } from 'react';\r\nimport { Table, TableBody, TableCell, TableRow } from '@material-ui/core';\r\nimport { makeStyles } from '@material-ui/core/styles';\r\nimport { FieldProps, useTranslate } from 'react-admin';\r\nimport classnames from 'classnames';\r\nimport { Order } from '../types';\r\n\r\nconst useStyles = makeStyles({\r\n container: { minWidth: '35em' },\r\n rightAlignedCell: { textAlign: 'right' },\r\n boldCell: { fontWeight: 'bold' },\r\n});\r\n\r\nconst Totals: FC<FieldProps<Order>> = ({ record }: { record?: Order }) => {\r\n const classes = useStyles();\r\n const translate = useTranslate();\r\n\r\n return (\r\n <Table className={classes.container}>\r\n <TableBody>\r\n <TableRow>\r\n <TableCell>\r\n Znesek brez DDV\r\n </TableCell>\r\n <TableCell className={classes.rightAlignedCell}>\r\n {record?.anValue.toLocaleString(undefined, {\r\n style: 'currency',\r\n currency: 'EUR',\r\n })}\r\n </TableCell>\r\n </TableRow>\r\n <TableRow>\r\n <TableCell>\r\n Davek\r\n </TableCell>\r\n <TableCell className={classes.rightAlignedCell}>\r\n {record?.anVAT.toLocaleString(undefined, {\r\n style: 'currency',\r\n currency: 'EUR',\r\n })}\r\n </TableCell>\r\n </TableRow>\r\n <TableRow>\r\n <TableCell>\r\n Popust (\r\n {record?.anDiscount.toLocaleString(undefined, {\r\n style: 'percent',\r\n })}\r\n )\r\n </TableCell>\r\n <TableCell className={classes.rightAlignedCell}>\r\n {record?.anDiscount.toLocaleString(undefined, {\r\n style: 'currency',\r\n currency: 'EUR',\r\n })}\r\n </TableCell>\r\n </TableRow>\r\n <TableRow>\r\n <TableCell className={classes.boldCell}>\r\n Znesek\r\n </TableCell>\r\n <TableCell\r\n className={classnames(\r\n classes.boldCell,\r\n classes.rightAlignedCell\r\n )}\r\n >\r\n {record?.anForPay.toLocaleString(undefined, {\r\n style: 'currency',\r\n currency: 'EUR',\r\n })}\r\n </TableCell>\r\n </TableRow>\r\n </TableBody>\r\n </Table>\r\n );\r\n};\r\n\r\nexport default Totals;\r\n","import * as React from 'react';\r\nimport { FC } from 'react';\r\nimport {\r\n BooleanInput,\r\n DateField,\r\n Edit,\r\n EditProps,\r\n FormWithRedirect,\r\n Labeled,\r\n ReferenceField,\r\n SelectInput,\r\n TextField,\r\n Toolbar,\r\n useTranslate,\r\n SaveButton,\r\n Record,\r\n ToolbarProps\r\n} from 'react-admin';\r\nimport { Link as RouterLink } from 'react-router-dom';\r\nimport {\r\n Card,\r\n CardContent,\r\n Box,\r\n Grid,\r\n Typography,\r\n Link,\r\n WithWidthProps,\r\n} from '@material-ui/core';\r\nimport { makeStyles } from '@material-ui/core/styles';\r\n\r\nimport { Order, Item } from '../types';\r\nimport Items from './Items';\r\nimport Totals from './Totals';\r\n\r\n\r\n\r\ninterface OrderTitleProps {\r\n record?: Order;\r\n}\r\n\r\nconst OrderTitle: FC<OrderTitleProps> = ({ record }) => {\r\n const translate = useTranslate();\r\n return record ? (\r\n <span>\r\n Naročilo: { record?.acKeyView} \r\n \r\n </span>\r\n ) : null;\r\n};\r\n\r\nconst CustomerAddress = ({ record }: { record?: Order }) => (\r\n \r\n <Box>\r\n <Typography>\r\n {record?.acBuyerName} \r\n </Typography>\r\n <Typography>{record?.acBuyerAddress}</Typography>\r\n <Typography>\r\n {record?.acBuyerAddressPostName}, {record?.acBuyerAddressPost} \r\n </Typography>\r\n <Typography>\r\n {record?.acBuyerAddressCountry}\r\n </Typography>\r\n </Box>\r\n \r\n);\r\n\r\nconst useEditStyles = makeStyles({\r\n root: { alignItems: 'flex-start' },\r\n padding_top: {marginTop:2}\r\n});\r\n\r\nconst Spacer = () => <Box m={1}> </Box>;\r\n\r\n\r\nconst CustomToolbar = (props:any) => (\r\n <Toolbar {...props}>\r\n \r\n </Toolbar>\r\n);\r\n\r\nconst OrderForm = (props: any) => {\r\n const translate = useTranslate();\r\n const classess = useEditStyles();\r\n return (\r\n <FormWithRedirect\r\n {...props}\r\n render={(formProps: any) => (\r\n <Box maxWidth=\"60em\">\r\n <Card>\r\n <CardContent>\r\n <Grid container spacing={3}>\r\n <Grid item xs={12} sm={12} md={8}>\r\n <Typography variant=\"h6\" gutterBottom>\r\n Naročilo\r\n </Typography>\r\n <Grid container>\r\n <Grid item xs={12} sm={12} md={6}>\r\n <Labeled\r\n source=\"datum\"\r\n resource=\"commands\"\r\n >\r\n <DateField\r\n source=\"adDate\"\r\n resource={`Order/GetOrders/${formProps.record.acKey}`}\r\n record={formProps.record}\r\n />\r\n </Labeled>\r\n </Grid>\r\n <Grid container>\r\n <Grid item xs={12} sm={12} md={6}>\r\n <Labeled\r\n source=\"Vezni dokument\"\r\n resource=\"commands\"\r\n >\r\n <TextField\r\n source=\"acKeyView\"\r\n resource={`Order/GetOrders/${formProps.record.acKey}`}\r\n record={formProps.record}\r\n />\r\n </Labeled>\r\n </Grid>\r\n </Grid>\r\n </Grid>\r\n\r\n \r\n \r\n {/* <Grid item xs={12} sm={12} md={6} >\r\n <SelectInput \r\n resource=\"Order/GetOrders\"\r\n source=\"acStatus\"\r\n choices={[\r\n {\r\n id: 'P',\r\n name: 'Delivered',\r\n },\r\n {\r\n id: 'N',\r\n name: 'Ordered',\r\n }\r\n \r\n ]}\r\n />\r\n </Grid> */}\r\n \r\n \r\n </Grid>\r\n <Grid item xs={12} sm={12} md={4}>\r\n <Typography variant=\"h6\" gutterBottom>\r\n Prejemnik\r\n </Typography>\r\n <Box>\r\n <Typography>\r\n {formProps.record?.acBuyerName} \r\n </Typography>\r\n \r\n <Typography>\r\n {formProps.record?.acBuyerAddress}\r\n </Typography>\r\n <Typography>\r\n {formProps.record?.acBuyerAddressPost} {formProps.record?.acBuyerAddressCountry}\r\n </Typography>\r\n </Box>\r\n <Spacer />\r\n \r\n <Typography variant=\"h6\" gutterBottom>\r\n Shipping address\r\n </Typography>\r\n <Box>\r\n <Typography>\r\n {formProps.record?.acReceiverName} \r\n </Typography>\r\n \r\n <Typography>\r\n {formProps.record?.acReceiverAddress}\r\n </Typography>\r\n <Typography>\r\n {formProps.record?.acReceiverAddressPost} {formProps.record?.acReceiverAddressCountry}\r\n </Typography>\r\n </Box>\r\n\r\n \r\n </Grid>\r\n </Grid>\r\n <Spacer />\r\n\r\n <Typography variant=\"h6\" gutterBottom>\r\n Pozicije\r\n </Typography>\r\n <Box>\r\n <Items record={formProps.record} />\r\n </Box>\r\n <Spacer />\r\n\r\n <Typography variant=\"h6\" gutterBottom>\r\n Povzetek:\r\n </Typography>\r\n <Box>\r\n <Totals record={formProps.record} />\r\n </Box>\r\n </CardContent>\r\n \r\n </Card>\r\n </Box>\r\n )}\r\n />\r\n );\r\n};\r\nconst OrderEdit: FC<EditProps> = props => {\r\n const classes = useEditStyles();\r\n return (\r\n <Edit\r\n title = {<OrderTitle/>}\r\n classes={classes}\r\n {...props}\r\n component=\"div\"\r\n >\r\n <OrderForm toolbar={<CustomToolbar/>}></OrderForm>\r\n </Edit>\r\n );\r\n};\r\n\r\nexport default OrderEdit;","import OrderIcon from '@material-ui/icons/Euro';\n\nimport OrderList from './OrderList';\nimport OrderEdit from './OrderEdit';\n\nexport default {\n list: OrderList,\n edit: OrderEdit,\n icon: OrderIcon,\n};\n","import { DatagridProps, useListContext, useGetList, FilterProps, Filter, SelectInput, DateInput,Identifier, \r\n ListContextProvider, Datagrid, DateField, TextField, ReferenceField, NumberField, BooleanField,List,ListProps } from \"react-admin\";\r\nimport { FC, Fragment, useCallback, useEffect, useState } from 'react';\r\nimport { makeStyles } from '@material-ui/core/styles';\r\nimport { useMediaQuery, Divider, Tabs, Tab, Theme } from '@material-ui/core';\r\n\r\nconst OrderFilter: FC<Omit<FilterProps,'children'>> = props => ( \r\n <Filter {...props}>\r\n \r\n <SelectInput label=\"Način prodaje\" source=\"acWayOfSale\" choices={[\r\n { id: 'K', name: 'Kupec' },\r\n { id: 'Z', name: 'Zavezanec' }]}/>\r\n \r\n <DateInput label=\"Datum od\" source=\"adDateFrom\" />\r\n <DateInput label=\"Datum do\" source=\"adDateTo\" />\r\n </Filter>\r\n);\r\n\r\n\r\n\r\nconst useDatagridStyles = makeStyles({\r\n total: { fontWeight: 'bold' },\r\n});\r\n\r\nconst tabs = [\r\n { id: 'N', name: 'Ne Potrjeno' },\r\n { id: 'P', name: 'Potrjeno' }\r\n];\r\n\r\n\r\ninterface TabbedDatagridProps extends DatagridProps {}\r\n\r\n\r\nconst useGetTotals = (filterValues: any) => {\r\n const { total: totalOrdered } = useGetList(\r\n 'Move/GetMove',\r\n { perPage: 1, page: 1 },\r\n { ...filterValues, acStatus: 'P' }\r\n );\r\n const { total: totalDelivered } = useGetList(\r\n 'Move/GetMove',\r\n { perPage: 1, page: 1 },\r\n { ...filterValues, acStatus: 'N' }\r\n );\r\n\r\n\r\n return {\r\n ordered: totalOrdered,\r\n delivered: totalDelivered\r\n };\r\n};\r\n\r\nconst TabbedDatagrid: FC<TabbedDatagridProps> = props => {\r\n const listContext = useListContext();\r\n const { ids, filterValues, setFilters, displayedFilters } = listContext;\r\n const classes = useDatagridStyles();\r\n const isXSmall = useMediaQuery<Theme>(theme =>\r\n theme.breakpoints.down('xs')\r\n );\r\n const [ordered, setOrdered] = useState<Identifier[]>([] as Identifier[]);\r\n const [delivered, setDelivered] = useState<Identifier[]>(\r\n [] as Identifier[]\r\n );\r\n const totals = useGetTotals(filterValues) as any;\r\n\r\n useEffect(() => {\r\n if (ids && ids !== filterValues.acStatus) {\r\n switch (filterValues.acStatus) {\r\n case 'N':\r\n setOrdered(ids);\r\n break;\r\n case 'P':\r\n setDelivered(ids);\r\n break;\r\n }\r\n }\r\n }, [ids, filterValues.acStatus]);\r\n\r\n const handleChange = useCallback(\r\n (event: React.ChangeEvent<{}>, value: any) => {\r\n setFilters &&\r\n setFilters(\r\n { ...filterValues, acStatus: value },\r\n displayedFilters\r\n );\r\n },\r\n [displayedFilters, filterValues, setFilters]\r\n );\r\n\r\n const selectedIds =\r\n filterValues.acStatus === 'N'\r\n ? ordered\r\n : filterValues.acStatus === 'P'\r\n ? delivered : delivered;\r\n\r\n return (\r\n <Fragment>\r\n <Tabs\r\n variant=\"fullWidth\"\r\n centered\r\n value={filterValues.acStatus}\r\n indicatorColor=\"primary\"\r\n onChange={handleChange}\r\n >\r\n {tabs.map(choice => (\r\n <Tab\r\n key={choice.id}\r\n label={\r\n totals[choice.name]\r\n ? `${choice.name} (${totals[choice.name]})`\r\n : choice.name\r\n }\r\n value={choice.id}\r\n />\r\n ))}\r\n </Tabs>\r\n <Divider />\r\n {isXSmall ? (\r\n <ListContextProvider\r\n value={{ ...listContext, ids: selectedIds }}\r\n >\r\n \r\n </ListContextProvider>\r\n ) : (\r\n <div>\r\n {filterValues.acStatus === 'N' && (\r\n <ListContextProvider\r\n value={{ ...listContext, ids: ordered }}\r\n >\r\n <Datagrid {...props} optimized rowClick=\"edit\">\r\n <TextField source=\"id\" label=\"identifikator\"></TextField>\r\n <DateField source=\"adDate\" label=\"Datum izdaje\"/>\r\n <TextField source=\"acBuyerName\" label={\"Kupec\"}/>\r\n \r\n \r\n \r\n <NumberField\r\n source=\"anForPay\"\r\n label=\"Za plačilo\"\r\n options={{\r\n style: 'currency',\r\n currency: 'EUR',\r\n }}\r\n className={classes.total}\r\n />\r\n </Datagrid>\r\n </ListContextProvider>\r\n )}\r\n {filterValues.acStatus === 'P' && (\r\n <ListContextProvider\r\n value={{ ...listContext, ids: delivered }}\r\n >\r\n <Datagrid {...props} rowClick=\"edit\">\r\n <DateField source=\"adDate\" showTime />\r\n <TextField source=\"acBuyerName\" />\r\n\r\n <TextField source=\"id\"></TextField>\r\n \r\n <NumberField\r\n source=\"anForPay\"\r\n options={{\r\n style: 'currency',\r\n currency: 'EUR',\r\n }}\r\n className={classes.total}\r\n />\r\n </Datagrid>\r\n </ListContextProvider>\r\n )}\r\n </div>\r\n )}\r\n </Fragment>\r\n );\r\n};\r\nconst MoveList: FC<ListProps> = props => (\r\n <List\r\n {...props}\r\n filterDefaultValues={{ acStatus: 'N' }}\r\n bulkActionButtons={false}\r\n sort={{ field: 'adDate', order: 'DESC' }}\r\n perPage={25}\r\n filters={<OrderFilter />}\r\n >\r\n <TabbedDatagrid />\r\n </List>\r\n);\r\n\r\nexport default MoveList;\r\n","import * as React from 'react';\r\nimport { FC } from 'react';\r\nimport {\r\n Table,\r\n TableBody,\r\n TableCell,\r\n TableHead,\r\n TableRow,\r\n} from '@material-ui/core';\r\nimport { makeStyles } from '@material-ui/core/styles';\r\nimport { Link, FieldProps, useTranslate, useQueryWithStore, useQuery } from 'react-admin';\r\n\r\nimport { AppState, Move,MoveItems, Item, MoveItem } from '../types';\r\n\r\nconst useStyles = makeStyles({\r\n rightAlignedCell: { textAlign: 'right' },\r\n leftAlignedCell:{textAlign:'left'}\r\n});\r\n\r\nconst Items: FC<FieldProps<MoveItem>> = ({ record }) => {\r\n const classes = useStyles();\r\n const translate = useTranslate();\r\n\r\n const { loaded, data: items } = useQueryWithStore<AppState>(\r\n {\r\n type: 'getOne',\r\n resource: 'Move/GetMove',\r\n payload: {\r\n id: record?.id,\r\n },\r\n }\r\n );\r\n if (!loaded || !record) return null;\r\n\r\n return (\r\n <Table>\r\n <TableHead>\r\n <TableRow>\r\n <TableCell>\r\n Ident\r\n </TableCell>\r\n <TableCell className={classes.rightAlignedCell}> \r\n Cena\r\n \r\n </TableCell>\r\n <TableCell className={classes.rightAlignedCell}>\r\n Količina\r\n </TableCell>\r\n <TableCell className={classes.rightAlignedCell}>\r\n Skupaj\r\n </TableCell>\r\n </TableRow>\r\n </TableHead>\r\n //we need sifrant items da nas tja preusmeri\r\n <TableBody>\r\n {record.items.map(\r\n (item: Item) =>\r\n item.acIdent && (\r\n <TableRow key={item.acIdent}>\r\n \r\n <TableCell className={classes.leftAlignedCell}>\r\n <Link to={`Order/GetOrders/${item.acKey}`}>\r\n \r\n {item.acName}\r\n </Link>\r\n </TableCell>\r\n <TableCell className={classes.rightAlignedCell}>\r\n {item.anPrice.toLocaleString(undefined, {\r\n style: 'currency',\r\n currency: 'EUR',\r\n })}\r\n </TableCell>\r\n <TableCell className={classes.rightAlignedCell}>\r\n {item.anQty}\r\n </TableCell>\r\n <TableCell className={classes.rightAlignedCell}>\r\n {(\r\n item.anForPay\r\n ).toLocaleString(undefined, {\r\n style: 'currency',\r\n currency: 'EUR',\r\n })}\r\n </TableCell>\r\n </TableRow>\r\n )\r\n )}\r\n </TableBody>\r\n </Table>\r\n );\r\n};\r\n\r\nexport default Items;\r\n","import * as React from 'react';\r\nimport { FC } from 'react';\r\nimport { Table, TableBody, TableCell, TableRow } from '@material-ui/core';\r\nimport { makeStyles } from '@material-ui/core/styles';\r\nimport { FieldProps, useTranslate } from 'react-admin';\r\nimport classnames from 'classnames';\r\nimport { Move } from '../types';\r\n\r\nconst useStyles = makeStyles({\r\n container: { minWidth: '35em' },\r\n rightAlignedCell: { textAlign: 'right' },\r\n boldCell: { fontWeight: 'bold' },\r\n});\r\n\r\nconst Totals: FC<FieldProps<Move>> = ({ record }: { record?: Move }) => {\r\n const classes = useStyles();\r\n const translate = useTranslate();\r\n\r\n return (\r\n <Table className={classes.container}>\r\n <TableBody>\r\n <TableRow>\r\n <TableCell>\r\n Znesek brez DDV\r\n </TableCell>\r\n <TableCell className={classes.rightAlignedCell}>\r\n {record?.anValue.toLocaleString(undefined, {\r\n style: 'currency',\r\n currency: 'EUR',\r\n })}\r\n </TableCell>\r\n </TableRow>\r\n <TableRow>\r\n <TableCell>\r\n Davek\r\n </TableCell>\r\n <TableCell className={classes.rightAlignedCell}>\r\n {record?.anVAT.toLocaleString(undefined, {\r\n style: 'currency',\r\n currency: 'EUR',\r\n })}\r\n </TableCell>\r\n </TableRow>\r\n <TableRow>\r\n <TableCell>\r\n Popust (\r\n {record?.anDiscount.toLocaleString(undefined, {\r\n style: 'percent',\r\n })}\r\n )\r\n </TableCell>\r\n <TableCell className={classes.rightAlignedCell}>\r\n {record?.anDiscount.toLocaleString(undefined, {\r\n style: 'currency',\r\n currency: 'EUR',\r\n })}\r\n </TableCell>\r\n </TableRow>\r\n <TableRow>\r\n <TableCell className={classes.boldCell}>\r\n Znesek\r\n </TableCell>\r\n <TableCell\r\n className={classnames(\r\n classes.boldCell,\r\n classes.rightAlignedCell\r\n )}\r\n >\r\n {record?.anForPay.toLocaleString(undefined, {\r\n style: 'currency',\r\n currency: 'EUR',\r\n })}\r\n </TableCell>\r\n </TableRow>\r\n </TableBody>\r\n </Table>\r\n );\r\n};\r\n\r\nexport default Totals;\r\n","import * as React from 'react';\r\n\r\nimport { FC } from 'react';\r\nimport {\r\n BooleanInput,\r\n DateField,\r\n Edit,\r\n EditProps,\r\n FormWithRedirect,\r\n Labeled,\r\n ReferenceField,\r\n SelectInput,\r\n TextField,\r\n Toolbar,\r\n useTranslate,\r\n SaveButton,\r\n Record,\r\n ToolbarProps,\r\n RecordContext\r\n} from 'react-admin';\r\nimport { Link as RouterLink } from 'react-router-dom';\r\nimport {\r\n Card,\r\n CardContent,\r\n Box,\r\n Grid,\r\n Typography,\r\n Link,\r\n WithWidthProps,\r\n} from '@material-ui/core';\r\n\r\nimport { Viewer } from '@react-pdf-viewer/core';\r\n\r\n\r\nimport { makeStyles } from '@material-ui/core/styles';\r\nimport {Row } from 'react-bootstrap';\r\nimport { Move, Item } from '../types';\r\nimport Items from './MoveItems';\r\nimport MoveTotal from './MoveTotal';\r\n\r\nconst base64toBlob = (data: string) => {\r\n // Cut the prefix `data:application/pdf;base64` from the raw base 64\r\n if (data != null)\r\n {\r\n //const base64WithoutPrefix = data.substr('data:application/pdf;base64,'.length);\r\n\r\n const bytes = atob(data);\r\n let length = bytes.length;\r\n let out = new Uint8Array(length);\r\n\r\n while (length--) {\r\n out[length] = bytes.charCodeAt(length);\r\n }\r\n console.log(\"pdf\");\r\n return new Blob([out], { type: 'application/pdf' });\r\n \r\n }\r\n return new Blob([], { type: 'application/pdf' });\r\n\r\n};\r\n\r\ninterface MoveTitleProps {\r\n record?: Move;\r\n}\r\n\r\nconst OrderTitle: FC<MoveTitleProps> = ({ record }) => {\r\n const translate = useTranslate();\r\n \r\n return record ? (\r\n <span>\r\n Račun: { record?.acKeyView} \r\n \r\n </span>\r\n ) : null;\r\n};\r\n\r\nconst CustomerAddress = ({ record }: { record?: Move }) => (\r\n \r\n <Box>\r\n <Typography>\r\n {record?.acBuyerName} \r\n </Typography>\r\n <Typography>{record?.acBuyerAddress}</Typography>\r\n <Typography>\r\n {record?.acBuyerAddressPostName}, {record?.acBuyerAddressPost} \r\n </Typography>\r\n <Typography>\r\n {record?.acBuyerAddressCountry}\r\n </Typography>\r\n </Box>\r\n \r\n);\r\n\r\nconst useEditStyles = makeStyles({\r\n root: { alignItems: 'flex-end'},\r\n padding_top: {marginTop:2}\r\n});\r\n\r\nconst Spacer = () => <Box m={1}> </Box>;\r\n\r\n\r\nconst CustomToolbar = (props:any) => (\r\n <Toolbar {...props}>\r\n \r\n </Toolbar>\r\n);\r\n\r\nconst PDF = (props: any) => {\r\n const blob = base64toBlob(props.record.docId);\r\n const url = URL.createObjectURL(blob);\r\n\r\n return (\r\n <object style={{height: '90vh', width:'65vh', marginLeft:'1px',border: '1px solid black', borderRadius: '10px', margin:'2px'}} data={ url } type=\"application/pdf\" width='60%' height='100%'>\r\n </object>\r\n )\r\n};\r\n\r\n\r\n\r\nconst OrderForm = (props: any) => {\r\n const translate = useTranslate(); \r\n const classess = useEditStyles();\r\n return (\r\n <FormWithRedirect\r\n {...props} \r\n render={(formProps: any) => ( \r\n <React.Fragment> \r\n <Box maxWidth=\"60em\" >\r\n <Card>\r\n <CardContent>\r\n <Grid container spacing={3}>\r\n <Grid item xs={12} sm={12} md={8}>\r\n <Typography variant=\"h6\" gutterBottom>\r\n Račun\r\n \r\n </Typography>\r\n <Grid container>\r\n <Grid item xs={12} sm={12} md={6}>\r\n <Labeled\r\n source=\"datum\"\r\n resource=\"commands\"\r\n >\r\n <DateField\r\n source=\"adDate\"\r\n resource={`Move/GetMove/${formProps.record.acKey}`}\r\n record={formProps.record}\r\n />\r\n </Labeled>\r\n </Grid>\r\n <Grid container>\r\n <Grid item xs={12} sm={12} md={6}>\r\n <Labeled\r\n source=\"Vezni dokument\"\r\n resource=\"commands\"\r\n >\r\n <TextField\r\n source=\"acKeyView\"\r\n resource={`Order/GetOrders/${formProps.record.acKey}`}\r\n record={formProps.record}\r\n />\r\n </Labeled>\r\n </Grid>\r\n </Grid>\r\n </Grid>\r\n\r\n \r\n \r\n {/* <Grid item xs={12} sm={12} md={6} >\r\n <SelectInput \r\n resource=\"Order/GetOrders\"\r\n source=\"acStatus\"\r\n choices={[\r\n {\r\n id: 'P',\r\n name: 'Delivered',\r\n },\r\n {\r\n id: 'N',\r\n name: 'Ordered',\r\n }\r\n \r\n ]}\r\n />\r\n </Grid> */}\r\n \r\n \r\n </Grid>\r\n <Box></Box>\r\n <Grid item xs={12} sm={12} md={4} className={classess.padding_top}>\r\n <Typography variant=\"h6\" gutterBottom>\r\n Kupec\r\n </Typography>\r\n <Box>\r\n <Typography>\r\n {formProps.record?.acBuyerName} \r\n </Typography>\r\n \r\n <Typography>\r\n {formProps.record?.acBuyerAddress}\r\n </Typography>\r\n <Typography>\r\n {formProps.record?.acBuyerAddressPost} {formProps.record?.acBuyerAddressCountry}\r\n </Typography>\r\n </Box>\r\n <Spacer />\r\n \r\n {/*} <Typography variant=\"h6\" gutterBottom>\r\n Naslov prejemnika\r\n </Typography>\r\n <Box>\r\n <Typography>\r\n {formProps.record?.acReceiverName} \r\n </Typography>\r\n \r\n <Typography>\r\n {formProps.record?.acReceiverAddress}\r\n </Typography>\r\n <Typography>\r\n {formProps.record?.acReceiverAddressPost} {formProps.record?.acReceiverAddressCountry}\r\n </Typography>\r\n </Box>\r\n */}\r\n \r\n </Grid>\r\n </Grid>\r\n <Spacer />\r\n\r\n <Typography variant=\"h6\" gutterBottom>\r\n Pozicije\r\n </Typography>\r\n <Box>\r\n <Items record={formProps.record} />\r\n </Box>\r\n <Spacer />\r\n\r\n <Typography variant=\"h6\" gutterBottom>\r\n Povzetek:\r\n </Typography>\r\n <Box>\r\n <MoveTotal record={formProps.record} />\r\n </Box>\r\n </CardContent> \r\n </Card>\r\n\r\n </Box>\r\n\r\n \r\n</React.Fragment>\r\n \r\n \r\n )}\r\n /> \r\n );\r\n};\r\nconst MoveEdit: FC<EditProps> = props => {\r\n const classes = useEditStyles();\r\n \r\n return (\r\n <Edit\r\n title = {<OrderTitle/>}\r\n classes={classes}\r\n {...props}\r\n component=\"div\"\r\n aside={<PDF record = {props} />}\r\n \r\n >\r\n <OrderForm toolbar={<CustomToolbar/>}></OrderForm>\r\n </Edit>\r\n \r\n \r\n );\r\n};\r\n\r\nexport default MoveEdit;","import OrderIcon from '@material-ui/icons/Euro';\r\n\r\nimport MoveList from './MoveList'\r\nimport MoveEdit from './MoveEdit';\r\n\r\nexport default {\r\n list: MoveList,\r\n edit: MoveEdit,\r\n icon: OrderIcon,\r\n};\r\n","import * as React from 'react';\r\nimport { FC} from 'react';\r\nimport { EditButton} from 'react-admin';\r\nimport {\r\n Table,\r\n TableBody,\r\n TableCell,\r\n TableHead,\r\n TableRow,\r\n} from '@material-ui/core';\r\nimport { makeStyles } from '@material-ui/core/styles';\r\nimport { Link, FieldProps, useTranslate, useQueryWithStore, useQuery, LinearProgress } from 'react-admin';\r\nimport AccountBalanceIcon from '@mui/icons-material/AccountBalance';\r\nimport { AppState, Move,MoveItems, Item, MoveItem, InvItem, Invoice, InvoiceItems, InvoiceItem } from '../types';\r\nimport Button from '@material-ui/core/Button';\r\nimport IconButton from '@mui/material/IconButton';\r\nimport FindInPageOutlinedIcon from '@mui/icons-material/FindInPageOutlined';\r\n\r\n\r\n\r\nimport DeleteIcon from '@mui/icons-material/Delete';\r\n\r\nconst useStyles = makeStyles({\r\n rightAlignedCell: { textAlign: 'right', maxWidth:'120px' },\r\n leftAlignedCell:{textAlign:'left', color:'#FF5F1F', maxWidth:'200px', maxHeight:'50px'},\r\n width:{width:'100%', height:'8px'},\r\n lines:{margin:10,paddingTop:100,paddingBottom:0,paddingBlockEnd:0},\r\n hover: {backgroundColor:'#cdcdcd'}\r\n});\r\nconst base64toBlob = (data: string) => {\r\n // Cut the prefix `data:application/pdf;base64` from the raw base 64\r\n if (data != null)\r\n {\r\n //const base64WithoutPrefix = data.substr('data:application/pdf;base64,'.length);\r\n\r\n const bytes = atob(data);\r\n let length = bytes.length;\r\n let out = new Uint8Array(length);\r\n\r\n while (length--) {\r\n out[length] = bytes.charCodeAt(length);\r\n }\r\n return new Blob([out], { type: 'application/pdf' });\r\n \r\n }\r\n return new Blob([], { type: 'application/pdf' });\r\n\r\n};\r\n\r\nconst PDF = (item: any ) => {\r\n \r\n const blob = base64toBlob(item.record.acEbaReceivedID);\r\n const url = URL.createObjectURL(blob);\r\n return (\r\n //<object style={{height: '90vh', width:'65vh', marginLeft:'1px',border: '1px solid black', borderRadius: '10px', margin:'2px'}} data={ url } type=\"application/pdf\" width='60%' height='100%'>\r\n //</object>\r\n //<EditButton icon={<AccountBalanceIcon/>} label=\"PDF\" to={url} ></EditButton>\r\n\r\n <div className = \"App\">\r\n \r\n <IconButton href={url} sx={{ \"&:hover\": { color: '#f37435' } }} target=\"_blank\" rel=\"noopener noreferrer\" >\r\n <FindInPageOutlinedIcon></FindInPageOutlinedIcon>\r\n </IconButton>\r\n \r\n </div>\r\n\r\n )\r\n };\r\nconst Items: FC<FieldProps<InvoiceItem>> = ({ record }) => {\r\n const classes = useStyles();\r\n const translate = useTranslate();\r\n\r\n const { loaded, data: items } = useQueryWithStore<AppState>(\r\n {\r\n type: 'getOne',\r\n resource: 'Move/GetInvoice',\r\n payload: {\r\n id: record?.id,\r\n },\r\n }\r\n );\r\n \r\n if (!loaded) return <LinearProgress className={classes.width}/>\r\n\r\n if (!loaded || !record) return null;\r\n \r\n\r\n return (\r\n <Table>\r\n <TableHead>\r\n <TableRow>\r\n <TableCell >\r\n Dobavitelj oz. izvajalec\r\n </TableCell>\r\n <TableCell className={classes.rightAlignedCell}>\r\n ID št. za DDV\r\n </TableCell>\r\n <TableCell className={classes.rightAlignedCell}>\r\n Vrsta storitve\r\n </TableCell>\r\n <TableCell className={classes.rightAlignedCell}> \r\n Osnova\r\n \r\n </TableCell>\r\n <TableCell className={classes.rightAlignedCell}>\r\n DDV\r\n </TableCell>\r\n\r\n <TableCell className={classes.rightAlignedCell}>\r\n Neto delež\r\n </TableCell>\r\n <TableCell className={classes.rightAlignedCell}>\r\n Znesek z DDV\r\n </TableCell>\r\n <TableCell className={classes.rightAlignedCell}>\r\n Dokument\r\n </TableCell>\r\n </TableRow>\r\n </TableHead>\r\n \r\n <TableBody className={classes.lines}>\r\n {record.items.map(\r\n (item: InvItem) =>\r\n item.idInvoiceItem && (\r\n <TableRow key={item.idInvoiceItem} hover > \r\n <TableCell className={classes.leftAlignedCell}>\r\n {item.acSupplierName} <br></br>{item.acReceivedInvoiceLabel}\r\n </TableCell>\r\n <TableCell className={classes.rightAlignedCell}>\r\n {item.acSupplierTaxNumber}\r\n </TableCell>\r\n <TableCell className={classes.rightAlignedCell}>\r\n {item.acServiceName}\r\n </TableCell>\r\n <TableCell className={classes.rightAlignedCell}>\r\n {item.anPrice.toLocaleString(undefined, {\r\n style: 'currency',\r\n currency: 'EUR',\r\n })}\r\n </TableCell>\r\n <TableCell className={classes.rightAlignedCell}>\r\n {item.anVat}%\r\n </TableCell>\r\n <TableCell className={classes.rightAlignedCell}>\r\n {item.acDivisionShare}\r\n </TableCell>\r\n <TableCell className={classes.rightAlignedCell}>\r\n {(\r\n item.anForPay\r\n ).toLocaleString(undefined, {\r\n style: 'currency',\r\n currency: 'EUR',\r\n })}\r\n </TableCell>\r\n <TableCell className={classes.rightAlignedCell}>\r\n {\r\n item.acEbaReceivedID != undefined &&\r\n \r\n <PDF record = {(item)}/>} \r\n \r\n </TableCell>\r\n </TableRow>\r\n )\r\n )}\r\n </TableBody>\r\n </Table>\r\n );\r\n};\r\n\r\nexport default Items;\r\n","import * as React from 'react';\r\nimport { FC} from 'react';\r\n\r\nimport {\r\n Table,\r\n TableBody,\r\n TableCell,\r\n TableHead,\r\n TableRow,\r\n} from '@material-ui/core';\r\nimport { makeStyles } from '@material-ui/core/styles';\r\nimport { FieldProps, useTranslate, useQueryWithStore, LinearProgress } from 'react-admin';\r\nimport { AppState,InvoiceTax, InvTax } from '../types';\r\n\r\nconst useStyles = makeStyles({\r\n rightAlignedCell: { textAlign: 'right' },\r\n leftAlignedCell:{textAlign:'left', color:'#FF5F1F'},\r\n width:{width:'100%', height:'8px'}\r\n});\r\n\r\n\r\nconst Taxes: FC<FieldProps<InvoiceTax>> = ({ record }) => {\r\n const classes = useStyles();\r\n const translate = useTranslate();\r\n\r\n const { loaded, loading, data: taxes1 } = useQueryWithStore<AppState>(\r\n {\r\n type: 'getOne',\r\n resource: 'Move/GetInvoice',\r\n payload: {\r\n id: record?.id,\r\n },\r\n },\r\n []\r\n );\r\n \r\n\r\n\r\n if (!loaded || !record) return null;\r\n\r\n if(loading) return null;\r\n\r\n\r\n return (\r\n <Table>\r\n <TableHead>\r\n <TableRow>\r\n <TableCell>\r\n Naziv davčne stopnje\r\n </TableCell>\r\n <TableCell className={classes.rightAlignedCell}>\r\n Stopnja davka\r\n </TableCell>\r\n <TableCell className={classes.rightAlignedCell}>\r\n Osnova\r\n </TableCell>\r\n <TableCell className={classes.rightAlignedCell}>\r\n DDV\r\n </TableCell>\r\n <TableCell className={classes.rightAlignedCell}>\r\n Vrednost\r\n </TableCell>\r\n \r\n \r\n </TableRow>\r\n </TableHead>\r\n \r\n <TableBody>\r\n {record?.taxes?.map(\r\n (tax: InvTax) =>\r\n tax.acVatCode && (\r\n <TableRow key={tax.acName} hover> \r\n\r\n <TableCell className={classes.leftAlignedCell}>\r\n {tax.acName}\r\n </TableCell>\r\n <TableCell className={classes.rightAlignedCell}>\r\n {tax.anVat}%\r\n </TableCell>\r\n <TableCell className={classes.rightAlignedCell}>\r\n {(\r\n tax.zaPlacilo\r\n ).toLocaleString(undefined, {\r\n style: 'currency',\r\n currency: 'EUR',\r\n })}\r\n </TableCell>\r\n <TableCell className={classes.rightAlignedCell}>\r\n {(\r\n tax.ddv\r\n ).toLocaleString(undefined, {\r\n style: 'currency',\r\n currency: 'EUR',\r\n })}\r\n </TableCell>\r\n <TableCell className={classes.rightAlignedCell}>\r\n {(\r\n tax.vrednost\r\n ).toLocaleString(undefined, {\r\n style: 'currency',\r\n currency: 'EUR',\r\n })}\r\n </TableCell>\r\n \r\n\r\n </TableRow>\r\n )\r\n )}\r\n </TableBody>\r\n </Table>\r\n );\r\n};\r\n\r\nexport default Taxes;\r\n","import * as React from 'react';\r\nimport { FC } from 'react';\r\nimport { Table, TableBody, TableCell, TableRow } from '@material-ui/core';\r\nimport { makeStyles } from '@material-ui/core/styles';\r\nimport { FieldProps, useTranslate } from 'react-admin';\r\nimport classnames from 'classnames';\r\nimport { Invoice } from '../types';\r\n\r\nconst useStyles = makeStyles({\r\n container: { minWidth: '35em' },\r\n rightAlignedCell: { textAlign: 'right' },\r\n boldCell: { fontWeight: 'bold' },\r\n});\r\n\r\nconst Totals: FC<FieldProps<Invoice>> = ({ record }: { record?: Invoice }) => {\r\n const classes = useStyles();\r\n const translate = useTranslate();\r\n\r\n return (\r\n <Table className={classes.container}>\r\n <TableBody>\r\n <TableRow>\r\n <TableCell>\r\n Znesek brez DDV\r\n </TableCell>\r\n <TableCell className={classes.rightAlignedCell}>\r\n {record?.anInoiceValue.toLocaleString(undefined, {\r\n style: 'currency',\r\n currency: 'EUR',\r\n })}\r\n </TableCell>\r\n </TableRow>\r\n <TableRow>\r\n <TableCell>\r\n Davek\r\n </TableCell>\r\n <TableCell className={classes.rightAlignedCell}>\r\n {record?.anInvoiceVat.toLocaleString(undefined, {\r\n style: 'currency',\r\n currency: 'EUR',\r\n })}\r\n </TableCell>\r\n </TableRow>\r\n <TableRow>\r\n <TableCell>\r\n Popust (\r\n {record?.anInvoiceDiscount.toLocaleString(undefined, {\r\n style: 'percent',\r\n })}\r\n )\r\n </TableCell>\r\n <TableCell className={classes.rightAlignedCell}>\r\n {record?.anInvoiceDiscount.toLocaleString(undefined, {\r\n style: 'currency',\r\n currency: 'EUR',\r\n })}\r\n </TableCell>\r\n </TableRow>\r\n <TableRow>\r\n <TableCell className={classes.boldCell}>\r\n Znesek\r\n </TableCell>\r\n <TableCell\r\n className={classnames(\r\n classes.boldCell,\r\n classes.rightAlignedCell\r\n )}\r\n >\r\n {record?.anInvoiceForPay.toLocaleString(undefined, {\r\n style: 'currency',\r\n currency: 'EUR',\r\n })}\r\n </TableCell>\r\n </TableRow>\r\n </TableBody>\r\n </Table>\r\n );\r\n};\r\n\r\nexport default Totals;\r\n","import * as React from 'react';\r\n\r\nimport { FC } from 'react';\r\nimport {\r\n Edit,\r\n EditProps,\r\n FormWithRedirect,\r\n Labeled,\r\n TextField,\r\n Toolbar,\r\n useTranslate,\r\n LinearProgress\r\n} from 'react-admin';\r\nimport {\r\n Card,\r\n CardContent,\r\n Box,\r\n Grid,\r\n Typography\r\n} from '@material-ui/core';\r\n\r\nimport IconButton from '@mui/material/IconButton';\r\n\r\nimport FindInPageOutlinedIcon from '@mui/icons-material/FindInPageOutlined';\r\nimport DescriptionOutlinedIcon from '@mui/icons-material/DescriptionOutlined';\r\n\r\nimport { makeStyles } from '@material-ui/core/styles';\r\nimport { Invoice, InvItem } from '../types';\r\nimport Items from './InvoiceItems';\r\nimport Taxes from './InvoiceTaxes';\r\nimport Totals from './InvoiceTotal';\r\nimport \"./stili.css\"\r\n\r\nconst base64toBlob = (data: string) => {\r\n // Cut the prefix `data:application/pdf;base64` from the raw base 64\r\n if (data != null)\r\n {\r\n //const base64WithoutPrefix = data.substr('data:application/pdf;base64,'.length);\r\n\r\n const bytes = atob(data);\r\n let length = bytes.length;\r\n let out = new Uint8Array(length);\r\n\r\n while (length--) {\r\n out[length] = bytes.charCodeAt(length);\r\n }\r\n return new Blob([out], { type: 'application/pdf' });\r\n \r\n }\r\n return new Blob([], { type: 'application/pdf' });\r\n\r\n};\r\n\r\nconst IMAGE = (item: any ) => {\r\n const blob = base64toBlob(item.item.qrCode);\r\n \r\n const url = URL.createObjectURL(blob);\r\n return (\r\n //<object style={{height: '90vh', width:'65vh', marginLeft:'1px',border: '1px solid black', borderRadius: '10px', margin:'2px'}} data={ url } type=\"application/pdf\" width='60%' height='100%'>\r\n //</object>\r\n //<EditButton icon={<AccountBalanceIcon/>} label=\"PDF\" to={url} ></EditButton>\r\n\r\n <div className = \"App\">\r\n <figcaption className='boldi'>Skeniraj in plačaj </figcaption>\r\n <i className=\"triangle_down12\"></i> \r\n \r\n\r\n <img className='img' src={url} width={200} height={200} alt='SKENIRAJ IN PLAČAJ'/>\r\n \r\n </div>\r\n\r\n )\r\n };\r\n\r\nconst BLOBI = (doc:any) => \r\n{\r\n const blob1 = base64toBlob(doc.doc.acEbaReceivedID);\r\n const url1 = URL.createObjectURL(blob1);\r\n\r\n return (\r\n <div className = \"App1\">\r\n <figcaption className='Boldi1'>Tiskan račun </figcaption>\r\n <i className=\"arrow right\"></i> \r\n <IconButton className=\"Ikona\" href={url1} sx={{ \"&:hover\": { color: '#f37435' }, fontSize:\"20px\", alignContent:\"center\"}} target=\"_blank\" rel=\"noopener noreferrer\" >\r\n <DescriptionOutlinedIcon sx={{fontSize:\"40px\"}}></DescriptionOutlinedIcon>\r\n </IconButton>\r\n \r\n </div>\r\n \r\n\r\n )\r\n};\r\n\r\n\r\ninterface MoveTitleProps {\r\n record?: Invoice;\r\n}\r\n\r\nconst OrderTitle: FC<MoveTitleProps> = ({ record }) => {\r\n const translate = useTranslate();\r\n \r\n return record ? (\r\n <span>\r\n Račun št.: { record?.acInvoiceKey} \r\n \r\n </span>\r\n ) : null;\r\n};\r\n\r\nconst useEditStyles = makeStyles({\r\n root: { alignItems: 'flex-end'},\r\n padding_top: {marginTop:2}\r\n});\r\n\r\nconst Spacer = () => <Box m={1}> </Box>;\r\n\r\n\r\nconst CustomToolbar = (props:any) => (\r\n <Toolbar {...props}>\r\n \r\n </Toolbar>\r\n);\r\n\r\n\r\n\r\nconst OrderForm = (props: any) => {\r\n const translate = useTranslate(); \r\n const classess = useEditStyles();\r\n\r\n const html = props.record.anNetoPovrsina;\r\n \r\n\r\n document.title = \"eNadzornik \";\r\n return (\r\n <FormWithRedirect\r\n {...props} \r\n render={(formProps: any) => ( \r\n <React.Fragment> \r\n <Box maxWidth=\"70em\" >\r\n <Card>\r\n <CardContent>\r\n <Grid container spacing={3}>\r\n <Grid item xs={12} sm={12} md={7}>\r\n <Typography variant=\"h6\" gutterBottom>\r\n Podrobnosti\r\n \r\n </Typography>\r\n <Grid container>\r\n <Grid item xs={12} sm={12} md={6}>\r\n <Labeled\r\n source=\"Obdobje\"\r\n resource=\"commands\"\r\n >\r\n <TextField\r\n source=\"acPeriod\"\r\n resource={`Move/GetInvoice/${formProps.record.idInvoice}`}\r\n record={formProps.record}\r\n />\r\n </Labeled>\r\n </Grid>\r\n <Grid container>\r\n <Grid item xs={12} sm={12} md={6}>\r\n <Labeled\r\n source=\"Vezni dokument\"\r\n resource=\"commands\"\r\n >\r\n <TextField\r\n source=\"acDoc1\"\r\n resource={`Move/GetInvoice/${formProps.record.idInvoice}`}\r\n record={formProps.record}\r\n />\r\n </Labeled>\r\n </Grid>\r\n </Grid>\r\n <Grid container>\r\n <Grid item xs={12} sm={10} md={9}>\r\n <Labeled\r\n source=\"Spoštovani, bremenimo vas\"\r\n resource=\"commands\"\r\n >\r\n <TextField\r\n source=\"acNoteBefore\"\r\n resource={`Move/GetInvoice/${formProps.record.idInvoice}`}\r\n record={formProps.record}\r\n />\r\n </Labeled>\r\n \r\n </Grid>\r\n </Grid>\r\n <Grid container>\r\n <Grid item xs={12} sm={10} md={9}>\r\n <Labeled\r\n source=\"Dodatno\"\r\n resource=\"commands\"\r\n >\r\n <TextField dangerouslySetInnerHTML={{\r\n __html: html\r\n }}></TextField>\r\n \r\n </Labeled>\r\n \r\n </Grid>\r\n </Grid>\r\n\r\n </Grid>\r\n \r\n \r\n </Grid>\r\n <Box></Box>\r\n <Grid item xs={12} sm={12} md={5} className={classess.padding_top}>\r\n <Typography variant=\"h6\" gutterBottom>\r\n Stavba\r\n </Typography>\r\n <Box>\r\n <Typography>\r\n {formProps.record?.acERPSubject} \r\n </Typography>\r\n <Typography>\r\n {formProps.record?.acAddress} {formProps.record?.acHouseNo} \r\n </Typography>\r\n <Typography>\r\n {formProps.record?.acPost} \r\n </Typography>\r\n <Typography>\r\n \r\n </Typography>\r\n </Box>\r\n <Spacer />\r\n { formProps.record.qrCode != undefined ?\r\n \r\n formProps.record.acInvoicePayed == 'N' &&\r\n <IMAGE item={formProps.record}></IMAGE> \r\n :\r\n \r\n <LinearProgress></LinearProgress>\r\n \r\n }\r\n \r\n \r\n <Spacer/>\r\n <Box>\r\n {formProps.record.acEbaReceivedID != undefined ?\r\n \r\n <BLOBI doc={formProps.record}></BLOBI>\r\n :\r\n <Spacer/>\r\n }\r\n </Box>\r\n </Grid>\r\n </Grid>\r\n <Spacer />\r\n\r\n <Typography variant=\"h6\" gutterBottom>\r\n Storitve\r\n </Typography>\r\n <Box>\r\n <Items record={formProps.record} />\r\n </Box>\r\n <Spacer />\r\n\r\n <Typography variant=\"h6\" gutterBottom>\r\n Davčne stopnje\r\n </Typography>\r\n <Box>\r\n <Taxes record={formProps.record} />\r\n </Box>\r\n <Spacer />\r\n\r\n <Typography variant=\"h6\" gutterBottom>\r\n Povzetek:\r\n </Typography>\r\n <Box>\r\n <Totals record={formProps.record} />\r\n </Box>\r\n <Spacer/>\r\n <Box>\r\n \r\n </Box>\r\n </CardContent> \r\n </Card>\r\n\r\n </Box>\r\n\r\n \r\n</React.Fragment>\r\n \r\n \r\n )}\r\n /> \r\n );\r\n};\r\nconst InvoiceEdit: FC<EditProps> = props => {\r\n const classes = useEditStyles();\r\n \r\n return (\r\n <Edit\r\n title = {<OrderTitle/>}\r\n classes={classes}\r\n {...props}\r\n component=\"div\" >\r\n\r\n <OrderForm toolbar={<CustomToolbar/>}></OrderForm>\r\n \r\n </Edit>\r\n \r\n \r\n );\r\n};\r\n\r\nexport default InvoiceEdit;","import { DatagridProps, useListContext, useGetList, FilterProps, Filter, SelectInput, DateInput,Identifier, \r\n ListContextProvider, Datagrid, DateField, TextField, ReferenceField, NumberField, BooleanField,List,ListProps, ReferenceInput,AutocompleteInput } from \"react-admin\";\r\nimport { FC, Fragment, useCallback, useEffect, useState } from 'react';\r\nimport { makeStyles } from '@material-ui/core/styles';\r\nimport { useMediaQuery, Divider, Tabs, Tab, Theme } from '@material-ui/core';\r\nimport { ShowButton } from 'react-admin';\r\nimport { Link } from 'react-router-dom';\r\nimport { Box } from \"@mui/material\";\r\nimport { useRecordContext,useResourceContext,TopToolbar } from 'react-admin';\r\n\r\nimport \"./stili.css\";\r\n\r\n\r\n\r\n\r\n\r\nconst OrderFilter: FC<Omit<FilterProps,'children'>> = props => ( \r\n \r\n \r\n <Filter {...props} >\r\n {/*\r\n <SelectInput label=\"Način prodaje\" source=\"acWayOfSale\" choices={[\r\n { id: 'K', name: 'Kupec' },\r\n { id: 'Z', name: 'Zavezanec' }]}/>\r\n \r\n \r\n */}\r\n\r\n <ReferenceInput label=\"Naslov stavbe\" source=\"idBuilding\" reference=\"Move/GetBuildings\">\r\n <SelectInput source=\"id\" name=\"acAddress\" optionText=\"acAddress\" options={{ fullWidth: true }}/>\r\n </ReferenceInput>\r\n <DateInput label=\"Datum od\" source=\"adDateFrom\" />\r\n <DateInput label=\"Datum do\" source=\"adDateTo\" />\r\n\r\n </Filter>\r\n\r\n);\r\n\r\nconst useStyles = makeStyles({\r\n rightAlignedCell: { display: 'flex', justifyContent: 'flex-end', textAlign:'right' },\r\n leftAlignedCell:{textAlign:'left', color:'#FF5F1F', maxWidth:'200px', maxHeight:'50px'},\r\n hide:{display:'none'},\r\n width:{width:'100%', height:'8px'},\r\n lines:{margin:10,paddingTop:100,paddingBottom:0,paddingBlockEnd:0},\r\n hover: {backgroundColor:'#cdcdcd'},\r\n hover1: {\"&:hover\":{color: '#cdcdcd'}}\r\n});\r\n\r\nconst useDatagridStyles = makeStyles({\r\n total: { fontWeight: 'bold' },\r\n});\r\n\r\nconst tabs = [\r\n { id: 'Y', name: 'Plačano' },\r\n { id: 'N', name: 'Neplačano' }\r\n];\r\n\r\n\r\ninterface TabbedDatagridProps extends DatagridProps {}\r\nconst useGetTotals = (filterValues: any) => {\r\n const { total: totalOrdered } = useGetList(\r\n 'Move/GetInvoices',\r\n { perPage: 1, page: 1 },\r\n { ...filterValues, acInvoicePayed: 'Y' }\r\n );\r\n const { total: totalDelivered } = useGetList(\r\n 'Move/GetInvoices',\r\n { perPage: 1, page: 1 },\r\n { ...filterValues, acInvoicePayed: 'N' }\r\n );\r\n\r\n\r\n return {\r\n ordered: totalOrdered,\r\n delivered: totalDelivered\r\n };\r\n};\r\n\r\nconst TabbedDatagrid: FC<TabbedDatagridProps> = props => {\r\n const listContext = useListContext();\r\n const classes3 = useStyles();\r\n const { ids, filterValues, setFilters, displayedFilters } = listContext;\r\n const classes = useDatagridStyles();\r\n const isXSmall = useMediaQuery<Theme>(theme =>\r\n theme.breakpoints.down('xs')\r\n );\r\n const [ordered, setOrdered] = useState<Identifier[]>([] as Identifier[]);\r\n const [delivered, setDelivered] = useState<Identifier[]>(\r\n [] as Identifier[]\r\n );\r\n const totals = useGetTotals(filterValues) as any;\r\n\r\n useEffect(() => {\r\n if (ids && ids !== filterValues.acInvoicePayed) {\r\n switch (filterValues.acInvoicePayed) {\r\n case 'Y':\r\n setOrdered(ids);\r\n break;\r\n case 'N':\r\n setDelivered(ids);\r\n break;\r\n }\r\n }\r\n }, [ids, filterValues.acInvoicePayed]);\r\n\r\n const handleChange = useCallback(\r\n (event: React.ChangeEvent<{}>, value: any) => {\r\n setFilters &&\r\n setFilters(\r\n { ...filterValues, acInvoicePayed: value },\r\n displayedFilters\r\n );\r\n \r\n },\r\n [displayedFilters, filterValues, setFilters]\r\n \r\n );\r\n\r\n const selectedIds =\r\n filterValues.acInvoicePayed === 'Y'\r\n ? ordered\r\n : filterValues.acInvoicePayed === 'N'\r\n ? delivered : delivered;\r\n document.title = \"eNadzornik\";\r\n return (\r\n <Fragment>\r\n <Tabs\r\n variant=\"fullWidth\"\r\n centered\r\n value={filterValues.acInvoicePayed}\r\n indicatorColor=\"primary\"\r\n onChange={handleChange}\r\n >\r\n {tabs.map(choice => (\r\n <Tab\r\n key={choice.id}\r\n label={\r\n totals[choice.name]\r\n ? `${choice.name} (${totals[choice.name]})`\r\n : choice.name\r\n }\r\n value={choice.id}\r\n />\r\n ))}\r\n </Tabs>\r\n <Divider />\r\n {isXSmall ? (\r\n <div>\r\n {filterValues.acInvoicePayed === 'Y' && (\r\n <ListContextProvider\r\n value={{ ...listContext, ids: ordered }}\r\n >\r\n <Datagrid {...props} optimized rowClick=\"edit\">\r\n <TextField source=\"acInvoiceKey\" label=\"identifikator\"></TextField>\r\n\r\n <DateField source=\"acPeriod\" label=\"Datum zapadlosti\"/>\r\n <NumberField\r\n source=\"anInvoiceForPay\"\r\n label=\"Za plačilo\"\r\n options={{\r\n style: 'currency',\r\n currency: 'EUR',\r\n }}\r\n className={classes.total}\r\n />\r\n <ShowButton aria-label=\"Prikaži\" label= \"Prikaži\" className={classes3.hover1}></ShowButton>\r\n </Datagrid>\r\n </ListContextProvider>\r\n )}\r\n {filterValues.acInvoicePayed === 'N' && (\r\n <ListContextProvider\r\n value={{ ...listContext, ids: delivered }}\r\n >\r\n <Datagrid {...props} rowClick=\"edit\" >\r\n <TextField source=\"acInvoiceKey\" label={\"Identifikator\"}></TextField>\r\n <DateField source=\"acPeriod\" label=\"Datum zapadlosti\" />\r\n\r\n <NumberField\r\n label=\"Za plačilo\"\r\n source=\"anInvoiceForPay\"\r\n options={{\r\n style: 'currency',\r\n currency: 'EUR',\r\n }}\r\n className={classes.total}\r\n />\r\n \r\n <ShowButton name=\"Odpri\" className={classes3.hover1} label=\"Prikaži\" aria-label=\"Idor\" ></ShowButton>\r\n \r\n </Datagrid>\r\n </ListContextProvider>\r\n )}\r\n </div>\r\n \r\n ) : (\r\n \r\n <div>\r\n {filterValues.acInvoicePayed === 'Y' && (\r\n <ListContextProvider\r\n value={{ ...listContext, ids: ordered }}\r\n >\r\n <Datagrid {...props} optimized rowClick=\"edit\">\r\n <TextField source=\"acInvoiceKey\" label=\"identifikator\"></TextField>\r\n\r\n <DateField source=\"acPeriod\" label=\"Datum zapadlosti\"/>\r\n <NumberField\r\n source=\"anInvoiceForPay\"\r\n label=\"Za plačilo\"\r\n options={{\r\n style: 'currency',\r\n currency: 'EUR',\r\n }}\r\n className={classes.total}\r\n />\r\n <ShowButton aria-label=\"Prikaži\" label= \"Prikaži\" className={classes3.hover1}></ShowButton>\r\n </Datagrid>\r\n </ListContextProvider>\r\n )}\r\n {filterValues.acInvoicePayed === 'N' && (\r\n <ListContextProvider\r\n value={{ ...listContext, ids: delivered }}\r\n >\r\n <Datagrid {...props} rowClick=\"edit\" >\r\n <TextField source=\"acInvoiceKey\" label={\"Identifikator\"}></TextField>\r\n <DateField source=\"acPeriod\" label=\"Datum zapadlosti\" />\r\n\r\n <NumberField\r\n label=\"Za plačilo\"\r\n source=\"anInvoiceForPay\"\r\n options={{\r\n style: 'currency',\r\n currency: 'EUR',\r\n }}\r\n className={classes.total}\r\n />\r\n \r\n <ShowButton name=\"Odpri\" className={classes3.hover1} label=\"Prikaži\" aria-label=\"Idor\" ></ShowButton>\r\n \r\n </Datagrid>\r\n </ListContextProvider>\r\n )}\r\n </div>\r\n )}\r\n </Fragment>\r\n );\r\n};\r\n\r\n\r\nconst invoices: FC<ListProps> = props => (\r\n \r\n <List\r\n {...props}\r\n filterDefaultValues={{ acInvoicePayed: 'Y' }}\r\n bulkActionButtons={false}\r\n sort={{ field: 'acPeriod', order: 'DESC' }}\r\n perPage={25}\r\n \r\n filters={<OrderFilter />} \r\n >\r\n \r\n <TabbedDatagrid />\r\n </List>\r\n);\r\n\r\nexport default invoices;\r\n","import InvoiceEdit from './InvoiceEdit'\r\nimport Invoices from './Invoices'\r\n\r\nexport default {\r\n list: Invoices,\r\n edit:InvoiceEdit\r\n \r\n}","import { Component, CSSProperties,ReactChild,ReactNode,useState} from \"react\";\r\nimport { Formik, Field, Form, ErrorMessage, yupToFormErrors } from \"formik\";\r\nimport { useRedirect } from \"react-admin\";\r\nimport * as Yup from \"yup\";\r\nimport React from \"react\";\r\nimport { Link } from \"react-router-dom\";\r\nimport AuthService from \"./authProvider\";\r\nimport {\r\n Avatar,\r\n Button,\r\n Card,\r\n CardActions,\r\n CircularProgress,\r\n TextField,\r\n} from '@material-ui/core';\r\nimport 'bootstrap/dist/css/bootstrap.min.css';\r\nimport { makeStyles , withStyles } from '@material-ui/core/styles';\r\nimport classNames from \"classnames\";\r\nimport { Console } from \"console\";\r\nimport { notify } from 'react-notify-toast';\r\nimport {useHistory} from 'react-router-dom';\r\nimport Spinner from './Spinner';\r\nimport { Message } from \"@mui/icons-material\";\r\n\r\ntype Props = {\r\n};\r\ntype State = {\r\n username: string,\r\n email: string,\r\n password: string,\r\n successful: boolean,\r\n message: string,\r\n sendingEmail: boolean\r\n};\r\n\r\nconst styles = {\r\n card: {\r\n minWidth: 350,\r\n marginTop: '5em',\r\n justifyContent: 'center',\r\n padding: 15,\r\n backgroundColor: '#ffffff',\r\n outerHeight:3333,\r\n },\r\n avatar: {\r\n margin: '1em',\r\n display: 'flex',\r\n justifyContent: 'center',\r\n },\r\n \r\n icon: {\r\n \r\n },\r\n hint: {\r\n marginTop: '1em',\r\n display: 'flex',\r\n justifyContent: 'center',\r\n \r\n },\r\n form: {\r\n padding: '0 1em 1em 1em',\r\n },\r\n input: {\r\n marginTop: '1em',\r\n width: \"100%\",\r\n paddingLeft: \"8px\",\r\n paddingTop: \"6px\",\r\n paddingBottom: \"6px\",\r\n },\r\n actions: {\r\n padding: '0 1em 1em 1em',\r\n },\r\n field: {\r\n width: \"100%\",\r\n height: \"56px\",\r\n border: \"4px\",\r\n position: \"relative\",\r\n transition: \"0.3s\" \r\n },\r\n main: {\r\n display: 'flex',\r\n flexDirection: 'column',\r\n minHeight: '98vh',\r\n alignItems: 'center',\r\n justifyContent: 'flex-start',\r\n background: 'url(https://source.unsplash.com/random/1600x900)',\r\n backgroundRepeat: 'no-repeat',\r\n backgroundSize: 'cover',\r\n backgroundPosition: 'center',\r\n margin:0,\r\n padding:0,\r\n },\r\n button:{\r\n backgroundColor: '#f37435',\r\n alignItems: 'center',\r\n justifyContent: 'center',\r\n padding: 5,\r\n height: 40, \r\n margin: 10,\r\n marginTop: 20,\r\n borderRadius: '10px',\r\n borderColor:\"#f37435\",\r\n //border: '1px solid black', borderRadius: '5px',\r\n elevation:10, fontSize: 16,\r\n },\r\n assa:{\r\n color: '#FF5F1F',\r\n },\r\n link:{\r\n color: '#FF5F1F'\r\n }\r\n \r\n \r\n};\r\n\r\nexport default class Register extends Component<Props, State> {\r\n constructor(props: Props) {\r\n super(props);\r\n \r\n this.handleRegister = this.handleRegister.bind(this);\r\n this.state = {\r\n username: \"\",\r\n email: \"\",\r\n password: \"\",\r\n successful: false,\r\n message: \"\",\r\n sendingEmail: true\r\n };\r\n \r\n }\r\n \r\n validationSchema() {\r\n return Yup.object().shape({\r\n email: Yup.string()\r\n .email(\"E-naslov ni veljaven\")\r\n .required(\"Obvezno polje!\"),\r\n password: Yup.string()\r\n .test(\r\n \"len\",\r\n \"Geslo je prekratko!\",\r\n (val: any) =>\r\n val &&\r\n val.toString().length >= 6 &&\r\n val.toString().length <= 40\r\n )\r\n .required(\"Obvezno polje!\"),\r\n\r\n firstname: Yup.string() \r\n .required(\"Obvezno polje!\"),\r\n\r\n lastname: Yup.string() \r\n .required(\"Obvezno polje!\"),\r\n\r\n stevilkaRac: Yup.string()\r\n .required(\"Obvezno polje!\"),\r\n\r\n ZnesekRac: Yup.string()\r\n .required(\"Obvezno polje!\") \r\n \r\n\r\n });\r\n }\r\n handleRegister(formValue: { email: string; firstname: string; password: string; lastname:string; stevilkaRac:string; ZnesekRac:string }) {\r\n\r\n const { email, firstname, lastname, password,stevilkaRac,ZnesekRac } = formValue;\r\n \r\n \r\n this.setState({\r\n message: \"\",\r\n successful: false,\r\n sendingEmail: true\r\n });\r\n AuthService.register(\r\n email,\r\n password,\r\n firstname,\r\n lastname,\r\n stevilkaRac,\r\n ZnesekRac\r\n )\r\n .then(\r\n response => {\r\n this.setState({\r\n message: response.value,\r\n successful: true,\r\n sendingEmail: true\r\n \r\n })\r\n AuthService.sendVerification(email,password,firstname,lastname)\r\n .then(() => {\r\n\r\n })\r\n //console.log(response.data.detail)\r\n },\r\n error => {\r\n const resMessage =\r\n (error.response &&\r\n error.response.data &&\r\n error.response.data.message) ||\r\n error.message ||\r\n error.toString();\r\n this.setState({\r\n successful: false,\r\n message: resMessage,\r\n sendingEmail: false\r\n })\r\n alert(error.message);\r\n },\r\n \r\n );\r\n }\r\n \r\nrender = () => {\r\n const { successful, message, sendingEmail } = this.state;\r\n \r\n const initialValues = {\r\n email: \"\",\r\n password: \"\",\r\n firstname: \"\",\r\n lastname:\"\",\r\n stevilkaRac: \"\",\r\n ZnesekRac:\"\"\r\n };\r\n \r\n \r\n return (\r\n \r\n <div className=\"col-md-12\">\r\n <div className=\"card card-container\"> \r\n <Formik\r\n initialValues={initialValues}\r\n validationSchema={this.validationSchema}\r\n onSubmit={this.handleRegister}\r\n >\r\n <Form >\r\n {message && (\r\n <div className=\"form-group\">\r\n <div\r\n className={\r\n successful ? \"alert alert-success\" : \"alert alert-danger\"\r\n }\r\n role=\"alert\"\r\n >\r\n {message}\r\n {successful&&( \r\n <p>\r\n Na e-poštni naslov ste prejeli Verifikacijsko kodo, prosim preverite svoj e-poštni naslov\r\n </p>\r\n )\r\n \r\n }\r\n </div>\r\n </div>\r\n )}\r\n\r\n {!successful && (\r\n <div style={styles.main as CSSProperties} >\r\n <Card style={styles.card as CSSProperties} > \r\n <div className=\"form-group\">\r\n <label htmlFor=\"email\"> Email </label>\r\n <Field name=\"email\" type=\"text\" className=\"form-control\" />\r\n <ErrorMessage\r\n name=\"email\"\r\n component=\"div\"\r\n className=\"alert alert-danger form-control\"\r\n />\r\n </div>\r\n <div className=\"form-group\">\r\n <label htmlFor=\"firstname\" className=\"text-center\"> Ime </label>\r\n <Field name=\"firstname\" type=\"text\" className=\"form-control\" />\r\n <ErrorMessage\r\n name=\"firstname\"\r\n component=\"div\"\r\n className=\"alert alert-danger\"\r\n />\r\n </div>\r\n <div className=\"form-group\">\r\n <label htmlFor=\"lastname\"> Priimek </label>\r\n <Field name=\"lastname\" type=\"text\" className=\"form-control\" />\r\n <ErrorMessage\r\n name=\"lastname\"\r\n component=\"div\"\r\n className=\"alert alert-danger\"\r\n />\r\n </div>\r\n <div className=\"form-group\">\r\n <label htmlFor=\"password\"> Geslo </label>\r\n <Field\r\n name=\"password\"\r\n type=\"password\"\r\n className=\"form-control\"\r\n />\r\n <ErrorMessage\r\n name=\"password\"\r\n component=\"div\"\r\n className=\"alert alert-danger\"\r\n \r\n />\r\n </div>\r\n <div className=\"form-group\">\r\n <label htmlFor=\"password\"> Številka računa </label>\r\n <Field\r\n name=\"stevilkaRac\"\r\n type=\"text\"\r\n className=\"form-control\"\r\n />\r\n <ErrorMessage\r\n name=\"stevilkaRac\"\r\n component=\"div\"\r\n className=\"alert alert-danger\"\r\n \r\n />\r\n </div>\r\n <div className=\"form-group\">\r\n <label htmlFor=\"password\"> Skupni znesek računa </label>\r\n <Field\r\n name=\"ZnesekRac\"\r\n type=\"text\"\r\n className=\"form-control\"\r\n />\r\n <ErrorMessage\r\n name=\"ZnesekRac\"\r\n component=\"div\"\r\n className=\"alert alert-danger\"\r\n \r\n />\r\n </div>\r\n <div>\r\n <Link to=\"/login\" color=\"#FF5F1F\" style={{ color: '#FF5F1F' }} > Nazaj na prijavo</Link>\r\n </div>\r\n\r\n <CardActions style={styles.actions}>\r\n \r\n <Button type=\"submit\"\r\n fullWidth\r\n variant=\"contained\"\r\n color = \"primary\"\r\n style={styles.button}>\r\n Registracija\r\n </Button> \r\n </CardActions> \r\n </Card>\r\n\r\n </div>\r\n )} \r\n </Form>\r\n </Formik>\r\n </div>\r\n </div>\r\n );\r\n }\r\n}","\r\nimport {useState, useEffect} from 'react'\r\nimport { useGetIdentity, useRedirect } from 'react-admin'\r\nimport AuthService from \"./authProvider\";\r\nimport { withRouter } from 'react-router-dom';\r\nimport queryString from 'query-string';\r\nimport {useLocation,useParams} from 'react-router';\r\nimport { Link } from 'react-router-dom';\r\n \r\n\r\n\r\nfunction VerifyEmail() {\r\n const EmailStatus = {\r\n Verifying: 'Verifying',\r\n Failed: 'Failed'\r\n }\r\n // const [time, setTime] = useState(60)\r\n const [emailStatus, setEmailStatus] = useState(EmailStatus.Verifying);\r\n const loc = useLocation().search;\r\n const redirect = useRedirect();\r\n useEffect(() => { \r\n\r\n//const token = queryString.parse(loc);\r\nconst token = new URLSearchParams(loc).get('verify');\r\n\r\nconst sucessfull = false;\r\n\r\nAuthService.verifyEmail(token)\r\n\r\n.then(() => {\r\n setEmailStatus(EmailStatus.Verifying)\r\n setTimeout(function(){\r\n redirect('/login');\r\n },3000)\r\n \r\n //console.log(response.data.detail)\r\n })\r\n .catch(() => {\r\n setEmailStatus(EmailStatus.Failed);\r\n }\r\n \r\n );\r\n}, []);\r\n\r\nfunction getBody() {\r\n switch (emailStatus) {\r\n case EmailStatus.Verifying:\r\n return <div className='alert alert-success'>Verifikacija uspešna</div>;\r\n case EmailStatus.Failed:\r\n return <div className='alert alert-danger'>Verifikacija ni uspešna </div>;\r\n }\r\n}\r\n\r\n\r\n return (\r\n <div>\r\n <h3 className=\"card-header\">Verifikacija elektronskega naslova</h3>\r\n <div className=\"card-body\">{getBody()}</div>\r\n </div>\r\n )\r\n}\r\n\r\nexport default VerifyEmail\r\n","import moment from 'moment';\nimport {\n Avatar,\n Box,\n Button,\n Card,\n CardActions,\n CardContent,\n Divider,\n Typography\n} from '@material-ui/core';\n\nimport inMemoryJWT from '../inMemoryJWT';\nimport { useGetOne, Loading } from 'react-admin';\n\n\n\n\nconst UserProfile = () => {\n\n\n const token12 = inMemoryJWT.getToken();\n\n if (token12) {\n var userid = \n {\n id: inMemoryJWT.decodeToken(token12)\n }\n }\n\n const { data: user, isLoading, error } = useGetOne( 'Login/GetUser', userid.id );\n\n if (isLoading) { return <Loading />; }\n if (error) { return <p>ERROR</p>; }\n if(user != undefined)\n {\n\n return (\n <Card className='Cardi'>\n <CardContent>\n <Box\n sx={{\n alignItems: 'center',\n display: 'flex',\n flexDirection: 'column'\n }}\n >\n <Avatar className='avatar'\n src={user.name}\n sx={{\n height: 100,\n width: 100,\n padding: 10\n }}\n />\n <Typography\n color=\"textPrimary\"\n gutterBottom\n variant=\"h3\"\n >\n {user.name} {user.surname}\n </Typography>\n <Typography\n color=\"textSecondary\"\n variant=\"body1\"\n >\n {`${moment().format('hh:mm A')}`}\n </Typography>\n </Box>\n </CardContent>\n <Divider />\n <CardActions>\n </CardActions>\n </Card>\n )\n }\n return <div>User</div>;\n};\n\n\nexport default UserProfile;\n","import { useState, useEffect } from 'react';\nimport {\n Box,\n Button,\n Card,\n CardContent,\n CardHeader,\n Divider,\n Grid,\n TextField\n} from '@material-ui/core';\n\n\nimport \"./stili1.css\";\n\nimport inMemoryJWT from '../inMemoryJWT';\nimport { useGetOne, Loading, useUpdate, useRedirect} from 'react-admin';\nimport { notify } from 'react-notify-toast';\nimport { Redirect } from 'react-router-dom';\nimport { stringify } from 'querystring';\nimport AuthServuce from '../authProvider';\nimport Checkbox from '@material-ui/core/Checkbox';\nimport { FormControlLabel } from '@mui/material';\nimport 'react-notifications/lib/notifications.css';\n\nimport {NotificationContainer, NotificationManager} from 'react-notifications';\n\n\nconst token12 = inMemoryJWT.getToken();\n\nif (token12) {\n\nvar userid = \n{\n id: inMemoryJWT.decodeToken(token12)\n}\n}\n\n\n\n\nexport default function UserProfile (props) {\n\n const token12 = inMemoryJWT.getToken();\n\n if (token12) {\n\n var userid = \n {\n id: inMemoryJWT.decodeToken(token12)\n }\n }\n const redirect = useRedirect();\n \n const [values, setValues] = useState({\n firstName: '',\n lastName: '',\n email: '',\n Oldpass: '',\n Newpass: ''\n });\n const [checked, setChecked] = useState(false);\n\n const [error1, setError] = useState(null);\n\n const [update, { error2}] = useUpdate();\n\n const { data: user, isLoading, error } = useGetOne( 'Login/GetUser', userid.id );\n\n\n \n useEffect(() => {\n if(user) {\n setValues({\n firstName: user.name,\n lastName: user.surname,\n email: user.username\n })\n }\n }, [user])\n\n const handleSubmit = (event) => {\n event.preventDefault();\n\n const UpdateData = \n {\n id: event.target.elements.email.value,\n username: event.target.elements.email.value,\n surname: event.target.elements.lastName.value,\n name: event.target.elements.firstName.value\n }\n const PreviousData = \n {\n id: user.username,\n firstName: user.name,\n lastName: user.surname,\n email: user.username\n }\n const uporabnik = user.username;\n let errorOnRes = false;\n\n function isValidEmail(email) {\n return /\\S+@\\S+\\.\\S+/.test(email);\n }\n\n if (!isValidEmail(event.target.email.value)) {\n setError('E-poštni naslov je neveljaven')\n } \n else {\n setError(null);\n \n AuthServuce.UpdateUser(\n {id: uporabnik, data: UpdateData}\n ).then(response => \n {\n if(response == \"Bad Request\")\n {\n NotificationManager.error('Napaka pri spreminjanu podatkov', 'Napaka', 5000, () => {\n errorOnRes = true;\n })\n }\n else if (checked == false)\n {\n NotificationManager.success('Uspešno posodobljeni podatki, sedaj boste preusmerjeni na prijavo', 'Uspešno', 5000, () => {\n AuthServuce.logout();\n setTimeout(function(){\n redirect('/login');\n },5000)\n\n });\n }\n \n },\n error => \n {\n errorOnRes = true;\n } \n )\n \n \n if(checked == true)\n {\n\n const UpdateData = \n {\n username: event.target.elements.email.value,\n surname: event.target.elements.lastName.value,\n name: event.target.elements.firstName.value,\n oldPassword: event.target.elements.Oldpass.value,\n password: event.target.elements.Newpass.value\n }\n\n AuthServuce.UpdatePass(\n {id: uporabnik, data: UpdateData}\n ).then(response => \n {\n if(response == \"Bad Request\")\n {\n NotificationManager.error('Napaka pri spreminjanu gesla', 'Napaka', 5000, () => {\n \n })\n }\n else\n {\n NotificationManager.success('Uspešno posodobljeni podatki, sedaj boste preusmerjeni na prijavo', 'Uspešno');\n AuthServuce.logout();\n setTimeout(function(){\n redirect('/login');\n },5000)\n \n }\n \n }).catch(error => \n {\n \n errorOnRes = true\n });\n }\n\n }\n };\n\n const handleChange = (event) => {\n setValues({\n ...values,\n [event.target.name]: event.target.value\n });\n \n };\n\n\n const handleChange1 = (event) => {\n setChecked(event.target.checked);\n };\n \n if (isLoading) { return <Loading />; }\n if (error) { return <p>ERROR</p>; }\n\n if(user !== undefined)\n {\n return (\n <form\n autoComplete=\"off\"\n noValidate\n onSubmit={handleSubmit}\n className='formi'\n >\n <Card className='Cardi'>\n <CardHeader\n subheader=\"Spremeni podatke o sebi\"\n title=\"Moj profil\"\n />\n <Divider />\n <CardContent>\n <Grid\n container\n spacing={3}\n >\n <Grid\n item\n md={6}\n xs={12}\n >\n <TextField\n fullWidth\n helperText=\"Prosim vnesite svoje ime\"\n label=\"Ime\"\n name=\"firstName\"\n onChange={handleChange}\n required\n value={values.firstName||''}\n variant=\"outlined\"\n />\n </Grid>\n <Grid\n item\n md={6}\n xs={12}\n >\n <TextField\n fullWidth\n label=\"Priimek\"\n name=\"lastName\"\n required\n onChange={handleChange}\n value={values.lastName||''}\n variant=\"outlined\"\n />\n </Grid>\n <Grid\n item\n md={6}\n xs={12}\n >\n <TextField\n fullWidth\n label=\"E poštni naslov\"\n name=\"email\"\n\n required onChange={handleChange}\n value={values.email||''}\n variant=\"outlined\"\n />\n </Grid>\n <Grid\n item\n md={6}\n xs={12}\n >\n <FormControlLabel \n control={\n <Checkbox checked={checked} onChange={handleChange1} label=\"passShow\" className='Cheki'\n sx={{ \"&:hover\": { color: '#f37435' }, fontSize:\"20px\", alignContent:\"center\"}} \n \n />}\n label=\"Spremeni geslo\">\n\n </FormControlLabel>\n \n </Grid>\n \n <Grid\n item\n md={6}\n xs={12}\n >\n {checked &&\n \n <TextField\n fullWidth\n label=\"Staro geslo\"\n name=\"Oldpass\"\n type=\"password\"\n value = {values.Oldpass||''}\n onChange={handleChange}\n variant=\"outlined\"\n />\n }\n </Grid>\n <Grid\n item\n md={6}\n xs={12}\n >\n {checked &&\n <TextField\n fullWidth\n type=\"password\"\n label=\"Novo geslo\"\n name=\"Newpass\"\n value = {values.Newpass||''}\n onChange={handleChange}\n variant=\"outlined\"\n />\n }\n </Grid>\n \n </Grid>\n </CardContent>\n\n <Divider />\n <Box\n sx={{\n display: 'flex',\n justifyContent: 'flex-end',\n p: 2\n }}\n >\n \n \n <Button\n color=\"primary\"\n fullWidth\n variant=\"text\"\n type=\"submit\"\n >\n Shrani spremembe\n </Button>\n <NotificationContainer/>\n </Box>\n \n </Card>\n {error1 && <div className='error'>{error1}</div>}\n </form>\n \n );\n }\n else\n {\n return null;\n }\n};\n\n//export default UserProfile;\n","import { Helmet } from 'react-helmet';\nimport {\n Box,\n Container,\n Grid\n} from '@material-ui/core';\nimport AccountProfile from './AccountProfile';\nimport AccountProfileDetails from './AccountProfileDetails';\n\nconst Account = () => (\n <>\n <Helmet>\n <title>Moj Profil\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n);\n\nexport default Account;\n","// in src/customRoutes.js\r\nimport * as React from \"react\";\r\nimport { Route } from 'react-router-dom';\r\nimport { RouteWithoutLayout } from 'react-admin';\r\n//import Foo from './Foo';\r\nimport Register from './Register';\r\nimport VerifyEmail from \"./VerifyEmail\";\r\nimport Account from \"./profile/Account\"\r\nexport default [\r\n // ,\r\n ,\r\n ,\r\n } />,\r\n];","import * as React from \"react\";\nimport authProvider from \"./authProvider\"\nimport { Admin, DataProvider, Resource ,ListGuesser,EditGuesser } from 'react-admin';\nimport myDataProvider from './dataProvider';\nimport { OrderEdit } from \"./users\";\nimport { PostCreate, PostEdit, PostList } from \"./posts\";\nimport {myTheme} from \"./theme\"\nimport PostIcon from '@material-ui/icons/Book';\nimport UserIcon from '@material-ui/icons/Group';\nimport Dashboard from \"./Dashboard\";\nimport NotFound from './NotFound';\nimport Layout from \"./layout/Layout\";\nimport login from \"./layout/login\";\nimport PostShow from \"./tabbed\";\nimport buildings from \"./buildings\";\nimport { useEffect } from \"react\";\nimport polyglotI18nProvider from 'ra-i18n-polyglot';\nimport ChangePageTitle from \"./ChangePageTitle\";\n\nimport orders from './orders';\nimport moveall from './move'\nimport invoices from './Invoices'\nimport 'bootstrap/dist/css/bootstrap.min.css';\nimport customRoutes from './customRoutes'\ninterface AppProps {\n dataProvider: DataProvider;\n}\nconst App = ({ dataProvider }: AppProps) => {\n\nreturn (\n \n \n \n \n\n \n\n \n \n \n \n );\n \n}\n\nexport default App;","import * as React from 'react';\r\nimport ReactDOM from 'react-dom';\r\n\r\nimport dataProviderFactory from './dataProvider/rest';\r\nimport ChangePageTitle from './ChangePageTitle'\r\nimport App from './App';\r\n\r\n/**\r\n * This demo can work with either a fake REST server, or a fake GraphQL server.\r\n *\r\n * To avoid bundling both libraries, the dataProvider and fake server factories\r\n * use the import() function, so they are asynchronous.\r\n */\r\n\r\n ReactDOM.render(\r\n ,\r\n document.getElementById('root')\r\n );\r\n\r\n"],"sourceRoot":""}