Skip to content

Instantly share code, notes, and snippets.

{
"data":{
"getBillRegisters":[
{
"billPayId":"17520f30-d7ed-4cbc-a527-240b063c2e28",
"specialSchoolOrgId":"56466515-8770-4db8-930e-5780c5482c2b",
"billType":"PURCHASE",
"financialYear":"2022-23",
"specialSchoolName":"Kahaniya",
"billDate":"2011-10-17T00:00:00.000Z",
@socialwell-demos
socialwell-demos / renderList.js
Created June 23, 2022 08:31
React Native render list example using react.js
const renderUsersItem = ({ item }) => {
if (!item) {
return null;
}
const handlerLongClick = (id) => {
console.log(id)
}
const [first, last] = item.name.split(' ');
return (
<TouchableOpacity
@socialwell-demos
socialwell-demos / ScrollView.js
Created June 23, 2022 08:30
React Native ScrollView git example in react.js
<ScrollView
horizontal={true}
nestedScrollEnabled={true}
style={{ backgroundColor: '#fff', marginTop: 4,marginLeft:20 }}
>
<View style={{ flexDirection: 'column' }}>
<TableHeader />
<FlatList
data={mockDB}
renderItem={renderUsersItem}
@socialwell-demos
socialwell-demos / TableHeader.js
Created June 23, 2022 08:27
React Native Table Component TableHeader
import React from 'react'
import {View,Text,StyleSheet} from 'react-native'
import { color } from 'react-native-reanimated'
const TableHeader=()=> {
return (
<View style={styles.tableHeading}>
<Text style={styles.tableHeadingText}>Name</Text>
<Text style={styles.tableHeadingText}>Address</Text>
<Text style={styles.tableHeadingText}>Contact</Text>
<Text style={styles.tableHeadingTextStatus}>Tags</Text>
@socialwell-demos
socialwell-demos / User.ts
Last active June 9, 2022 10:04
Keystone Schema User
import { list } from '@keystone-6/core';
import { password, select, text } from '@keystone-6/core/fields';
export const User = list({
fields: {
name: text({ validation: { isRequired: true } }),
email: text({
validation: { isRequired: true },
isIndexed: 'unique',
isFilterable: true,
@socialwell-demos
socialwell-demos / virtual.ts
Created June 9, 2022 09:52
Keystone Virtual Field
import { list, graphql } from '@keystone-6/core';
import {
text,
virtual,
} from '@keystone-6/core/fields';
export const Producer = list({
fields: {
firstName: text({ validation: { isRequired: true }, isFilterable: true }),
middleName: text({ isFilterable: true }),
@socialwell-demos
socialwell-demos / schema.ts
Created June 8, 2022 15:00
Keystone List
import { list } from '@keystone-6/core';
import { select, relationship, text, timestamp } from '@keystone-6/core/fields';
export const lists = {
Post: list({
fields: {
title: text({ validation: { isRequired: true } }),
status: select({
type: 'enum',
options: [