This file contains hidden or 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
// app/api/report/route.ts | |
import {ErrorReport, Report} from "@/components/reports/Report"; // Import components | |
export async function GET(req: NextRequest) { | |
const response = await makeAPIRequestToTheBackend() | |
const component = response?.status | |
? Report({record: response?.data}) |
This file contains hidden or 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
// components/reports/Report.tsx | |
import {Document, Page, Font} from "@react-pdf/renderer"; | |
import {PImage, PLink, PText, PView} from "@/components/pdf-ui"; | |
Font.register({ | |
family: "Work Sans", | |
fonts: [ | |
{ |
This file contains hidden or 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 {createTw} from "react-pdf-tailwind"; | |
import {Image, Link, Text, View} from "@react-pdf/renderer"; | |
import {ComponentProps} from "react"; | |
import {Style, SVGPresentationAttributes} from "@react-pdf/types"; | |
type PropsWithClassName<T> = T & {className?: string} | |
const mergeStyles = (...styles: (Style | Style[] | SVGPresentationAttributes | undefined)[]) => { | |
const merged: Style = {}; |
This file contains hidden or 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 { AppNavHookType } from '@navigation/navigators' | |
import { useNavigation } from '@react-navigation/native' | |
/** | |
* AnimatedBox, Box, Text, TextInput | |
* These UI components are extensions of styled-components + custom styles | |
* e.g | |
* export const Box = styled.View<BoxProps>`` | |
* export const Text = styled.Text<TextProps>`` | |
* export const AnimatedBox = Reanimated.createAnimatedComponent(Box) |
This file contains hidden or 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
{ | |
"data": [ | |
{ | |
"name": "9mobile 9Payment Service Bank", | |
"code": "120001" | |
}, | |
{ | |
"name": "Abbey Mortgage Bank", | |
"code": "404" | |
}, |
This file contains hidden or 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
https://webhook.site/9e6b306e-e3b5-4d62-b385-f13a18215e9c |
This file contains hidden or 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
#!/bin/bash | |
# source http://stackoverflow.com/questions/23222616/copy-all-keys-from-one-db-to-another-in-redis | |
#set connection data accordingly | |
source_host=localhost | |
source_port=6379 | |
source_db=1 | |
target_host=localhost | |
target_port=6379 | |
target_db=2 |
This file contains hidden or 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
<?php | |
/** | |
* | |
* SugarCRM Community Edition is a customer relationship management program developed by | |
* SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc. | |
* | |
* SuiteCRM is an extension to SugarCRM Community Edition developed by SalesAgility Ltd. | |
* Copyright (C) 2011 - 2018 SalesAgility Ltd. | |
* | |
* This program is free software; you can redistribute it and/or modify it under |
This file contains hidden or 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
<?php | |
... | |
// custom/modules/AOS_PDF_Templates/generatePdfSendMail.php | |
if ($task == 'pdf' || $task == 'emailpdf') { | |
$file_name = $mod_strings['LBL_PDF_NAME'] . "_" . str_replace(" ", "_", $bean->name) . ".pdf"; | |
ob_clean(); | |
try { | |
$orientation = ($template->orientation == "Landscape") ? "-L" : ""; |
This file contains hidden or 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
<?php | |
// custom/include/MVC/Controller/entry_point_registry.php | |
$entry_point_registry['generatePdfSendMail'] = array( | |
'file' => 'custom/modules/AOS_PDF_Templates/generatePdfSendMail.php', | |
'auth' => '0' | |
); |
NewerOlder