bug fix in docker file
This commit is contained in:
parent
888c76c633
commit
cc1fe8216d
|
@ -23,6 +23,21 @@ services:
|
|||
networks:
|
||||
- hesabix-network
|
||||
restart: unless-stopped
|
||||
command: >
|
||||
bash -c "
|
||||
apt-get update &&
|
||||
apt-get install -y curl unzip &&
|
||||
curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer &&
|
||||
curl -fsSL https://deb.nodesource.com/setup_20.x | bash - &&
|
||||
apt-get install -y nodejs &&
|
||||
cd /var/www/html/hesabixCore &&
|
||||
composer install &&
|
||||
cd /var/www/html/webUI &&
|
||||
composer install &&
|
||||
npm install &&
|
||||
npm run build-only &&
|
||||
apache2-foreground
|
||||
"
|
||||
|
||||
# Database service
|
||||
db:
|
||||
|
@ -34,7 +49,7 @@ services:
|
|||
- MYSQL_PASSWORD=hesabix_password
|
||||
volumes:
|
||||
- mysql_data:/var/lib/mysql
|
||||
- ./hesabixBackup:/docker-entrypoint-initdb.d
|
||||
- ./hesabixBackup/databasefiles:/docker-entrypoint-initdb.d
|
||||
networks:
|
||||
- hesabix-network
|
||||
healthcheck:
|
||||
|
@ -43,6 +58,12 @@ services:
|
|||
timeout: 5s
|
||||
retries: 5
|
||||
restart: unless-stopped
|
||||
command: >
|
||||
bash -c "
|
||||
docker-entrypoint.sh mysqld &
|
||||
sleep 30 &&
|
||||
mysql -u root -proot_password hesabix_db < /docker-entrypoint-initdb.d/hesabix-db-default.sql
|
||||
"
|
||||
|
||||
# phpMyAdmin service
|
||||
phpmyadmin:
|
||||
|
|
|
@ -30,6 +30,7 @@ use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
|
|||
use App\Entity\BankAccount;
|
||||
use App\Entity\Cashdesk;
|
||||
use App\Entity\Salary;
|
||||
use App\Entity\Year;
|
||||
|
||||
class SellController extends AbstractController
|
||||
{
|
||||
|
@ -46,8 +47,16 @@ class SellController extends AbstractController
|
|||
'code' => $code,
|
||||
'money' => $acc['money']
|
||||
]);
|
||||
if (count($doc->getRelatedDocs()) != 0)
|
||||
if (!$doc){
|
||||
$canEdit = false;
|
||||
}
|
||||
$year = $entityManager->getRepository(Year::class)->findOneBy([
|
||||
'bid' => $acc['bid'],
|
||||
'head' => true
|
||||
]);
|
||||
if($doc->getYear()->getId() != $year->getId()){
|
||||
$canEdit = false;
|
||||
}
|
||||
|
||||
$tickets = $entityManager->getRepository(StoreroomTicket::class)->findBy(['doc' => $doc]);
|
||||
if (count($tickets) != 0)
|
||||
|
|
|
@ -41,6 +41,11 @@ export default defineComponent({
|
|||
recListWindowsState: { submited: false },
|
||||
notes: { count: 0 },
|
||||
bid: { legal_name: '', shortlinks: false },
|
||||
snackbar: {
|
||||
show: false,
|
||||
text: '',
|
||||
color: 'error'
|
||||
},
|
||||
item: {
|
||||
doc: { id: 0, date: null, code: null, des: '', amount: 0, profit: 0, shortLink: null },
|
||||
relatedDocs: [],
|
||||
|
@ -98,6 +103,26 @@ export default defineComponent({
|
|||
},
|
||||
},
|
||||
methods: {
|
||||
async checkCanEdit() {
|
||||
try {
|
||||
const response = await axios.get(`/api/sell/edit/can/${this.$route.params.id}`);
|
||||
if (response.data.result) {
|
||||
this.$router.push(`/acc/sell/mod/${this.$route.params.id}`);
|
||||
} else {
|
||||
this.snackbar = {
|
||||
show: true,
|
||||
text: 'شما مجاز به ویرایش این فاکتور نیستید',
|
||||
color: 'error'
|
||||
};
|
||||
}
|
||||
} catch (error) {
|
||||
this.snackbar = {
|
||||
show: true,
|
||||
text: 'خطا در بررسی دسترسی',
|
||||
color: 'error'
|
||||
};
|
||||
}
|
||||
},
|
||||
loadData() {
|
||||
this.loading = true;
|
||||
this.commoditys = [];
|
||||
|
@ -173,7 +198,7 @@ export default defineComponent({
|
|||
</v-tooltip>
|
||||
</template>
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn icon :to="`/acc/sell/mod/${$route.params.id}`">
|
||||
<v-btn icon @click="checkCanEdit">
|
||||
<v-icon>mdi-pencil</v-icon>
|
||||
<v-tooltip activator="parent" location="bottom">ویرایش</v-tooltip>
|
||||
</v-btn>
|
||||
|
@ -335,6 +360,13 @@ export default defineComponent({
|
|||
</v-window-item>
|
||||
</v-window>
|
||||
</v-container>
|
||||
<v-snackbar
|
||||
v-model="snackbar.show"
|
||||
:color="snackbar.color"
|
||||
timeout="3000"
|
||||
>
|
||||
{{ snackbar.text }}
|
||||
</v-snackbar>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
|
|
Loading…
Reference in a new issue