From 6e09f6dfc10d6c7b156e93a5811445f260b1ed21 Mon Sep 17 00:00:00 2001 From: Aaron Louie Date: Mon, 21 Sep 2020 17:43:17 -0400 Subject: [PATCH] Moves LabelLayout to models --- components/Print.tsx | 2 +- config/example.tsx | 5 +++-- models/ElementProps.tsx | 2 +- {components => models}/LabelLayout.tsx | 0 4 files changed, 5 insertions(+), 4 deletions(-) rename {components => models}/LabelLayout.tsx (100%) diff --git a/components/Print.tsx b/components/Print.tsx index cc0ec06..9c6d95f 100644 --- a/components/Print.tsx +++ b/components/Print.tsx @@ -8,7 +8,7 @@ import QRCode from 'react-native-qrcode-svg'; import {defaults} from '../config/default'; import {BarCodeProps, ButtonProps, PrintingProps} from '../models/ElementProps'; import {Sample} from '../models/Sample'; -import {labelLayouts} from './LabelLayout'; +import {labelLayouts} from '../models/LabelLayout'; import {colors, styles} from './Styles'; const qrcode = require('qrcode'); diff --git a/config/example.tsx b/config/example.tsx index 2507352..3ec8d79 100644 --- a/config/example.tsx +++ b/config/example.tsx @@ -3,7 +3,8 @@ Then modify the values below to match the actual Firebase configuration. */ import {AppDefaults} from '../models/Default'; -import {CameraType, LabelLayout} from '../models/ElementProps'; +import {CameraType} from '../models/ElementProps'; +import {LabelLayoutType} from '../models/LabelLayout'; // Firebase project config from https://console.firebase.google.com > Project Settings > General > Your apps > Web App export const firebaseConfig = { @@ -23,7 +24,7 @@ export const defaults: AppDefaults = { dateEncodedFormat: 'yyyyMMddHHmm', // Format for dates when encoded in IDs for database records. dateDisplayFormat: 'MM/dd/yyyy, hh:mm aa', // Format for dates when displayed to user. numCopies: 2, // Default number of copies of labels to print. Can be overridden by user setting. - labelLayout: 'round_32mm_1up' as LabelLayout, // Which label layout to use for printing. Can be overridden by user setting. + labelLayout: 'round_32mm_1up' as LabelLayoutType, // Which label layout to use for printing. Can be overridden by user setting. cameraType: 'back' as CameraType, // Which camera to use for capturing bar codes. Can be overridden by user setting. locationId: '0000', // Default location ID. Can be overridden by user setting. lineCountRegex: /^[\d]{4}-[\d]{12}$/, // ID format for Line Count records. diff --git a/models/ElementProps.tsx b/models/ElementProps.tsx index 7600258..03428e3 100644 --- a/models/ElementProps.tsx +++ b/models/ElementProps.tsx @@ -1,5 +1,5 @@ import {BarCodeScannedCallback} from 'expo-barcode-scanner'; -import {LabelLayoutType} from '../components/LabelLayout'; +import {LabelLayoutType} from './LabelLayout'; import {BarcodeScannerAppState} from './BarcodeScannerAppState'; import * as firebase from 'firebase'; import 'firebase/firestore'; diff --git a/components/LabelLayout.tsx b/models/LabelLayout.tsx similarity index 100% rename from components/LabelLayout.tsx rename to models/LabelLayout.tsx