Skip to content

Instantly share code, notes, and snippets.

View sofyan-rs's full-sized avatar
😌
Santuy Aja Gan

Sofyan R. sofyan-rs

😌
Santuy Aja Gan
View GitHub Profile
export interface OrderDetails {
id: string;
noOrder: string;
idCustomer: string;
customerName: string;
address: string;
idCafe: string;
paymentMethod: string;
totalPrice: number;
fee: number;
import {View, Text, TouchableOpacity} from 'react-native';
import React, {useState} from 'react';
import {HelpIcon} from '../../../../../components/Icons/IconsGeneral';
import {color, fontWeight, fontSize} from '../../../../../lib/theme';
import {
formatNumber,
formatNumberRemoveNegative,
} from '../../../../../lib/utils/formatter/formatNumber';
import ShimmerLoader from '../../../../../components/UI/Loader/ShimmerLoader';
import {SummaryReportData} from '../../../../../types/report/reportType';
// TableReservation.tsx
import React, {useState, useRef, useEffect, useContext} from 'react';
import {
View,
Text,
ScrollView,
TouchableOpacity,
Alert,
NativeSyntheticEvent,
NativeScrollEvent,
/* eslint-disable react-native/no-inline-styles */
import {Text} from 'react-native';
import React, {useContext, useState} from 'react';
import PopupModal from '../../../../../../components/UI/Modal/PopupModal';
import ButtonSubmit from '../../../../../../components/UI/Button/ButtonSubmit';
import {fontWeight, fontSize} from '../../../../../../lib/theme';
import FastImage from 'react-native-fast-image';
import {ImgIllust} from '../../../../../../assets/assets-path/img/illust';
import {PrinterCategory} from '../../../../../../types/setting/printerEnum';
import AsyncStorage from '@react-native-async-storage/async-storage';
import {PermissionsAndroid, Platform} from 'react-native';
import {ToastMessage} from '../../components/UI/Toast/ToastMessage';
import DeviceInfo from 'react-native-device-info';
import {formatDate} from './formatter/formatDate';
import {SummaryReportData} from '../../models/reportModels';
import XLSX from 'xlsx';
import RNFS from 'react-native-fs';
export const generateExcel = async ({
data,
{
// Open json editor for settings
"workbench.settings.editor": "json",
// Font
"editor.fontFamily": "Dank Mono, Monolisa",
"scm.inputFontFamily": "Dank Mono, Monolisa",
"terminal.integrated.fontFamily": "Dank Mono, Monolisa",
"chat.editor.fontFamily": "Dank Mono, Monolisa",
"debug.console.fontFamily": "Dank Mono, Monolisa",
@sofyan-rs
sofyan-rs / function.php
Created November 2, 2022 03:05
Fungsi untuk menghapus global css, gutenberg libray, dan emoji pada halaman frontend website
<?php
// Remove Global CSS
function remove_global_css() {
remove_action( 'wp_enqueue_scripts', 'wp_enqueue_global_styles' );
remove_action( 'wp_body_open', 'wp_global_styles_render_svg_filters' );
}
add_action( 'init', 'remove_global_css' );
// Remove Gutenberg Block Library CSS from loading on the frontend
function remove_wp_block_library_css(){
# Run this app with `python app.py` and
# visit http://127.0.0.1:8050/ in your web browser.
# Importing Packages
from dash import Dash, html, dash_table, Input, Output, callback
import plotly.express as px
import pandas as pd
# Tailwind CSS
external_script = ["https://tailwindcss.com/", {"src": "https://cdn.tailwindcss.com"}]
<?php
class GoogleTranslate
{
/**
* @param string $source
* @param string $target
* @param string $text
* @return string
*/
<?php
//Simple function for Beta Plugin soon will be packages
function ktgc_getNumber($title){
preg_match('/Episode(.*)/',$title, $matches);
return explode(' ',$matches[1])[1];
}
function ktgc_single_content($url,$host,$key) {
$king = getPagec('https://app.kinggrabber.com/api/v1/host/'.$host.'/?url='.$url,$key);
$json = json_decode($king);
if($json->code == 200 && $json->title != ''){