diff --git a/src/components/App/ConceptSection.vue b/src/components/App/ConceptSection.vue
index 9e1909b..63bc2cd 100644
--- a/src/components/App/ConceptSection.vue
+++ b/src/components/App/ConceptSection.vue
@@ -17,6 +17,7 @@ const form = useForm({
legal_instrument: "",
article: "",
content: "",
+ motivation: "",
min_amount_uma: "",
max_amount_uma: "",
min_amount_peso: "",
@@ -35,6 +36,7 @@ const resetForm = () => {
form.legal_instrument = "";
form.article = "";
form.content = "";
+ form.motivation = "";
form.min_amount_uma = "";
form.max_amount_uma = "";
form.min_amount_peso = "";
@@ -91,6 +93,14 @@ const isFixedType = computed(() => {
);
});
+const conceptTypeId = computed(() => {
+ return typeof form.concept_type === "object" && form.concept_type?.id
+ ? form.concept_type.id
+ : form.concept_type;
+});
+
+const isFineConcept = computed(() => conceptTypeId.value === "fine");
+
/** Cargar cosas */
onMounted(async () => {
api.get(apiURL("directions"), {
@@ -114,16 +124,23 @@ const handleSubmit = () => {
? form.direction_id.id
: Number(form.direction_id),
unit_id:
- typeof form.unit_id === "object" ? form.unit_id.id : Number(form.unit_id),
+ form.unit_id != null
+ ? typeof form.unit_id === "object"
+ ? form.unit_id.id
+ : Number(form.unit_id)
+ : null,
concept_type:
typeof form.concept_type === "object"
? form.concept_type.id
: String(form.concept_type),
short_name: form.short_name,
name: form.name,
- legal_instrument: form.legal_instrument,
- article: form.article,
- content: form.content,
+ ...(isFineConcept.value && {
+ legal_instrument: form.legal_instrument,
+ article: form.article,
+ content: form.content,
+ motivation: form.motivation,
+ }),
charge_type: chargeTypeId.value,
};
@@ -218,29 +235,39 @@ const handleSubmit = () => {
required
/>
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/components/App/PhotoUpload.vue b/src/components/App/PhotoUpload.vue
new file mode 100644
index 0000000..b1d4bce
--- /dev/null
+++ b/src/components/App/PhotoUpload.vue
@@ -0,0 +1,31 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/lang/es.js b/src/lang/es.js
index 409ff96..d00cf0a 100644
--- a/src/lang/es.js
+++ b/src/lang/es.js
@@ -114,6 +114,7 @@ export default {
shortName: 'Nombre Corto',
name: 'Nombre',
legal: 'Instrumento Legal',
+ motivation: 'Motivación',
article: 'Articulado',
description: 'Contenido',
chargeType: 'Tipo de Cobro',
@@ -153,6 +154,10 @@ export default {
},
membership: {
title: 'Membresías',
+ curp: 'CURP',
+ name: 'Nombre',
+ tutor: 'Tutor',
+ photo: 'Foto',
create: {
title: 'Crear membresía',
description: 'Permite crear nuevas membresías.',
diff --git a/src/pages/App/Concept/Modal/Edit.vue b/src/pages/App/Concept/Modal/Edit.vue
index 400c45d..ffa2b8b 100644
--- a/src/pages/App/Concept/Modal/Edit.vue
+++ b/src/pages/App/Concept/Modal/Edit.vue
@@ -89,13 +89,16 @@ const editIsFixedType = computed(() => {
const handleUpdate = async () => {
const transformedData = {
direction_id: typeof props.model.direction === 'object' ? props.model.direction.id : Number(props.model.direction_id),
- unit_id: props.model.unit ? (typeof props.model.unit === 'object' ? props.model.unit.id : Number(props.model.unit)) : null,
+ unit_id: editIsFixedType.value && props.model.unit
+ ? (typeof props.model.unit === 'object' ? props.model.unit.id : Number(props.model.unit))
+ : null,
short_name: props.model.short_name,
concept_type: props.model.concept_type,
name: props.model.name,
legal_instrument: props.model.legal_instrument,
article: props.model.article,
content: props.model.content,
+ motivation: props.model.motivation,
charge_type: editChargeTypeId.value,
// Campos UMA para tipos de rango
min_amount_uma: (editShowUmaFields.value && editIsRangeType.value && props.model.min_amount_uma) ? Number(props.model.min_amount_uma) : null,
@@ -161,20 +164,20 @@ const handleUpdate = async () => {
v-model="model.legal_instrument"
:id="$t('concept.legal')"
type="text"
- required
/>
-
+
{
required
/>
-
+
+
{
required
/>
-
-
-
{
required
/>
{
/>
-
-
-
diff --git a/src/pages/App/Membership/Create.vue b/src/pages/App/Membership/Create.vue
index baef13a..00474d3 100644
--- a/src/pages/App/Membership/Create.vue
+++ b/src/pages/App/Membership/Create.vue
@@ -1,47 +1,31 @@
diff --git a/src/pages/App/Membership/Form.vue b/src/pages/App/Membership/Form.vue
index 54d60cf..dd31fe2 100644
--- a/src/pages/App/Membership/Form.vue
+++ b/src/pages/App/Membership/Form.vue
@@ -2,66 +2,73 @@
import { transl } from './Module';
import PrimaryButton from '@Holos/Button/Primary.vue';
-import Input from '@Holos/Form/Input.vue';
+import Input from '@Holos/Form/Input.vue';
+import PhotoUpload from '@App/PhotoUpload.vue';
/** Eventos */
-const emit = defineEmits([
- 'submit'
-])
+const emit = defineEmits(['submit']);
/** Propiedades */
defineProps({
- action: {
- default: 'create',
- type: String
- },
- form: Object
-})
+ action: {
+ default: 'create',
+ type: String,
+ },
+ form: Object,
+});
/** Métodos */
function submit() {
- emit('submit')
+ emit('submit');
}
-
-
+
+
\ No newline at end of file