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 { AccessActions, SettingEnum } from '../../Enums'; | |
import { getWord, Y } from '../../Language'; | |
import { action, autorun, computed, observable, toJS } from 'mobx'; | |
import { AsyncDataStatus } from '../types'; | |
import { setAppStore, getApiResult, BaseAppStore } from 'yeganeh-common'; | |
import { getAcrhiveCenterData, getUserArchiveCenter, convertArchiveCenterData } from './actions'; | |
import { EdmsAppStoreLoginInfoModel, EdmsLocalStorageData, CommonLocalStorageData, ThemeModel } from './types'; | |
import { defaultAppStoreLoginInfo, langCodes, LangCodeValue, CommonLocalStorageKeys, EdmsLocalStorageKeys, EdmsLocalStorageVersion, CommonLocalStorageVersion } from './values'; | |
import { numericValidator } from '../validators'; | |
import { redirectIfNeeded } from '../utilities'; |
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
export class DocumentStore { | |
referralStore: ReferralStore; | |
@observable expandedDocumentId: number; | |
documentListType: number; | |
resetList?: () => void; | |
@observable readedDocumentsId: number[] = []; | |
@observable readedReferredId: number[] = []; | |
@observable documentsWithNewNote: number[] = []; | |
@observable newDeletedDocumentNote: number[] = []; | |
@observable confirmingDocument: boolean; |
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 getApiResult from 'ProjectGlobals/getApiResult'; | |
type MultiIdentifierPrintModel = Yeganeh.EDMS.WebApi.Models.Document.MultiIdentifierPrintModel<number>; | |
type ExceptionListPrintModel = Yeganeh.EDMS.WebApi.Models.Document.ExceptionListPrintModel<number>; | |
type ExceptionAdvancedSearchPrintModel = Yeganeh.EDMS.WebApi.Models.Document.ExceptionAdvancedSearchPrintModel; | |
export const downloadDocumentAttachments = (dataSent: MultiIdentifierPrintModel) => { | |
return getApiResult.delete<string>(['Document', 'PrintDocuments'], dataSent); | |
}; |
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 * as React from 'react'; | |
import { Omit, removeKeys } from '../utilities'; | |
export interface Props { | |
label: string | React.Component; | |
value?: any; | |
error?: string; | |
onChange: (newValue?: any) => void; | |
isRequired?: boolean; | |
focused?: boolean; |
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 React from 'react'; | |
import { Query } from 'react-apollo'; | |
import ScreenFocusHook from './screenFocusHook'; | |
const ProductQuery = (props) => { | |
const navigation = props.navigation; | |
const getProductsQuery = /* your grahql query here */ | |
const [setCallBack] = ScreenFocusHook(navigation); | |
return (<Query query={getProductsQuery} notifyOnNetworkStatusChange> |
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 { useEffect, useRef } from 'react'; | |
const ScreenFocusHook = (navigation) => { | |
const _didFocusSubscription = useRef(); | |
const callBack = useRef(); | |
useEffect(() => { | |
_didFocusSubscription.current = navigation.addListener( | |
'didFocus', | |
payload => { | |
console.log('focus'); |
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
var express = require('express'); | |
var express_graphql = require('express-graphql'); | |
var { schema, root} = require('./schema'); | |
var isAuth = require('./middleware/is-auth'); | |
var app = express(); | |
app.use(isAuth) | |
app.use('/graphql', express_graphql({ | |
schema: schema, | |
rootValue: root, |
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
var express = require('express'); | |
var express_graphql = require('express-graphql'); | |
var { schema, root} = require('./schema'); | |
var app = express(); | |
app.use('/graphql', express_graphql({ | |
schema: schema, | |
rootValue: root, | |
graphiql: true | |
})); |
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
var { buildSchema } = require('graphql'); | |
var { MoviesList } = require('./movie-list'); | |
var schema = buildSchema(` | |
type Query { | |
movieInfo(id: Int!): Movie | |
movieList(rate: String): [Movie] | |
}, | |
type Movie { | |
id: Int |
NewerOlder