Change to just full name
This commit is contained in:
@@ -18,7 +18,6 @@
|
||||
let savedSheetInfo = $state<SheetInfoType | null>(null);
|
||||
let mappedIndices = $state<ColumnMappingType>({
|
||||
name: -1,
|
||||
surname: -1,
|
||||
nationality: -1,
|
||||
birthday: -1,
|
||||
pictureUrl: -1,
|
||||
@@ -27,8 +26,7 @@
|
||||
});
|
||||
|
||||
const requiredFields = [
|
||||
{ key: 'name', label: 'First Name', required: true },
|
||||
{ key: 'surname', label: 'Last Name', required: true },
|
||||
{ key: 'name', label: 'Full Name', required: true },
|
||||
{ key: 'nationality', label: 'Nationality', required: true },
|
||||
{ key: 'birthday', label: 'Birthday', required: true },
|
||||
{ key: 'pictureUrl', label: 'Photo URL', required: true },
|
||||
@@ -65,7 +63,6 @@
|
||||
// Set the mapped indices from saved data
|
||||
mappedIndices = {
|
||||
name: savedSheet.columnMapping.name,
|
||||
surname: savedSheet.columnMapping.surname,
|
||||
nationality: savedSheet.columnMapping.nationality,
|
||||
birthday: savedSheet.columnMapping.birthday,
|
||||
pictureUrl: savedSheet.columnMapping.pictureUrl,
|
||||
@@ -123,7 +120,6 @@
|
||||
previewData = [];
|
||||
mappedIndices = {
|
||||
name: -1,
|
||||
surname: -1,
|
||||
nationality: -1,
|
||||
birthday: -1,
|
||||
pictureUrl: -1,
|
||||
@@ -182,7 +178,6 @@
|
||||
// Reset mappings
|
||||
mappedIndices = {
|
||||
name: -1,
|
||||
surname: -1,
|
||||
nationality: -1,
|
||||
birthday: -1,
|
||||
pictureUrl: -1,
|
||||
@@ -192,8 +187,7 @@
|
||||
|
||||
// Auto-mapping patterns
|
||||
const patterns: Record<keyof Omit<ColumnMappingType, 'sheetName'>, RegExp> = {
|
||||
name: /first[\s_-]*name|name|given[\s_-]*name|vorname/i,
|
||||
surname: /last[\s_-]*name|surname|family[\s_-]*name|nachname/i,
|
||||
name: /full[\s_-]*name|name/i,
|
||||
nationality: /nationality|country|nation/i,
|
||||
birthday: /birth|date[\s_-]*of[\s_-]*birth|birthday|dob/i,
|
||||
pictureUrl: /photo|picture|image|url|avatar/i,
|
||||
@@ -262,8 +256,7 @@
|
||||
// Override auto-mapping with saved mapping
|
||||
mappedIndices = {
|
||||
name: savedSheet.columnMapping.name ?? -1,
|
||||
surname: savedSheet.columnMapping.surname ?? -1,
|
||||
nationality: savedSheet.columnMapping.nationality ?? -1,
|
||||
nationality: savedSheet.columnMappin.nationality ?? -1,
|
||||
birthday: savedSheet.columnMapping.birthday ?? -1,
|
||||
pictureUrl: savedSheet.columnMapping.pictureUrl ?? -1,
|
||||
alreadyPrinted: savedSheet.columnMapping.alreadyPrinted ?? -1,
|
||||
@@ -286,7 +279,6 @@
|
||||
if (!mappedIndices) {
|
||||
mappedIndices = {
|
||||
name: -1,
|
||||
surname: -1,
|
||||
nationality: -1,
|
||||
birthday: -1,
|
||||
pictureUrl: -1,
|
||||
@@ -306,7 +298,6 @@
|
||||
// Only check required fields for completion
|
||||
const requiredIndices = {
|
||||
name: mappedIndices.name,
|
||||
surname: mappedIndices.surname,
|
||||
nationality: mappedIndices.nationality,
|
||||
birthday: mappedIndices.birthday,
|
||||
pictureUrl: mappedIndices.pictureUrl,
|
||||
@@ -319,7 +310,6 @@
|
||||
// Update the column mapping store
|
||||
columnMapping.set({
|
||||
name: mappedIndices.name,
|
||||
surname: mappedIndices.surname,
|
||||
nationality: mappedIndices.nationality,
|
||||
birthday: mappedIndices.birthday,
|
||||
pictureUrl: mappedIndices.pictureUrl,
|
||||
@@ -343,7 +333,6 @@
|
||||
|
||||
const columnMappingData = {
|
||||
name: mappedIndices.name,
|
||||
surname: mappedIndices.surname,
|
||||
nationality: mappedIndices.nationality,
|
||||
birthday: mappedIndices.birthday,
|
||||
pictureUrl: mappedIndices.pictureUrl,
|
||||
@@ -434,7 +423,7 @@
|
||||
>
|
||||
<path
|
||||
fill-rule="evenodd"
|
||||
d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a1 1 0 000 2v3a1 1 0 001 1h1a1 1 0 100-2v-3a1 1 0 00-1-1H9z"
|
||||
d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zm-4 4a1 1 0 000 2v3a1 1 0 001 1h1a1 1 0 100-2v-3a1 1 0 00-1-1H9z"
|
||||
clip-rule="evenodd"
|
||||
/>
|
||||
</svg>
|
||||
|
||||
Reference in New Issue
Block a user