This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[{"Gov":"Ariana","Deleg":"Sidi Thabet","Cite":"Cite Dridi","zip":"2032"}, | |
{"Gov":"Ariana","Deleg":"La Soukra","Cite":"Cite Fateh","zip":"2036"}, | |
{"Gov":"Ariana","Deleg":"Sidi Thabet","Cite":"Cite El Bokri","zip":"2032"}, | |
{"Gov":"Ariana","Deleg":"La Soukra","Cite":"Cite Fonciere","zip":"2036"}, | |
{"Gov":"Ariana","Deleg":"Sidi Thabet","Cite":"Cite El Frachich","zip":"2032"}, | |
{"Gov":"Ariana","Deleg":"La Soukra","Cite":"Cite Snit","zip":"2036"}, | |
{"Gov":"Ariana","Deleg":"Raoued","Cite":"Cite El Mouaouiet","zip":"2081"}, | |
{"Gov":"Ariana","Deleg":"Sidi Thabet","Cite":"Cite El Ghribi","zip":"2032"}, | |
{"Gov":"Ariana","Deleg":"La Soukra","Cite":"Cite Touilia","zip":"2036"}, | |
{"Gov":"Ariana","Deleg":"Raoued","Cite":"Cite El Mountazeh","zip":"2081"}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export const copyToClipboard = (text: string) => { | |
navigator.clipboard.writeText(text); | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export const paginationAggregate = ( page: number) => { | |
//Max Items | |
const limit = 10; | |
const skip = (page - 1) * limit; | |
return [ | |
{ | |
$unwind: '$total', | |
}, | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export const formatPaginatedResponse = (rows: unknown[], count: number, page: string) => { | |
const itemsPerPage = Number(process.env.ITEMS_PER_PAGE); | |
const currentPage = Math.max(Number(page), 1) || 1; | |
return { | |
page: currentPage, | |
totalItems: count, | |
hasNextPage: itemsPerPage * displayPage < count, | |
totalPages: Math.max(Math.floor(count / itemsPerPage) + (count % itemsPerPage === 0 ? 0 : 1), 1), | |
items: rows, | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, {useEffect, MouseEvent} from 'react'; | |
import {useSelector} from 'react-redux'; | |
import {fetchUsers, usersSelector, createUser} from './slices/users'; | |
import {useAppDispatch} from './store'; | |
import {User} from './store/user/user'; | |
import './styles.scss'; | |
const Users = () => { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import {createSlice, PayloadAction} from '@reduxjs/toolkit'; | |
import {User} from '../store/user/user'; | |
import {RootState} from '.'; | |
import {AppDispatch, AppThunk} from '../store'; | |
export type UsersState = { | |
loading: boolean; | |
hasErrors: boolean; | |
users: User[]; | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@FXML | |
private void telecharger(ActionEvent event) throws SQLException { | |
Reservation_hotes res = new Reservation_hotes(); | |
res = table_reserv.getSelectionModel().getSelectedItem(); | |
ReservationPdf pdf = new ReservationPdf(); | |
pdf.Reservation( | |
res.getNumero_reservation(), | |
res.getDate_debut(), | |
res.getNb_jours(), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
{ | |
"compilerOptions": { | |
"module": "commonjs", | |
"moduleResolution": "node", | |
"target": "ESNext", | |
"removeComments": true, | |
"allowSyntheticDefaultImports": true, | |
"jsx": "react", | |
"allowJs": true, | |
"baseUrl": "src", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import path from "path"; | |
import { Configuration, DefinePlugin } from "webpack"; | |
import HtmlWebpackPlugin from "html-webpack-plugin"; | |
import ForkTsCheckerWebpackPlugin from "fork-ts-checker-webpack-plugin"; | |
import TsconfigPathsPlugin from "tsconfig-paths-webpack-plugin"; | |
const webpackConfig = (): Configuration => ({ | |
entry: "./src/index.tsx", | |
...(process.env.production || !process.env.development | |
? {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"compilerOptions": { | |
"lib": ["dom", "dom.iterable", "esnext"], | |
"allowJs": true, | |
"allowSyntheticDefaultImports": true, | |
"skipLibCheck": true, | |
"esModuleInterop": true, | |
"strict": true, | |
"forceConsistentCasingInFileNames": true, | |
"moduleResolution": "node", |
NewerOlder