update

parent 93e885ce
......@@ -332,7 +332,6 @@ export type DetailUnit = {
contracts: Array<Contract>;
classification: Array<ClassificationOptions>;
taxCode: string;
classificatonId: Array<ClassificationOptions>;
};
export type CustomerType = {
......
......@@ -6,7 +6,7 @@
<q-item style="padding-left: 10px; padding-right: 0px">
<q-item-section
><q-item-label class="text-h6 text-weight-regular">
Danh sách sản phẩm
Danh sách sản phẩm 123
</q-item-label></q-item-section
>
<q-item-section style="padding-right: 10px">
......@@ -139,7 +139,7 @@ export default defineComponent({
(value) => {
if (value) {
selected.value = [];
keyWord.value = '';
keyWord.value = null;
void listProductNotActive();
}
}
......@@ -201,7 +201,7 @@ export default defineComponent({
const configImg = config;
const keyWord = ref('');
const keyWord = ref(null);
const selected: Ref<listProductNotActives[]> = ref([]);
const getSelectedString = () => {
return selected.value.length === 0
......@@ -272,7 +272,7 @@ export default defineComponent({
pageSize: pageSize.value,
name: '',
artistName: '',
keyWord: keyWord.value === '' ? '' : keyWord.value.trim(),
keyWord: keyWord.value === null ? null : keyWord.value,
},
})) as AxiosResponse<
BaseResponseBody<
......
......@@ -9,11 +9,14 @@
<q-card-section class="q-pa-none">
<q-item>
<q-item-section>
<q-item-label class="text-h6 text-weight-regular">{{
isUpdate
? $t('managingUnit.dialogLabel.title.add')
: $t('managingUnit.dialogLabel.title.update')
}}</q-item-label>
<q-item-label class="text-h6 text-weight-regular"
>{{
isUpdate
? $t('managingUnit.dialogLabel.title.add')
: $t('managingUnit.dialogLabel.title.update')
}}
123
</q-item-label>
</q-item-section>
</q-item>
</q-card-section>
......@@ -841,6 +844,7 @@ export default defineComponent({
};
const addNewArtist = () => {
console.log(artistField.value, 'artistField.value');
const newArtistList = [...props.artistList];
newArtistList.push({
......@@ -853,6 +857,7 @@ export default defineComponent({
artistFullName: artistName.value?.fullName,
field: artistField.value?.name,
fieldId: artistField.value?.id,
fieldNames: artistField.value?.name,
});
context.emit('update:artistList', [...newArtistList]);
console.log(newArtistList, 'newArtistList');
......
......@@ -15,11 +15,13 @@
<q-card-section class="q-pa-none">
<q-item>
<q-item-section>
<q-item-label class="text-h6 text-weight-regular">{{
isUpdate
? $t('managingUnitAdd.dialogLabel.title.add')
: $t('managingUnitAdd.dialogLabel.title.update')
}}</q-item-label>
<q-item-label class="text-h6 text-weight-regular"
>{{
isUpdate
? $t('managingUnitAdd.dialogLabel.title.add')
: $t('managingUnitAdd.dialogLabel.title.update')
}}
</q-item-label>
</q-item-section>
</q-item>
</q-card-section>
......@@ -217,16 +219,26 @@ export default defineComponent({
const artistListOptions: Ref<ArtistInfoType[]> = ref([]);
const filteredOptions: Ref<ArtistInfoType[]> = ref([]);
const fieldsAddOptions: Ref<FieldType[]> = ref([]);
watch(
() => props.isOpened,
(value) => {
if (value) {
void getFieldOptions();
}
}
);
watch(
() => props.artistField,
(value) => {
if (value) {
isId.value = value.id;
// void getFieldOptions();
void getArrayArtist();
}
}
);
const getArrayArtist = async () => {
artistListOptions.value = [];
const response = (await api({
......
......@@ -476,7 +476,8 @@ export default defineComponent({
unitStatus.value = response.data.data.status;
unitArtistList.value = response.data.data.contracts;
unitField.value = response.data.data.classificatonId;
unitField.value = response.data.data.classification;
unitUserName.value = response.data.data.userName;
unitPassword.value = response.data.data.password;
}
......@@ -599,7 +600,7 @@ export default defineComponent({
email: unitEmail.value,
phoneNumber: unitPhoneNumber.value,
status: unitStatus.value,
classification: unitField.value.length === 0 ? null : unitField.value,
classification: unitField.value.length !== 0 ? null : unitField.value,
userName: unitUserName.value,
password: unitPassword.value,
contracts: unitArtistList.value,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment