Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
17 changed files
with
292 additions
and
27 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
28 changes: 28 additions & 0 deletions
28
database/migrations/2023_06_19_021659_add_original_field_to_document_chunks.php
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<?php | ||
|
||
use Illuminate\Database\Migrations\Migration; | ||
use Illuminate\Database\Schema\Blueprint; | ||
use Illuminate\Support\Facades\Schema; | ||
|
||
return new class extends Migration | ||
{ | ||
/** | ||
* Run the migrations. | ||
*/ | ||
public function up(): void | ||
{ | ||
Schema::table('document_chunks', function (Blueprint $table) { | ||
$table->longText('original_content')->nullable(); | ||
}); | ||
} | ||
|
||
/** | ||
* Reverse the migrations. | ||
*/ | ||
public function down(): void | ||
{ | ||
Schema::table('document_chunks', function (Blueprint $table) { | ||
// | ||
}); | ||
} | ||
}; |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
<template> | ||
<AppLayout title="transformer Web File"> | ||
<template #header> | ||
<h2 class="font-semibold text-xl text-gray-800 leading-tight"> | ||
Web Site Document | ||
</h2> | ||
<div> | ||
<div class="max-w-7xl mx-auto py-10 sm:px-6 lg:px-8"> | ||
<FormWrapper @submitted="submit"> | ||
<div> | ||
<div class="max-w-7xl mx-auto sm:py-10 sm:px-6 lg:px-8"> | ||
<FormSection> | ||
<template #title> | ||
{{ details.title }} | ||
</template> | ||
<template #description> | ||
{{ details.description }} | ||
</template> | ||
|
||
<template #form> | ||
<ResourceForm | ||
@removedMapping="updateMappings" | ||
@addedMapping="updateMappings" | ||
v-model="form"/> | ||
</template> | ||
|
||
<template #actions> | ||
<PrimaryButton @click="submit">Save</PrimaryButton> | ||
</template> | ||
|
||
</FormSection> | ||
</div> | ||
</div> | ||
</FormWrapper> | ||
</div> | ||
</div> | ||
</template> | ||
</AppLayout> | ||
</template> | ||
|
||
<script setup> | ||
import AppLayout from "@/Layouts/AppLayout.vue"; | ||
import FormWrapper from "@/Components/FormWrapper.vue"; | ||
import FormSection from "@/Components/FormSection.vue"; | ||
import PrimaryButton from '@/Components/PrimaryButton.vue'; | ||
import { useForm } from "@inertiajs/vue3"; | ||
import {useToast} from "vue-toastification"; | ||
import ResourceForm from "./Partials/ResourceForm.vue"; | ||
const toast = useToast(); | ||
const props = defineProps({ | ||
transformer: Object, | ||
details: Object | ||
}) | ||
const updateMappings = (mappings) => { | ||
form.mappings = mappings; | ||
} | ||
const form = useForm({ | ||
mappings: props.transformer.meta_data?.mappings ?? [] | ||
}) | ||
const submit = () => { | ||
form.put(route("transformers.json_transformer.update", { | ||
project: props.transformer.project_id, | ||
transformer: props.transformer.id | ||
}), { | ||
preserveScroll: true, | ||
onError: params => { | ||
toast.error("Check validation") | ||
} | ||
}); | ||
} | ||
</script> | ||
<style scoped> | ||
</style> |
Oops, something went wrong.